sprintf(fmt,"%%%i.%if%%%%",prec<4?prec:prec+1,prec>3?prec-3:0);
char ch[128];
- snprintf(ch,2,fmt,s);
+ _snprintf(ch,2,fmt,s);
//sxsVSCU_MESSAGE(2,ch);
std::cout << ch << std::flush;
for (int i=0;i<(prec>3?prec+2:prec+1);++i)
sprintf(fmt,"%%%i.%if%%%%",prec<4?prec:prec+1,prec>3?prec-3:0);
char ch[128];
- snprintf(ch,2,fmt,s);
+ _snprintf(ch,2,fmt,s);
//sxsVSCU_MESSAGE(2,ch);
std::cout << ch << std::flush;
for (int i=0;i<(prec>3?prec+2:prec+1);++i)
namespace clitk {
#if defined(WIN32)
-#define lrint(x) (floor(x+(x>0) ? 0.5 : -0.5))
+# define lrint(x) (floor(x+(x>0) ? 0.5 : -0.5))
#endif
-
+
+#ifndef M_PI
+# define M_PI 3.141592653589793238462643
+#endif
+
+
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned int uint;
//--------------------------------------------------------------------
template<class ImageType>
-void writeImage(const typename ImageType::Pointer image, const std::string & filename, const bool verbose=false) {
+void writeImage(const typename ImageType::Pointer image, const std::string & filename, const bool verbose) {
typedef itk::ImageFileWriter<ImageType> WriterType;
typename WriterType::Pointer writer = WriterType::New();
writer->SetFileName(filename.c_str());
//--------------------------------------------------------------------
template<class ImageType>
-void writeImage(const ImageType* image, const std::string & filename, const bool verbose=false) {
+void writeImage(const ImageType* image, const std::string & filename, const bool verbose) {
typedef itk::ImageFileWriter<ImageType> WriterType;
typename WriterType::Pointer writer = WriterType::New();
writer->SetFileName(filename.c_str());
double clitk::convertValue(double v,
const std::multimap<double, double> & conversionTable,
bool linear) {
- std::map<double, double>::const_iterator i;
+ std::multimap<double, double>::const_iterator i;
i = conversionTable.lower_bound(v);
if (i == conversionTable.end()) {
std::cerr << "The value " << v << " is out of the table" << std::endl;
}
else //Dim == 1,2,3
{
- assert(not vv_image->IsTimeSequence()); //This case isn't implemented
+ assert(!vv_image->IsTimeSequence()); //This case isn't implemented
typedef ImageType ConnectorImageType;
typedef itk::VTKImageToImageFilter <ConnectorImageType> ConnectorType;
typename ConnectorType::Pointer connector = ConnectorType::New();