From: David Sarrut Date: Tue, 4 Jun 2013 08:24:32 +0000 (+0200) Subject: Merge branch 'rtstruct-with-itk4' X-Git-Tag: v1.4.0~229 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=2b5b3e906ee95519169e9b6d4bb2da9d2e00d8b3;hp=35620b6e7b940cbeea17a58411e2dbba04484b17;p=clitk.git Merge branch 'rtstruct-with-itk4' --- diff --git a/common/rtkXRadImageIO.cxx b/common/rtkXRadImageIO.cxx index 1db3027..db5eb72 100644 --- a/common/rtkXRadImageIO.cxx +++ b/common/rtkXRadImageIO.cxx @@ -32,10 +32,10 @@ void rtk::XRadImageIO::ReadImageInformation() itkExceptionMacro(<<"Could not open file " << m_FileName); SetNumberOfDimensions(3); + std::string section=""; while(!is.eof()) { std::string line; - std::string section; std::getline(is, line); if(line.find('[')!=std::string::npos) { @@ -64,17 +64,17 @@ void rtk::XRadImageIO::ReadImageInformation() } else if(paramName == std::string("CBCT.DimensionalAttributes.PixelDimension_I_cm")) { - double spacing = 0.1*atof(paramValue.c_str()); + double spacing = 10*atof(paramValue.c_str()); SetSpacing(0, (spacing==0.)?1.:spacing); } else if(paramName == std::string("CBCT.DimensionalAttributes.PixelDimension_J_cm")) { - double spacing = 0.1*atof(paramValue.c_str()); + double spacing = 10*atof(paramValue.c_str()); SetSpacing(1, (spacing==0.)?1.:spacing); } else if(paramName == std::string("CBCT.DimensionalAttributes.PixelDimension_K_cm")) { - double spacing = 0.1*atof(paramValue.c_str()); + double spacing = 10*atof(paramValue.c_str()); SetSpacing(2, (spacing==0.)?1.:spacing); } else diff --git a/tools/clitkImageConvert.cxx b/tools/clitkImageConvert.cxx index 64bcfe1..abedc61 100644 --- a/tools/clitkImageConvert.cxx +++ b/tools/clitkImageConvert.cxx @@ -40,14 +40,25 @@ int main(int argc, char * argv[]) // Get list of filenames std::vector l; - for(unsigned int i=0; iSetInputFilenames(l); filter->SetIOVerbose(args_info.verbose_flag); - filter->SetOutputFilename(args_info.output_arg); + filter->SetOutputFilename(output); filter->EnableWriteCompression(args_info.compression_flag); if (args_info.type_given) filter->SetOutputPixelType(args_info.type_arg); diff --git a/tools/clitkImageConvert.ggo b/tools/clitkImageConvert.ggo index 395b435..837ee03 100644 --- a/tools/clitkImageConvert.ggo +++ b/tools/clitkImageConvert.ggo @@ -1,11 +1,11 @@ # file clitkImageConvert.ggo package "clitkImageConvert" version "1.0" -purpose "Convert an image into another image.\n\tAllow to change the file format and/or the pixel type. \n\tKnown file formats 2D: jpeg png bmp tif mhd hdr vox dcm \n\tKnown file formats 3D: mhd vox hdr dcm\n\tKnown file formats 4D: mhd \n\tKnown images: 2D 3D or 4D, schar, uchar, short, ushort, int, float and double \nYou can also specify multiple inputs (i.e. \"-i a.mhd,b.mhd,c.mhd\" or \"a.mhd b.mhd ...\" without the '-i' option) having the same size and dimension to build a (n+1)D image." +purpose "Convert an image into another image.\n\tAllow to change the file format and/or the pixel type. \n\tKnown file formats 2D: jpeg png bmp tif mhd hdr vox dcm \n\tKnown file formats 3D: mhd vox hdr dcm\n\tKnown file formats 4D: mhd \n\tKnown images: 2D 3D or 4D, schar, uchar, short, ushort, int, float and double\n\nIf the -o option is not given, the last parameter of the command line is used as output." -option "config" - "Config file" string no -option "input" i "Input image filename" string no multiple -option "output" o "Output image filename" string yes -option "type" t "Output type (float, ushort ...)" string no -option "verbose" v "Verbose" flag off -option "compression" c "Compress output" flag off +option "config" - "Config file" string no +option "input" i "Input image filename" string no +option "output" o "Output image filename" string no +option "type" t "Output type (float, ushort ...)" string no +option "verbose" v "Verbose" flag off +option "compression" c "Compress output" flag off