]> Creatis software - clitk.git/commitdiff
bug in Z origin in clitkDicom2Image
authorRomulo Pinho <romulo.pinho@lyon.unicancer.fr>
Fri, 30 Mar 2012 11:26:27 +0000 (13:26 +0200)
committerRomulo Pinho <romulo.pinho@lyon.unicancer.fr>
Fri, 30 Mar 2012 11:26:27 +0000 (13:26 +0200)
- bug happened when using --std_input

tools/clitkDicom2Image.cxx

index 0ad79ef645d9ed6843be00ce10f15c6e15477c27..6410714293c69e769b12eceae618f9c26a5abf94 100644 (file)
@@ -158,7 +158,7 @@ int main(int argc, char * argv[])
     theorigin[0] = -spacing[0]*size[0]/2.0;
     theorigin[1] = -spacing[1]*size[1]/2.0;
     modifier->SetInput(vtk_image);
-    modifier->SetOutputOrigin(theorigin[0], theorigin[1], theorigin[2]);
+    modifier->SetOutputOrigin(theorigin[0], theorigin[1], sliceLocations[sliceIndex[0]]);
     modifier->Update();
     vvImage::Pointer focal_image = vvImage::New();
     focal_image->AddVtkImage(modifier->GetOutput());