]> Creatis software - clitk.git/blobdiff - common/clitkHisImageIO.cxx
make difference between 2D and 3D with a single slice image (Dim obtained from ITK...
[clitk.git] / common / clitkHisImageIO.cxx
index e8b878cdb752aa7e62eb00fafa314aa538fd17d9..fde95dbe8d7ef5d353d4888e69e0a9491d623211 100755 (executable)
@@ -90,6 +90,12 @@ void clitk::HisImageIO::ReadImageInformation()
   SetDimensions(1, brx-ulx+1);
   if (nrframes>1)
     SetDimensions(2, nrframes);
+
+  SetSpacing(0, 409.6/GetDimensions(0));
+  SetSpacing(1, 409.6/GetDimensions(1));
+
+  SetOrigin(0, -0.5*(GetDimensions(0)-1)*GetSpacing(0));
+  SetOrigin(1, -0.5*(GetDimensions(1)-1)*GetSpacing(1));
 } ////
 
 //--------------------------------------------------------------------