]> Creatis software - clitk.git/commitdiff
Debug RTStruct offset in z direction with vtk6
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Tue, 23 May 2017 14:45:05 +0000 (16:45 +0200)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Tue, 23 May 2017 14:45:05 +0000 (16:45 +0200)
common/clitkDicomRTStruct2ImageFilter.cxx

index fcc9e2be26da9c02cfdcb1a94f10e5ff67874745..96fdea75ed2415c7b2d699e6ce7dfd620f1cdd80 100644 (file)
@@ -221,11 +221,13 @@ void clitk::DicomRTStruct2ImageFilter::Update()
   vtkSmartPointer<vtkLinearExtrusionFilter> extrude=vtkSmartPointer<vtkLinearExtrusionFilter>::New();
 #if VTK_MAJOR_VERSION <= 5
   extrude->SetInput(mesh);
+  ///We extrude in the -slice_spacing direction to respect the FOCAL convention (NEEDED !)
+  extrude->SetVector(0, 0, -0.5*mSpacing[2]);
 #else
   extrude->SetInputData(mesh);
-#endif
   ///We extrude in the -slice_spacing direction to respect the FOCAL convention (NEEDED !)
-  extrude->SetVector(0, 0, -mSpacing[2]);
+  extrude->SetVector(0, 0, 0.5*mSpacing[2]);
+#endif
 
   // Binarization
   vtkSmartPointer<vtkPolyDataToImageStencil> sts=vtkSmartPointer<vtkPolyDataToImageStencil>::New();