X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=itk%2FclitkBinaryImageToMeshFilter.txx;h=b242dcf81d744ae675762389bdb45594b63edcc3;hb=5f801bf0b07486889123e941d6913d4369dfc86f;hp=8a14edc7f193d2c2125a7c0a87d4605b54f6e7a6;hpb=93b8df062a36ca152f3cb20d08ea9b9ce9c1e45f;p=clitk.git diff --git a/itk/clitkBinaryImageToMeshFilter.txx b/itk/clitkBinaryImageToMeshFilter.txx index 8a14edc..b242dcf 100644 --- a/itk/clitkBinaryImageToMeshFilter.txx +++ b/itk/clitkBinaryImageToMeshFilter.txx @@ -43,7 +43,11 @@ Update() // Get extend vtkSmartPointer clipper = vtkSmartPointer::New(); +#if VTK_MAJOR_VERSION <= 5 clipper->SetInput(input_vtk); +#else + clipper->SetInputData(input_vtk); +#endif int* extent = input_vtk->GetExtent(); // Loop on slices @@ -52,7 +56,11 @@ Update() // std::vector > contours; for(uint i=0; i squares = vtkSmartPointer::New(); +#if VTK_MAJOR_VERSION <= 5 squares->SetInput(input_vtk); +#else + squares->SetInputData(input_vtk); +#endif squares->SetImageRange(extent[0], extent[1], extent[2], extent[3], i, i); squares->SetNumberOfContours(1); squares->SetValue(0, m_ThresholdValue); @@ -61,7 +69,11 @@ Update() // Strip (needed) vtkSmartPointer vs = vtkSmartPointer::New(); +#if VTK_MAJOR_VERSION <= 5 vs->SetInput(squares->GetOutput()); +#else + vs->SetInputData(squares->GetOutput()); +#endif vs->Update(); m = vs->GetOutput(); @@ -76,7 +88,11 @@ Update() // only add if lines>0 if (m->GetNumberOfLines() > 0) { +#if VTK_MAJOR_VERSION <= 5 append->AddInput(m);//contours[i]); +#else + append->AddInputData(m);//contours[i]); +#endif } } append->Update();