X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkDicomRTStruct2ImageFilter.cxx;h=fcc9e2be26da9c02cfdcb1a94f10e5ff67874745;hb=ff4e821006c760607319ef7cc58dd9f4f17a7098;hp=eb54bdc0b2cd626f7fca1c7f0a879890187f5656;hpb=067cf5847bb412d0067bcd52d7844377a0a43635;p=clitk.git diff --git a/common/clitkDicomRTStruct2ImageFilter.cxx b/common/clitkDicomRTStruct2ImageFilter.cxx index eb54bdc..fcc9e2b 100644 --- a/common/clitkDicomRTStruct2ImageFilter.cxx +++ b/common/clitkDicomRTStruct2ImageFilter.cxx @@ -202,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 @@ -239,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); @@ -247,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);