From a1acb6a4338137b9f1fefab3803f07b75eac6c84 Mon Sep 17 00:00:00 2001 From: tbaudier Date: Tue, 23 May 2017 16:45:05 +0200 Subject: [PATCH] Debug RTStruct offset in z direction with vtk6 --- common/clitkDicomRTStruct2ImageFilter.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/clitkDicomRTStruct2ImageFilter.cxx b/common/clitkDicomRTStruct2ImageFilter.cxx index fcc9e2b..96fdea7 100644 --- a/common/clitkDicomRTStruct2ImageFilter.cxx +++ b/common/clitkDicomRTStruct2ImageFilter.cxx @@ -221,11 +221,13 @@ void clitk::DicomRTStruct2ImageFilter::Update() vtkSmartPointer extrude=vtkSmartPointer::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 sts=vtkSmartPointer::New(); -- 2.45.2