X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkDicomRTStruct2ImageFilter.cxx;h=fcc9e2be26da9c02cfdcb1a94f10e5ff67874745;hb=5ef6c777941b6e69b6229192481a7a5f88fcf9fe;hp=20a4b7009c14e8707b080b1225a615130ceec9b5;hpb=3a823a03d4a2217e41e4dd3b05a8ea825bb762a5;p=clitk.git diff --git a/common/clitkDicomRTStruct2ImageFilter.cxx b/common/clitkDicomRTStruct2ImageFilter.cxx index 20a4b70..fcc9e2b 100644 --- a/common/clitkDicomRTStruct2ImageFilter.cxx +++ b/common/clitkDicomRTStruct2ImageFilter.cxx @@ -31,7 +31,6 @@ #include #include #include -#include //-------------------------------------------------------------------- @@ -203,18 +202,15 @@ void clitk::DicomRTStruct2ImageFilter::Update() mBinaryImage = vtkSmartPointer::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 @@ -240,7 +236,7 @@ void clitk::DicomRTStruct2ImageFilter::Update() #if VTK_MAJOR_VERSION <= 5 sts->SetInput(extrude->GetOutput()); #else - sts->SetInputData(extrude->GetOutput()); + sts->SetInputConnection(extrude->GetOutputPort(0)); #endif //sts->SetInput(mesh); @@ -248,7 +244,7 @@ void clitk::DicomRTStruct2ImageFilter::Update() #if VTK_MAJOR_VERSION <= 5 stencil->SetStencil(sts->GetOutput()); #else - stencil->SetStencilData(sts->GetOutput()); + stencil->SetStencilConnection(sts->GetOutputPort(0)); #endif #if VTK_MAJOR_VERSION <= 5 stencil->SetInput(mBinaryImage);