vtkMarchingContourFilter* cntVTK = vtkMarchingContourFilter::New( );
- cntVTK->SetInput( idata );
-
cntVTK->SetNumberOfContours( 1 );
cntVTK->SetValue( 0, 255 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ cntVTK->SetInput( idata );
cntVTK->Update( );
cntVTK->UpdateInformation();
+#else
+ cntVTK->SetInputData( idata );
+#endif
vtkCleanPolyData* cpd = vtkCleanPolyData::New( );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
cpd->SetInput( cntVTK->GetOutput( ) );
cpd->Update( );
cpd->UpdateInformation();
+#else
+ cpd->SetInputData( cntVTK->GetOutput( ) );
+#endif
+
vtkPolyDataConnectivityFilter* conn = vtkPolyDataConnectivityFilter::New( );
conn->SetExtractionModeToLargestRegion( );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
conn->SetInput( cpd->GetOutput( ) );
conn->Update( );
conn->UpdateInformation();
+#else
+ conn->SetInputData( cpd->GetOutput( ) );
+#endif
+
vtkStripper* vtkstripper = vtkStripper::New( );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
vtkstripper->SetInput( conn->GetOutput() );
vtkstripper->Update();
vtkstripper->UpdateInformation();
+#else
+ vtkstripper->SetInputData( conn->GetOutput() );
+ cntVTK->Update();
+#endif
vtkPolyData* polyDataResult = cntVTK->GetOutput();
//std::cout<<"Points "<<polyDataResult->GetNumberOfPoints()<<std::endl;
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
polyDataResult->Update( );
polyDataResult->UpdateInformation();
+#else
+ // ..
+#endif
//EED
/*
// y = y*spc[1];
// z = z*spc[3];
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
imageReslice->SetInput( imagedata );
+#else
+ imageReslice->SetInputData( imagedata );
+#endif
imageReslice->SetInformationInput(imagedata);
imageReslice->SetResliceAxesDirectionCosines(1,0,0, 0,1,0 ,0,0,1);
imageReslice->SetResliceAxesOrigin(0,0,z);
imageReslice->SetOutputDimensionality(2);
imageReslice->SetInterpolationModeToLinear();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ // ..
+#else
+ imageReslice->Update();
+#endif
+
imagedata = imageReslice->GetOutput();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
imagedata->Update();
imagedata->UpdateInformation();
+#else
+ // ..
+#endif
vtkContourFilter* cntVTK = vtkContourFilter::New( );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
cntVTK->SetInput( imagedata );
+#else
+ cntVTK->SetInputData( imagedata );
+#endif
cntVTK->SetNumberOfContours( 1 );
//cntVTK->SetValue( 0, vmin );
cntVTK->UpdateInformation();
vtkCleanPolyData* cpd = vtkCleanPolyData::New( );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
cpd->SetInput( cntVTK->GetOutput( ) );
+#else
+ cpd->SetInputData( cntVTK->GetOutput( ) );
+#endif
cpd->ConvertLinesToPointsOff( );
cpd->Update( );
cpd->UpdateInformation();
conn->SetExtractionModeToClosestPointRegion( );
//conn->SetMaxRecursionDepth( 3000 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
conn->SetInput( cpd->GetOutput( ) );
+#else
+ conn->SetInputData( cpd->GetOutput( ) );
+#endif
conn->SetClosestPoint( x, y, 0 );
conn->Update( );
conn->UpdateInformation();
vtkCleanPolyData* cpd2 = vtkCleanPolyData::New( );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
cpd2->SetInput( conn->GetOutput( ) );
+#else
+ cpd2->SetInputData( conn->GetOutput( ) );
+#endif
cpd2->Update();
cpd2->UpdateInformation();
vtkStripper* vtkstripper = vtkStripper::New( );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
vtkstripper->SetInput( cpd2->GetOutput() );
+#else
+ vtkstripper->SetInputData( cpd2->GetOutput() );
+#endif
vtkstripper->Update();
vtkstripper->UpdateInformation();
vtkPolyData* polyDataResult = vtkstripper->GetOutput();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
polyDataResult->Update( );
polyDataResult->UpdateInformation();
+#else
+ //...
+#endif
/* EED
ofstream myfile;
// Image Value
vtkImageChangeInformation *valueChInfo = vtkImageChangeInformation::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
valueChInfo->SetInput(value);
+#else
+ valueChInfo->SetInputData(value);
+#endif
valueChInfo->SetSpacingScale(spc);
vtkMetaImageWriter *writerValueImage = vtkMetaImageWriter::New( );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
writerValueImage->SetInput( valueChInfo->GetOutput() );
+#else
+ writerValueImage->SetInputData( valueChInfo->GetOutput() );
+#endif
writerValueImage->SetFileName( (const char *)filename.mb_str() );
writerValueImage->SetFileDimensionality( 3 );
writerValueImage->SetCompression(false);
vtkImageChangeInformation *maskChInfo = vtkImageChangeInformation::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
maskChInfo->SetInput(mask);
+#else
+ maskChInfo->SetInputData(mask);
+#endif
maskChInfo->SetSpacingScale(spc);
vtkMetaImageWriter *writerMaskImage = vtkMetaImageWriter::New( );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
writerMaskImage->SetInput( maskChInfo->GetOutput() );
+#else
+ writerMaskImage->SetInputData( maskChInfo->GetOutput() );
+#endif
+
writerMaskImage->SetFileName( (const char *)filename.mb_str() );
writerMaskImage->SetFileDimensionality( 3 );
writerMaskImage->SetCompression(false);