if(_pointWidget==NULL){
_pointWidget = vtkPointWidget::New();
}
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_pointWidget->SetInput( imageData );
+#else
+ _pointWidget->SetInputData( imageData );
+#endif
_myCallback->SetVtkPointWidget(_pointWidget);
_pointWidget->SetInteractor( GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor() );
_pointWidget->AllOff();
{
_planeWidget = vtkPlaneWidget::New();
}
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_planeWidget->SetInput( imageData );
+#else
+ _planeWidget->SetInputData( imageData );
+#endif
_myCallback->SetVtkPlaneWidget(_planeWidget);
_vtkplane = vtkPolyData::New();
_probe = vtkProbeFilter::New();
- _probe->SetInput(_vtkplane);
-
_contourMapper = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ _probe->SetInput(_vtkplane);
_contourMapper->SetInput( _probe->GetPolyDataOutput() );
+#else
+ _probe->SetInputData(_vtkplane);
+ _contourMapper->SetInputData( _probe->GetPolyDataOutput() );
+#endif
_contourPlaneActor = vtkActor::New();
_contourPlaneActor->SetMapper(_contourMapper);
}
_planeWidget->GetPolyData(_vtkplane);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_probe->SetSource( imageData );
+#else
+ _probe->SetSourceData( imageData );
+#endif
_contourMapper->SetScalarRange( imageData->GetScalarRange() );
ConfigureFreePlanes();
{
vtkImageData *imageData = GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
// Orthogonal planes B&W
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_planeWidgetX->SetInput( imageData );
_planeWidgetY->SetInput( imageData );
_planeWidgetZ->SetInput( imageData );
// -- Plane widget
_probe->SetSource( imageData );
+#else
+ _planeWidgetX->SetInputData( imageData );
+ _planeWidgetY->SetInputData( imageData );
+ _planeWidgetZ->SetInputData( imageData );
+ // -- Plane widget
+ _probe->SetSourceData( imageData );
+#endif
+
_vtkmpr3Ddataviewer->SetImage();
}
double xSpacing = 0, ySpacing = 0, zSpacing = 0;
if(image)
{
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
planeWidget->SetInput( image );
+#else
+ planeWidget->SetInputData( image );
+#endif
image->GetExtent(xMin, xMax, yMin, yMax, zMin, zMax);
image->GetSpacing(xSpacing, ySpacing, zSpacing);
}
if(_pointWidget)
{
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_pointWidget->SetInput( image );
+#else
+ _pointWidget->SetInputData( image );
+#endif
_pointWidget->PlaceWidget();
_pointWidget->SetPosition( x,y,z );
double spc[3];
vtkimagedata->GetSpacing(spc);
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
vtkimagedata->Update();
+#else
+ // ..
+#endif
double p[3], n[3];
pSource->Update( );
vtkProbeFilter* slices = vtkProbeFilter::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
slices->SetInput( ( vtkDataSet* )pSource->GetOutput( ) );
slices->SetSource( vtkimagedata );
slices->Update( );
pSource->Delete( );
+#else
+ slices->SetInputData( ( vtkDataSet* )pSource->GetOutput( ) );
+ slices->SetSourceData( vtkimagedata );
+#endif
vtkStructuredPoints *stPoints = vtkStructuredPoints::New();
stPoints -> GetPointData( )->SetScalars( slices->GetOutput()->GetPointData()->GetScalars() );
stPoints -> SetDimensions( sizeIma, sizeIma, 1 );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
stPoints -> SetScalarType( vtkimagedata->GetScalarType() );
stPoints -> SetScalarTypeToShort();
stPoints -> Update();
+#else
+ vtkInformation* info=stPoints->GetInformation();
+ vtkDataObject::SetPointDataActiveScalarInfo(info, VTK_SHORT, 1);
+#endif
+
+
vtkImageChangeInformation *change = vtkImageChangeInformation ::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
change -> SetInput( stPoints );
+#else
+ change -> SetInputData( stPoints );
+#endif
change -> Update(); //important
double _range[2];
vtkMetaImageWriter *writer = vtkMetaImageWriter::New( );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
writer->SetInput( stPoints );
+#else
+ writer->SetInputData( stPoints );
+#endif
writer->SetFileName( "C:/Users/Images/temp_EED/image.mhd" );
writer->SetFileDimensionality( 2 );
writer->Write( );
vtkDataSetMapper *_3DSliceMapper = vtkDataSetMapper::New( );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_3DSliceMapper->SetInput(change->GetOutput( ) );
+#else
+ _3DSliceMapper->SetInputData(change->GetOutput( ) );
+#endif
+
_3DSliceMapper->SetLookupTable( _bwlookup );
_3DSliceMapper->SetScalarRange( _range );
_3DSliceMapper->ImmediateModeRenderingOn( );
vtkCutter* sliceCutter = vtkCutter::New();
vtkImageData *vtkimagedata = this->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
sliceCutter->SetInput( vtkimagedata );
+#else
+ sliceCutter->SetInputData( vtkimagedata );
+#endif
sliceCutter->SetCutFunction( slicePlane );
//EED
// vtkLookupTable *lut = BuildHueWeightBaseMap();
vtkPolyDataMapper *slice = vtkPolyDataMapper::New();
- slice->SetInput( sliceCutter->GetOutput() );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ slice->SetInput( sliceCutter->GetOutput() );
+#else
+ slice->SetInputData( sliceCutter->GetOutput() );
+#endif
double range[2];
// EED
// slice->Update();
// sliceActor->SetMapper( slice );
vtkPolyDataMapper *contourMapper = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
contourMapper->SetInput( sliceCutter->GetOutput() );
+#else
+ contourMapper->SetInputData( sliceCutter->GetOutput() );
+#endif
+
contourMapper->SetScalarRange( range );
// contourMapper->SetLookupTable( lut );