Authors belong to:
- University of LYON http://www.universite-lyon.fr/
- - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
+ - Léon Bérard cancer center http://www.centreleonberard.fr
- CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
This software is distributed WITHOUT ANY WARRANTY; without even
- BSD See included LICENSE.txt file
- CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-======================================================================-====*/
+===========================================================================**/
/**
* @file clitkXdrImageIO.cxx
* @author Simon Rit <simon.rit@gmail.com>
SetOrigin(i,10*p[0]);
//Test if rectilinear image is actually uniform (tolerance 0.1 mm)
- for (j=0; j<GetDimensions(i)-1; j++) {
- if (fabs((p[j+1]-p[j])*10-GetSpacing(i))>0.1) {
- free(points);
- fclose(fstream);
- return ER_NOT_HANDLED;
+ if(i<3) { // Only for first 3 dimensions because spacing is barely used in other dims
+ for (j=0; j<GetDimensions(i)-1; j++) {
+ if (fabs((p[j+1]-p[j])*10-GetSpacing(i))>0.1) {
+ free(points);
+ fclose(fstream);
+ return ER_NOT_HANDLED;
+ }
}
}
p += (int)GetDimensions(i);