_lineMapper = NULL;
_pd = NULL;
- _interactorstyleplane2D = false;
+ _interactorstyleplane2D = NULL;
}
//-------------------------------------------------------------------
vtkPlane2DView::~vtkPlane2DView()
{
vtkImageData *imagedata = GetVtkmprbasedata()->GetImageData();
SetPSource(_sizeIma);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_3Dslices -> SetInput( ( vtkDataSet* )_pSource->GetOutput( ) );
_3Dslices -> SetSource( imagedata );
+#else
+ _3Dslices -> SetInputData( ( vtkDataSet* )_pSource->GetOutput( ) );
+ _3Dslices -> SetSourceData( imagedata );
+#endif
+
_3Dslices -> Update( );
_stPoints -> GetPointData( )->SetScalars( _3Dslices->GetOutput()->GetPointData()->GetScalars() );
_stPoints -> SetDimensions( _sizeIma, _sizeIma, 1 );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_stPoints -> SetScalarType( imagedata->GetScalarType() );
_stPoints -> SetScalarTypeToShort();
_stPoints -> Update();
// _change -> SetInput( _stPoints );
// _change -> Update(); //important
_imageViewer2XYZ->GetVtkImageViewer2()->SetInput ( _stPoints );
+#else
+printf("EED Warning! vtkPlane2DView::Extract_One_PlaneVTK VTK 5->7 ???? SetScalarTypeToShort \n");
+printf("EED Warning! vtkPlane2DView::Extract_One_PlaneVTK VTK 5->7 ???? SetScalarTypeToShort \n");
+printf("EED Warning! vtkPlane2DView::Extract_One_PlaneVTK VTK 5->7 ???? SetScalarTypeToShort \n");
+printf("EED Warning! vtkPlane2DView::Extract_One_PlaneVTK VTK 5->7 ???? SetScalarTypeToShort \n");
+printf("EED Warning! vtkPlane2DView::Extract_One_PlaneVTK VTK 5->7 ???? SetScalarTypeToShort \n");
+ vtkInformation* info=_stPoints->GetInformation();
+ vtkDataObject::SetPointDataActiveScalarInfo(info, VTK_SHORT, 1);
+ _imageViewer2XYZ->GetVtkImageViewer2()->SetInputData( _stPoints );
+
+#endif
+
+
// _imageViewer2XYZ->GetVtkImageViewer2()->SetInput ( _change->GetOutput() );
// vtkImageActor *imageActor = _imageViewer2XYZ->GetVtkImageViewer2()->GetImageActor();
}
for ( iWidth=0 ; iWidth<sizeWidth ; iWidth++ )
{
vtkProbeFilter *slice = vtkProbeFilter::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
slice -> SetInput( ( vtkDataSet* )_pSource->GetOutput( ) );
slice -> SetSource( imagedata );
+#else
+ slice -> SetInputData( ( vtkDataSet* )_pSource->GetOutput( ) );
+ slice -> SetSourceData( imagedata );
+#endif
slice -> Update( );
slicesLST.push_back( slice );
_pSource->Push( sp );
_imageResult = vtkImageData::New();
_imageResult -> SetDimensions(_sizeIma,_sizeIma,1);
_imageResult -> SetSpacing(1,1,1);
- _imageResult -> SetScalarType( imagedata->GetScalarType() );
_imageResult -> SetExtent(0,_sizeIma-1,0,_sizeIma-1,0,0);
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ _imageResult -> SetScalarType( imagedata->GetScalarType() );
_imageResult -> SetWholeExtent(0,_sizeIma-1,0,_sizeIma-1,0,0);
_imageResult -> AllocateScalars();
_imageResult -> Update();
+#else
+ _imageResult -> AllocateScalars(imagedata->GetScalarType(),1);
+#endif
+
}
unsigned short *pTemp;
unsigned short *pResult;
slicesLST[iWidth]->Delete();
}
_imageResult->Modified();
- _imageViewer2XYZ->GetVtkImageViewer2()->SetInput ( _imageResult );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ _imageViewer2XYZ->GetVtkImageViewer2()->SetInput( _imageResult );
+#else
+ _imageViewer2XYZ->GetVtkImageViewer2()->SetInputData( _imageResult );
+#endif
}
//-------------------------------------------------------------------
_stPoints = vtkStructuredPoints::New( );
_change = vtkImageChangeInformation::New();
- wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
+ crea::wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
ExtractPlane();
// SetActive(false);
_imageViewer2XYZ -> GetVtkImageViewer2() -> SetupInteractor ( iren );
lines->Delete(); //do not delete lines ??
_lineActor = vtkActor::New();
_lineMapper = vtkPolyDataMapper::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_lineMapper->SetInput(_pd);
+#else
+ _lineMapper->SetInputData(_pd);
+#endif
_lineMapper->ImmediateModeRenderingOn();
_lineActor->SetMapper(_lineMapper);
_lineActor->GetProperty()->BackfaceCullingOn();