]> Creatis software - clitk.git/commitdiff
Removed copy paste
authorSimon Rit <simon.rit@creatis.insa-lyon.fr>
Tue, 2 Feb 2016 09:53:01 +0000 (10:53 +0100)
committerSimon Rit <simon.rit@creatis.insa-lyon.fr>
Tue, 2 Feb 2016 09:53:01 +0000 (10:53 +0100)
common/clitkDicomRTStruct2ImageFilter.cxx

index eb54bdc0b2cd626f7fca1c7f0a879890187f5656..c8d28bf24cf3bc9444684ad3639afbd0c358d2a3 100644 (file)
@@ -202,18 +202,15 @@ void clitk::DicomRTStruct2ImageFilter::Update()
   mBinaryImage = vtkSmartPointer<vtkImageData>::New();
 #if VTK_MAJOR_VERSION <= 5
   mBinaryImage->SetScalarTypeToUnsignedChar();
+#endif
   mBinaryImage->SetOrigin(&origin[0]);
   mBinaryImage->SetSpacing(&mSpacing[0]);
   mBinaryImage->SetExtent(0, extend[0],
                           0, extend[1],
                           0, extend[2]);
+#if VTK_MAJOR_VERSION <= 5
   mBinaryImage->AllocateScalars();
 #else
-  mBinaryImage->SetOrigin(&origin[0]);
-  mBinaryImage->SetSpacing(&mSpacing[0]);
-  mBinaryImage->SetExtent(0, extend[0],
-                          0, extend[1],
-                          0, extend[2]);
   mBinaryImage->AllocateScalars(VTK_UNSIGNED_CHAR, 1);
 #endif