X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkDicomRT_ROI.cxx;h=2e914d6314abd0b035878a37a2da3a9785cdce81;hb=8dc75d1449323b08bf7378cded6f0bec24b2016f;hp=1fd9fe1f1c6b806bd0f08be65c15d32d47a42f7f;hpb=c776da5577fe8101676fb5d3d6978f2efcf74a17;p=clitk.git diff --git a/common/clitkDicomRT_ROI.cxx b/common/clitkDicomRT_ROI.cxx index 1fd9fe1..2e914d6 100644 --- a/common/clitkDicomRT_ROI.cxx +++ b/common/clitkDicomRT_ROI.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #if GDCM_MAJOR_VERSION == 2 #include "gdcmAttribute.h" @@ -72,6 +73,14 @@ int clitk::DicomRT_ROI::GetROINumber() const //-------------------------------------------------------------------- +//-------------------------------------------------------------------- +void clitk::DicomRT_ROI::SetROINumber(int number) +{ + mNumber = number; +} +//-------------------------------------------------------------------- + + //-------------------------------------------------------------------- const std::string & clitk::DicomRT_ROI::GetName() const { @@ -276,7 +285,11 @@ void clitk::DicomRT_ROI::ComputeMeshFromContour() { vtkSmartPointer append = vtkSmartPointer::New(); for(unsigned int i=0; iAddInput(mListOfContours[i]->GetMesh()); +#if VTK_MAJOR_VERSION <= 5 + append->AddInput(mListOfContours[i]->GetMesh()); +#else + append->AddInputData(mListOfContours[i]->GetMesh()); +#endif } append->Update(); @@ -394,7 +407,12 @@ void clitk::DicomRT_ROI::ComputeContoursFromImage() // Get initial extend for the clipping vtkSmartPointer clipper = vtkSmartPointer::New(); +#if VTK_MAJOR_VERSION <= 5 clipper->SetInput(image); +#else + clipper->SetInputData(image); +#endif + int* extent = image->GetExtent(); DDV(extent, 6); // std::vector extend; @@ -414,7 +432,11 @@ void clitk::DicomRT_ROI::ComputeContoursFromImage() vtkSmartPointer squares = vtkSmartPointer::New(); +#if VTK_MAJOR_VERSION <= 5 squares->SetInput(image); +#else + squares->SetInputData(image); +#endif squares->SetImageRange(extent[0], extent[1], extent[2], extent[3], i, i); squares->SetValue(1, 1.0); squares->Update(); @@ -446,7 +468,11 @@ void clitk::DicomRT_ROI::ComputeContoursFromImage() vtkSmartPointer append = vtkSmartPointer::New(); for(unsigned int i=0; iAddInput(contours[i]); +#else + append->AddInputData(contours[i]); +#endif } append->Update(); @@ -455,7 +481,11 @@ void clitk::DicomRT_ROI::ComputeContoursFromImage() // Write vtk vtkPolyDataWriter * w = vtkPolyDataWriter::New(); +#if VTK_MAJOR_VERSION <= 5 w->SetInput(mMesh); +#else + w->SetInputData(mMesh); +#endif w->SetFileName("toto.vtk"); w->Write();