+ _planeWidget->NormalToXAxisOn();
+ _planeWidget->SetResolution(50);
+ _planeWidget->SetRepresentationToOutline();
+
+ int dim[3];
+
+ imageData->GetDimensions(dim);
+ int px=(dim[0]/2);
+ int py=(dim[1]/2);
+ int pz=(dim[2]/2);
+ int dd=20;
+ _planeWidget->PlaceWidget( px-dd , px+dd , py-dd , py+dd , pz-dd , pz+dd );
+
+ if(_vtkplane==NULL){
+ _vtkplane = vtkPolyData::New();
+
+ _probe = vtkProbeFilter::New();
+ _probe->SetInput(_vtkplane);
+
+ _contourMapper = vtkPolyDataMapper::New();
+
+ _contourMapper->SetInput( _probe->GetPolyDataOutput() );
+
+ _contourPlaneActor = vtkActor::New();
+ _contourPlaneActor->SetMapper(_contourMapper);
+
+ _contourPlaneActor->VisibilityOff();
+
+ _planeWidget->SetInteractor( GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor() );
+ _planeWidget->AddObserver(vtkCommand::InteractionEvent,_myCallback);
+
+ _planeWidget->Off();
+ _wxvtk3Dbaseview->GetRenderer()->AddActor( _contourPlaneActor );
+
+ }
+
+ _planeWidget->GetPolyData(_vtkplane);
+ _probe->SetSource( imageData );
+ _contourMapper->SetScalarRange( imageData->GetScalarRange() );