#include "wxMPRBaseData.h"
#include "wxVtk2DBaseView.h"
- #include "wxVTKRenderWindowInteractor.h"
+ #include "creawxVTKRenderWindowInteractor.h"
#include "vtkTextProperty.h"
spcBase[5]=0;
_image = image;
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_image->Update();
_image->GetWholeExtent(ext);
+#else
+ _image->GetExtent(ext);
+#endif
+
dimensionOriginalLayer[0] = ext[1]-ext[0]+1;
dimensionOriginalLayer[1] = ext[3]-ext[2]+1;
dimensionOriginalLayer[2] = ext[5]-ext[4]+1;
vtkImageData *imagebase = GetwxVtkBaseView()->GetVtkBaseData()->GetImageData();
if (imagebase!=NULL)
{
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
imagebase->GetWholeExtent(ext);
+#else
+ imagebase->GetExtent(ext);
+#endif
+
dimBase[0]=ext[1]-ext[0]+1;
dimBase[1]=ext[3]-ext[2]+1;
dimBase[2]=ext[5]-ext[4]+1;
_image->GetScalarRange( _range );
_thresholdTable = vtkLookupTable::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_imageChangeInformation->SetInput(_image);
+#else
+ _imageChangeInformation->SetInputData(_image);
+ _imageChangeInformation->Update();
+#endif
+
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void LayerImageBase::SetNewSpacingLayer(double spc[3])
{
- _newSpcLayer[0]=spc[0];
- _newSpcLayer[1]=spc[1];
- _newSpcLayer[2]=spc[2];
+ _newSpcLayer[0] = spc[0];
+ _newSpcLayer[1] = spc[1];
+ _newSpcLayer[2] = spc[2];
_imageChangeInformation->SetOutputSpacing( _newSpcLayer );
}
double y=GetY();
double z=GetZ();
-
x = x*_spcBase[0];
y = y*_spcBase[1];
z = z*_spcBase[2];
-
CleanXYZ(x,y,z);
vtkCamera *camera = _baseView->GetRenderer()->GetActiveCamera();
} // !GetActorPresent()
ConfigLookupTable(); // virtual method
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_imageReslicer->SetInput( GetImage() );
+#else
+ _imageReslicer->SetInputData( GetImage() );
+#endif
+
_imageReslicer->SetInformationInput( GetImage() );
if (directionViewer==0)
_imageReslicer->SetInterpolationModeToNearestNeighbor();
_imageReslicer->Modified();
-
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ // ..
+#else
+ _imageReslicer->Update();
+#endif
vtkImageData *img = _imageReslicer->GetOutput();
// img->Update();
// img->UpdateInformation();
-
// _thresholdTable->Update();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_thresholdMapper->SetInput( img );
+#else
+ _thresholdMapper->SetInputData( img );
+#endif
+
_thresholdMapper->SetLookupTable( _thresholdTable );
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_thresholdActor->SetInput( _thresholdMapper->GetOutput() );
+#else
+ _thresholdMapper->Update();
+ _thresholdActor->SetInputData( _thresholdMapper->GetOutput() );
+#endif
_scalarbarActor->SetLookupTable( _thresholdTable );
// _scalarbarActor->SetLookupTable( _thresholdMapper->GetLookupTable() );
_scalarbarActor->SetNumberOfLabels(4);
int fontsize = _scalarbarActor->GetLabelTextProperty()->GetFontSize();
_scalarbarActor->GetLabelTextProperty()->SetFontSize(fontsize/2);
-
// _scalarbarActor->SetTextPad(4); ??
-
-
} // _image
}
baseView->GetRenderer()->RemoveActor( _scalarbarActor );
_actorPresent = false;
- }
+ } // if _actorPresent
}
//----------------------------------------------------------------------------
_range[1]=max;
}
-
-
// EOF
lstActorsSphere[id]->GetProperty()->SetOpacity( mopacity );
lstSourceSphere[id]->SetRadius( radio );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ // ..
+#else
+ lstSourceSphere[id]->Update();
+#endif
+
lstActorsText[id]->SetInput( label.c_str() );
lstActorsText[id]->SetPosition( radio+spc[0]*x , spc[1]*y , spc[2]*z );
}
//NTU: For updating points
lstSourceSphere.push_back(vtksphere);
vtkPolyDataMapper *sphereMapper = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
sphereMapper->SetInput( vtksphere->GetOutput() );
+#else
+ vtksphere->Update();
+ sphereMapper->SetInputData( vtksphere->GetOutput() );
+#endif
+
vtkActor *sphereActor = vtkActor::New();
sphereActor->SetMapper(sphereMapper);
sphereActor->SetOrigin(0, 0, 0);
//------------------------------------------------------------------------
void WidgetShowNPoints::OnSavePoints(wxCommandEvent& event)
{
+
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
wxFileDialog* FD = new wxFileDialog( 0,
_T("Save points .."),
_T(""),
_T("(*.xls)|*.xls"),
wxSAVE | wxOVERWRITE_PROMPT,
wxDefaultPosition);
- //EED
+ #else
+ wxFileDialog* FD = new wxFileDialog( 0,
+ _T("Save points .."),
+ _T(""),
+ _T(""),
+ _T("(*.xls)|*.xls"),
+ wxFD_SAVE | wxFD_OVERWRITE_PROMPT,
+ wxDefaultPosition);
+ #endif
+
+
int result_FD = FD->ShowModal();
//------------------------------------------------------------------------
void WidgetShowNPoints::OnLoadPoints(wxCommandEvent& event)
{
+
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
wxFileDialog* FD = new wxFileDialog( 0,
_T("Load points .."),
_T(""),
_T("(*.xls)|*.xls"),
wxOPEN | wxFILE_MUST_EXIST,
wxDefaultPosition);
+ #else
+ wxFileDialog* FD = new wxFileDialog( 0,
+ _T("Load points .."),
+ _T(""),
+ _T(""),
+ _T("(*.xls)|*.xls"),
+ wxFD_OPEN | wxFD_FILE_MUST_EXIST,
+ wxDefaultPosition);
+ #endif
int i;
//EED
int result_FD = FD->ShowModal();
{
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();
#include "wxMPRWidget.h"
- #include "wxVTKRenderWindowInteractor.h"
+ #include "creawxVTKRenderWindowInteractor.h"
#include "UtilVtk3DGeometriSelection.h"
#include "../kernel/marDicomBase.h"
// view 0
_vtkmpr2Dview[0] = new wxVtkMPR2DView(panel,0);
_vtkmpr2Dview[0]->SetVtkBaseData(vtkmprbasedata);
- wxVTKRenderWindowInteractor *iren0 = _vtkmpr2Dview[0]->GetWxVTKRenderWindowInteractor();
+ crea::wxVTKRenderWindowInteractor *iren0 = _vtkmpr2Dview[0]->GetWxVTKRenderWindowInteractor();
// view 1
_vtkmpr2Dview[1] = new wxVtkMPR2DView(panel,1);
_vtkmpr2Dview[1]->SetVtkBaseData(vtkmprbasedata);
- wxVTKRenderWindowInteractor *iren1 = _vtkmpr2Dview[1]->GetWxVTKRenderWindowInteractor();
+ crea::wxVTKRenderWindowInteractor *iren1 = _vtkmpr2Dview[1]->GetWxVTKRenderWindowInteractor();
// view 2
_vtkmpr2Dview[2] = new wxVtkMPR2DView(panel,2);
_vtkmpr2Dview[2]->SetVtkBaseData(vtkmprbasedata);
- wxVTKRenderWindowInteractor *iren2 = _vtkmpr2Dview[2]->GetWxVTKRenderWindowInteractor();
+ crea::wxVTKRenderWindowInteractor *iren2 = _vtkmpr2Dview[2]->GetWxVTKRenderWindowInteractor();
// view 3
wxNotebook *notebook = new wxNotebook( panel, -1 );
// EED
// _wxsphereview = new wxSphereView( notebook , vtkmprbasedata, vtkmprbasedata->GetImageData());
_wxsphereview = new wxSphereView( notebook , vtkmprbasedata );
- wxVTKRenderWindowInteractor *iren3B = _wxsphereview->GetWxVTKRenderWindowInteractor();
+ crea::wxVTKRenderWindowInteractor *iren3B = _wxsphereview->GetWxVTKRenderWindowInteractor();
notebook->AddPage( iren3B, _T("Sphere") );
// view 3.2
_wxvtkclipping3Dview->SetVtkClipping3DDataViewer(vtkclipping3Ddataviewer);
- wxWindow *window3D = _wxvtk3Dbaseview_MPRClipping3D->GetWxVTKRenderWindowInteractor();
-
+ wxWindow *window3D = _wxvtk3Dbaseview_MPRClipping3D->GetWxVTKRenderWindowInteractor();
wxPanel *panelControl = new wxPanel(panelMPR3D,-1);
wxPanel *controlPanelMPR3D = _wxvtkmpr3Dview->CreateControlPanel(panelControl, false);
wxPanel *controlPanelClipping3D = _wxvtkclipping3Dview->CreateSurfControlPanel(panelControl);
-
-
-
// wxBoxSizer *sizerCtrol = new wxBoxSizer(wxVERTICAL);
wxFlexGridSizer *sizerCtrol = new wxFlexGridSizer(1);
sizerCtrol->Add(controlPanelMPR3D , 1, wxALL|wxEXPAND, 2);
sizerCtrol->Add(controlPanelClipping3D , 1, wxALL|wxEXPAND, 2);
-
panelControl->SetAutoLayout(true);
panelControl->SetSizer(sizerCtrol);
panelControl->SetSize(400,150);
//RaC Nov2012 Correctly resize internal panels with the window resize event
panelMPR3D->SetSashGravity(0.5);
panelMPR3D -> SplitHorizontally( panelControl,window3D,200 );
-
notebook->AddPage( panelMPR3D, _T("MPR 3D - Clipping") );
-
-
Connect(notebook->GetId() , wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED , (wxObjectEventFunction) &wxMPRWidget::OnPageBChanged );
-
wxBoxSizer *sizerV = new wxBoxSizer(wxVERTICAL);
wxBoxSizer *sizerH1= new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer *sizerH2= new wxBoxSizer(wxHORIZONTAL);
if (_vtkmprbasedata!=NULL)
{
_vtkmprbasedata->Configure();
- x=_vtkmprbasedata -> GetMaxPositionX()/2;
- y=_vtkmprbasedata -> GetMaxPositionY()/2;
- z=_vtkmprbasedata -> GetMaxPositionZ()/2;
+ x = _vtkmprbasedata->GetMaxPositionX()/2;
+ y = _vtkmprbasedata->GetMaxPositionY()/2;
+ z = _vtkmprbasedata->GetMaxPositionZ()/2;
_vtkmprbasedata->SetX( x );
_vtkmprbasedata->SetY( y );
_vtkmprbasedata->SetZ( z );
}
- if(_vtkmpr2Dview[0]!=NULL) {_vtkmpr2Dview[0] -> Configure();}
- if(_vtkmpr2Dview[1]!=NULL) {_vtkmpr2Dview[1] -> Configure();}
- if(_vtkmpr2Dview[2]!=NULL) {_vtkmpr2Dview[2] -> Configure();}
+ if(_vtkmpr2Dview[0]!=NULL) { _vtkmpr2Dview[0]->Configure(); }
+ if(_vtkmpr2Dview[1]!=NULL) { _vtkmpr2Dview[1]->Configure(); }
+ if(_vtkmpr2Dview[2]!=NULL) { _vtkmpr2Dview[2]->Configure(); }
+ if (_vtkmpr2Dview_B[0]!=NULL) { _vtkmpr2Dview_B[0]->Configure(); }
+ if (_vtkmpr2Dview_B[1]!=NULL) { _vtkmpr2Dview_B[1]->Configure(); }
+ if (_vtkmpr2Dview_B[2]!=NULL) { _vtkmpr2Dview_B[2]->Configure(); }
- if (_vtkmpr2Dview_B[0]!=NULL) { _vtkmpr2Dview_B[0] -> Configure(); }
- if (_vtkmpr2Dview_B[1]!=NULL) { _vtkmpr2Dview_B[1] -> Configure(); }
- if (_vtkmpr2Dview_B[2]!=NULL) { _vtkmpr2Dview_B[2] -> Configure(); }
+ if (_vtkplane2Dview!=NULL) { _vtkplane2Dview->Configure(); }
+ if (_widgetMesure!=NULL) { _widgetMesure->ConfigureA(_vtkplane2Dview); }
+ if (_widgetMesure!=NULL) { _widgetMesure->SetActiveLink(true); }
+ if (_wxsphereview!=NULL) { _wxsphereview->Configure(); }
+ if (_wxvtk3Dbaseview_MPRClipping3D!=NULL){_wxvtk3Dbaseview_MPRClipping3D->Configure();}
+ if (_wxvtkmpr3Dview!=NULL) { _wxvtkmpr3Dview->Configure(); }
+ if (_wxvtkclipping3Dview!=NULL) { _wxvtkclipping3Dview->Configure(); }
-
-
- if (_vtkplane2Dview!=NULL){_vtkplane2Dview -> Configure();}
- if (_widgetMesure!=NULL){_widgetMesure -> ConfigureA(_vtkplane2Dview);}
- if (_widgetMesure!=NULL){_widgetMesure -> SetActiveLink(true);}
- if (_wxsphereview!=NULL){_wxsphereview -> Configure();}
-
- if (_wxvtk3Dbaseview_MPRClipping3D!=NULL){_wxvtk3Dbaseview_MPRClipping3D -> Configure();}
- if (_wxvtkmpr3Dview!=NULL){
- _wxvtkmpr3Dview -> Configure();
- }
- if (_wxvtkclipping3Dview!=NULL){_wxvtkclipping3Dview -> Configure();}
-
- if (_vtkplane2Dview_B!=NULL){ _vtkplane2Dview_B -> Configure(); }
- if (_widgetMesure_B!=NULL){ _widgetMesure_B -> ConfigureA( _vtkplane2Dview_B ); }
- if (_widgetMesure_B!=NULL){ _widgetMesure_B -> SetActiveLink(true); }
+ if (_vtkplane2Dview_B!=NULL) { _vtkplane2Dview_B->Configure(); }
+ if (_widgetMesure_B!=NULL) { _widgetMesure_B->ConfigureA( _vtkplane2Dview_B ); }
+ if (_widgetMesure_B!=NULL) { _widgetMesure_B->SetActiveLink(true); }
//EEDx3
// double spc[3];
wxPanelCuttingImageData::wxPanelCuttingImageData (wxWindow *parent)
: wxPanel( parent, -1)
{
- _imageData=NULL;
- _histogrammeVector=NULL;
- _wxvtk3Dbaseview=NULL;
- _wxvtkbaseView=NULL;
- CreateInterface();
+ _imageData = NULL;
+ _histogrammeVector = NULL;
+ _wxvtk3Dbaseview = NULL;
+ _wxvtkbaseView = NULL;
+ CreateInterface() ;
CreateModel();
Create3DViewObjects();
}
_vtksphere->SetThetaResolution (20);
_vtksphere->SetPhiResolution (20);
_sphereMapper = vtkPolyDataMapper::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_sphereMapper->SetInput( _vtksphere->GetOutput() );
+#else
+ _sphereMapper->SetInputData( _vtksphere->GetOutput() );
+#endif
_sphereActor = vtkActor::New();
_sphereActor->SetMapper(_sphereMapper);
_sphereActor->SetOrigin(0, 0, 0);
_vtkcube->SetYLength (1);
_vtkcube->SetZLength (1);
_cubeMapper = vtkPolyDataMapper::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_cubeMapper->SetInput( _vtkcube->GetOutput() );
+#else
+ _cubeMapper->SetInputData( _vtkcube->GetOutput() );
+#endif
_cubeActor = vtkActor::New();
_cubeActor->SetMapper(_cubeMapper);
_cubeActor->SetOrigin(0, 0, 0);
_vtkcylinder = vtkCylinderSource::New();
_vtkcylinder->SetResolution(20);
_cylinderMapper = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_cylinderMapper->SetInput( _vtkcylinder->GetOutput() );
+#else
+ _cylinderMapper->SetInputData( _vtkcylinder->GetOutput() );
+#endif
+
_cylinderActor = vtkActor::New();
_cylinderActor->SetMapper(_cylinderMapper);
_cylinderActor->SetOrigin(0, 0, 0);
} else {
_imageData->GetScalarRange(rangeA);
}
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_xyplot->RemoveAllInputs();
+#else
+ _xyplot->RemoveAllDataSetInputConnections();
+#endif
/*
if ( _histogrammeVector!=NULL )
{
*/
_histogrammeVector = vtkImageData::New();
_histogrammeVector -> SetDimensions ( (int)(rangeA[1]),1,1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_histogrammeVector -> SetScalarTypeToUnsignedShort();
_histogrammeVector -> AllocateScalars();
_histogrammeVector -> Update();
+#else
+ _histogrammeVector -> AllocateScalars(VTK_UNSIGNED_SHORT,1);
+#endif
unsigned short *p_vol = (unsigned short*)_histogrammeVector->GetScalarPointer(0,0,0);
int i,size = (int) (rangeA[1]);
}
_xyplot->SetXRange(0, rangeA[1]);
_xyplot->SetYRange(0, 10);
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_xyplot->AddInput( _histogrammeVector );
+#else
+ _xyplot->AddDataSetInput( _histogrammeVector );
+#endif
+
}
//-------------------------------------------------------------------
}
}
double range[2];
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_histogrammeVector->Update();
+#else
+ _histogrammeVector->Modified();
+#endif
+
_histogrammeVector->GetScalarRange(range);
_xyplot->SetYRange( 0 , range[1] );
_xyplot->SetXRange( min , max );
// _wxvtkbaseView->RefreshView();
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
_wxvtkbaseView->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+ #else
+ _wxvtkbaseView->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+ #endif
}
//_thresh->ThresholdBetween(_sl_minSize->GetValue(), _range[1]);
//SIL//
_cast = vtkImageCast::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_cast->SetInput(_thresh->GetOutput());
+#else
+ _cast->SetInputData(_thresh->GetOutput());
+#endif
+
_cast->SetOutputScalarTypeToUnsignedChar();
_connect = vtkImageSeedConnectivity::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_connect->SetInput(_cast->GetOutput());
+#else
+ _connect->SetInputData(_cast->GetOutput());
+#endif
_connect->SetInputConnectValue(255);
_connect->SetOutputConnectedValue(255);
_connect->SetOutputUnconnectedValue(0);
cast3 = vtkImageCast::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
cast3->SetInput(_connect->GetOutput());
+#else
+ cast3->SetInputData(_connect->GetOutput());
+#endif
cast3->SetOutputScalarTypeToUnsignedShort();
_thresh2 = vtkImageThreshold::New();
//SIL//_thresh2->ThresholdBetween(_sl_minSize->GetValue(), _sl_maxSize->GetValue());
cast2 = vtkImageCast::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
cast2->SetInput(_thresh2->GetOutput());
+#else
+ cast2->SetInputData(_thresh2->GetOutput());
+#endif
cast2->SetOutputScalarTypeToUnsignedChar();
_connect2 = vtkImageSeedConnectivity::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_connect2->SetInput(cast2->GetOutput());
+#else
+ _connect2->SetInputData(cast2->GetOutput());
+#endif
_connect2->SetInputConnectValue(255);
_connect2->SetOutputConnectedValue(255);
_connect2->SetOutputUnconnectedValue(0);
cast4 = vtkImageCast::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
cast4->SetInput(_connect2->GetOutput());
+#else
+ cast4->SetInputData(_connect2->GetOutput());
+#endif
cast4->SetOutputScalarTypeToUnsignedShort();
}
_thresh->RemoveAllInputs();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_thresh->SetInput(_imagedata);
+#else
+ _thresh->SetInputData(_imagedata);
+#endif
_thresh->ThresholdBetween(sl_barrange_segmentation->GetStart(), sl_barrange_segmentation->GetEnd());
_thresh->Update();
//cast3->Update();
//SIL//
_thresh2->RemoveAllInputs();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_thresh2->SetInput(_imagedata);
+#else
+ _thresh2->SetInputData(_imagedata);
+#endif
+
_thresh2->ThresholdBetween(sl_barrange_segmentation->GetStart(), sl_barrange_segmentation->GetEnd());
_thresh2->Update();
cast2->Update();
puntoactualprov[1] = y;
puntoactualprov[2] = z;
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_imagedata->UpdateInformation();
_imagedata->SetUpdateExtent(_imagedata->GetWholeExtent());
_imagedata->Update();
+#else
+ // ..
+#endif
_imagedata->GetSpacing(espprin);
_imagedata->GetExtent(extprin);
// Visualisation - result volume
_2_isoMC6 = vtkMarchingCubes::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_2_isoMC6->SetInput(cast4->GetOutput());
+#else
+ _2_isoMC6->SetInputData(cast4->GetOutput());
+#endif
_2_isoMC6->SetValue(0, 128);
_2_isoMC6->Update();
_2_isoMapperMC6 = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_2_isoMapperMC6->SetInput(_2_isoMC6->GetOutput());
+#else
+ _2_isoMapperMC6->SetInputData(_2_isoMC6->GetOutput());
+#endif
+
+
_2_isoMapperMC6->ScalarVisibilityOff();
_2_isoMapperMC6->ImmediateModeRenderingOn();
{
vtkMetaImageWriter *writer= vtkMetaImageWriter::New();
writer->SetFileName( dialog.GetPath().mb_str(wxConvUTF8) );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
writer->SetInput(cast4->GetOutput());
+#else
+ writer->SetInputData(cast4->GetOutput());
+#endif
writer->Write();
writer->Delete();
}
vtkSTLReader *imgReader= vtkSTLReader::New();
imgReader->SetFileName( dialog.GetPath().mb_str(wxConvUTF8) );
_loadSTLMapper = vtkPolyDataMapper::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_loadSTLMapper->SetInput(imgReader->GetOutput());
+#else
+ _loadSTLMapper->SetInputData(imgReader->GetOutput());
+#endif
_loadActorSTL = vtkActor::New();
_loadActorSTL->SetMapper(_loadSTLMapper);
_loadActorSTL->GetProperty()->SetColor( 1, 0, 0);
stlInterna = vtkPolyData::New();
dsm1 = vtkPolyDataMapper ::New();
- dsm1->SetInput (stlInterna);
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ dsm1->SetInput(stlInterna);
+#else
+ dsm1->SetInputData(stlInterna);
+#endif
dsm1->ScalarVisibilityOff();
actorInternal = vtkActor::New();
actorInternal->GetProperty()->SetColor (0,1,0);
dsm2 = vtkPolyDataMapper ::New();
- dsm2->SetInput (stlExterna);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ dsm2->SetInput(stlExterna);
+#else
+ dsm2->SetInputData(stlExterna);
+#endif
+
dsm2->ScalarVisibilityOff();
actorExternal= vtkActor::New();
// wxDirDialog dialog( this, "Choose a directory...", ( !dirSTL.IsEmpty( ) )?dirSTL: wxGetHomeDir( ) );
+
+
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
wxFileDialog dialog( this, _T("Choose a directory..."), dirSTL , _T(""), _T("*.*"), wxSAVE );
+ #else
+ wxFileDialog dialog( this, _T("Choose a directory..."), dirSTL , _T(""), _T("*.*"), wxFD_SAVE );
+ #endif
if( dialog.ShowModal( ) == wxID_OK )
// 1.1. Se hace un filtro triangular puesto que el stl writer solo recibe poligonos triangulares.
- vtkTriangleFilter *filtro = vtkTriangleFilter::New();
+ vtkClosePolyData *cpd = vtkClosePolyData::New();
+ vtkTriangleFilter *filtro = vtkTriangleFilter::New();
+ vtkPolyDataConnectivityFilter *pdcf = vtkPolyDataConnectivityFilter::New();
+
+ // 1.2 se escribe a disco el archivo stl de la superficie interna
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
filtro->SetInput(stlInterna);
- vtkPolyDataConnectivityFilter *pdcf = vtkPolyDataConnectivityFilter::New();
pdcf->SetInput( filtro->GetOutput() );
- vtkClosePolyData *cpd = vtkClosePolyData::New();
cpd->SetInput( pdcf->GetOutput() );
-
- // 1.2 se escribe a disco el archivo stl de la superficie interna
cpd->Update();
+#else
+ filtro->SetInputData(stlInterna);
+ pdcf->SetInputData( filtro->GetOutput() );
+ cpd->SetInputData( pdcf->GetOutput() );
+#endif
vtkSTLWriter *writerI = vtkSTLWriter::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
writerI->SetInput( cpd->GetOutput() );
+#else
+ writerI->SetInputData( cpd->GetOutput() );
+#endif
// prefix = fileprefix;
filename=prefix+"_internal.stl";
writerI->SetFileName(filename.c_str());
writerI->Delete();
// 1.3 se escribe a disco el archivo stl de la superficie externa
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
filtro->SetInput(stlExterna);
+#else
+ filtro->SetInputData(stlExterna);
+#endif
cpd->Update();
vtkSTLWriter *writerE = vtkSTLWriter::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
writerE->SetInput( cpd->GetOutput() );
+#else
+ writerE->SetInputData( cpd->GetOutput() );
+#endif
// prefix = fileprefix;
filename=prefix+"_external.stl";
writerE->SetFileName( filename.c_str() );
#define _wxVTKRenderWindowInteractorEditContour_h_
- #include <wxVTKRenderWindowInteractor.h>
+ #include <creawxVTKRenderWindowInteractor.h>
#include <vtkCommand.h>
#include <vtkImageData.h>
if (event == vtkCommand::ResetWindowLevelEvent)
{
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
this->IV->GetInput()->UpdateInformation();
this->IV->GetInput()->SetUpdateExtent
(this->IV->GetInput()->GetWholeExtent());
this->IV->GetInput()->Update();
+#else
+ //..
+#endif
+
double *range = this->IV->GetInput()->GetScalarRange();
this->IV->SetColorWindow(range[1] - range[0]);
this->IV->SetColorLevel(0.5 * (range[1] + range[0]));
double InitialLevel;
};
- class wxVTKRenderWindowInteractor;
+ class crea::wxVTKRenderWindowInteractor;
class vtkInteractorStyle2DMaracas : public vtkInteractorStyleImage{
public:
- class wxVTKRenderWindowInteractorEditContour : public wxVTKRenderWindowInteractor {
+ class wxVTKRenderWindowInteractorEditContour : public crea::wxVTKRenderWindowInteractor {
public:
int x1 = 1,x2 = 1,y1 = 1,y2 = 1,z1 = 1,z2 = 1;
wxVtkBaseView::Configure();
- wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
+ crea::wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
vtkImageData *imageData = GetVtkBaseData()->GetImageData();
if(imageData){
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
imageData->UpdateInformation();
imageData->SetUpdateExtent( imageData->GetWholeExtent());
imageData->Update();
_imageViewer2XYZ->GetVtkImageViewer2()->SetInput(imageData );
+#else
+ _imageViewer2XYZ->GetVtkImageViewer2()->SetInputData(imageData );
+#endif
imageData->GetSpacing (spx,spy,spz);
imageData->GetExtent (x1,x2,y1,y2,z1,z2);
}
{
if (_imageViewer2XYZ!=NULL)
{
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_imageViewer2XYZ->GetVtkImageViewer2()->SetInput( imageData );
+#else
+ _imageViewer2XYZ->GetVtkImageViewer2()->SetInputData( imageData );
+#endif
} // if _imageViewer2XYZ
}
if (_imageViewer2XYZ==NULL)
{
_imageViewer2XYZ = new vtkImageViewer2_XYZ();
- wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
+ crea::wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
_imageViewer2XYZ -> GetVtkImageViewer2()->SetupInteractor ( iren );
//////////////
vtkImageData *imageData = GetVtkBaseData()->GetMarImageData()->GetImageData();
if (imageData!=NULL)
{
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
imageData->UpdateInformation();
imageData->SetUpdateExtent( imageData->GetWholeExtent());
imageData->Update();
+#else
+ //...
+#endif
+
if (okimage==true){
imageData->GetSpacing (spx,spy,spz);
imageData->GetExtent (x1,x2,y1,y2,z1,z2);
void wxVtk2DBaseView::SetInteractorStyleImage(vtkInteractorStyleBaseView *interactorstylebaseview)
{
SetInteractorStyleBaseView(interactorstylebaseview);
- wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
+ crea::wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
interactorstylebaseview->SetInteractor ( iren );
iren->SetInteractorStyle(interactorstylebaseview);
interactorstylebaseview->SetwxVtkBaseView(this);
_wxvtkclipping3Dview->Refresh();
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
_wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+ #else
+ _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+ #endif
- }
+ } // if idTissue
}
//-------------------------------------------------------------------
_wxvtkclipping3Dview->Refresh();
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
_wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+ #else
+ _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+ #endif
+
}
//-------------------------------------------------------------------
void wxVtkClipping3DViewCntrlPanel::OnVisibleBoxSurface(wxCommandEvent& event)
float b=dlgColour.GetColourData().GetColour().Blue()/255;
tmpActor->GetProperty()->SetColor( r , g , b );
_color->SetBackgroundColour(dlgColour.GetColourData().GetColour());
-
_wxvtkclipping3Dview->Refresh();
-
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
_wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
- }
- }
+ #else
+ _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+ #endif
+ } // if ShowModal
+ } // if idTissue
}
+
//-------------------------------------------------------------------
void wxVtkClipping3DViewCntrlPanel::OnVisibleSurface(wxCommandEvent& event)
{
if (idTissue!=-1)
{
_wxvtkclipping3Dview->VisibleActor(idTissue, _visible->GetValue());
-
_wxvtkclipping3Dview->Refresh();
-
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
_wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
- }
+ #else
+ _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+ #endif
+ } // if idTissue
}
//-------------------------------------------------------------------
void wxVtkClipping3DViewCntrlPanel::OnOpacity(wxScrollEvent& event)
tmpActor = _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueActor(idTissue);
float opacity=_opacity->GetValue();
tmpActor->GetProperty()->SetOpacity( opacity/100 );
-
_wxvtkclipping3Dview->Refresh();
-
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
_wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
- }
+ #else
+ _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+ #endif
+ } // if idTissue
}
//----------------------------------------------------------------------------
_wxvtkclipping3Dview->Refresh();
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
_wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
- }
+ #else
+ _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+ #endif
+
+ } // if idTissue
}
//-------------------------------------------------------------------
wxString dirSTL = wxGetHomeDir( ) ;
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
wxFileDialog dialog( this, _T("Choose a directory..."), dirSTL , _T(""), _T("*.*"), wxSAVE );
+ #else
+ wxFileDialog dialog( this, _T("Choose a directory..."), dirSTL , _T(""), _T("*.*"), wxFD_SAVE );
+ #endif
if( dialog.ShowModal( ) == wxID_OK )
{
vtkTriangleFilter *filtro = vtkTriangleFilter::New();
- filtro->SetInput( this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueClipper(idTissue)->GetOutput() );
vtkPolyDataConnectivityFilter *pdcf = vtkPolyDataConnectivityFilter::New();
- pdcf->SetInput( filtro->GetOutput() );
vtkClosePolyData *cpd = vtkClosePolyData::New();
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ filtro->SetInput( this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueClipper(idTissue)->GetOutput() );
+ pdcf->SetInput( filtro->GetOutput() );
cpd->SetInput( pdcf->GetOutput() );
+#else
+ filtro->SetInputData( this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueClipper(idTissue)->GetOutput() );
+ pdcf->SetInputData( filtro->GetOutput() );
+ cpd->SetInputData( pdcf->GetOutput() );
+#endif
// 1.2 se escribe a disco el archivo stl de la superficie interna
cpd->Update();
vtkSTLWriter *writer = vtkSTLWriter::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
writer->SetInput( cpd->GetOutput() );
+#else
+ writer->SetInputData( cpd->GetOutput() );
+#endif
+
filename =prefix;
writer->SetFileName(filename.c_str());
writer->SetFileTypeToASCII();
//-------------------------------------------------------------------
void wxVtkClipping3DViewCntrlPanel::OnBtnSaveRawVolume(wxCommandEvent& event)
{
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
wxFileDialog dialog(this, _T("Choose a file"), _T(""), _T(""), _T("*.maracas"), wxSAVE );
+ #else
+ wxFileDialog dialog(this, _T("Choose a file"), _T(""), _T(""), _T("*.maracas"), wxFD_SAVE );
+ #endif
if (dialog.ShowModal() == wxID_OK)
{
std::string directory = (const char*) (dialog.GetDirectory().mb_str() );
//_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadVolumeFunctions();
_wxvtkclipping3Dview->Refresh();
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
_wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+ #else
+ _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+ #endif
+
+
/*
volumeMapper->Update();
size=greyctf->size();
for(i=0;i<size;i++)
{
- double grey2=(*greyctf)[i];
- double red =(*rctf)[i];
- double green =(*gctf)[i];
- double blue = (*bctf)[i];
+ double grey2 = (*greyctf)[i];
+ double red = (*rctf)[i];
+ double green = (*gctf)[i];
+ double blue = (*bctf)[i];
ctfun->AddRGBPoint(grey2,red,green,blue);
}
//_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadVolumeFunctions();
_wxvtkclipping3Dview->Refresh();
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
_wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+ #else
+ _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+ #endif
/*
volumeMapper->Update();
//-------------------------------------------------------------------
void wxVtkClipping3DViewCntrlPanel::OnBtnMeshVTKLoad(wxCommandEvent& event)
{
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
wxFileDialog dialog(this, _T("Choose a file"), _T("c:/Maracas_configuration"),_T(""), _T("*.vtk"), wxOPEN);
if (dialog.ShowModal() == wxID_OK)
{
_wxvtkclipping3Dview->Refresh();
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
_wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
- }
+ } // if
+ #else
+ wxFileDialog dialog(this, _T("Choose a file"), _T("c:/Maracas_configuration"),_T(""), _T("*.vtk"), wxFD_OPEN);
+ if (dialog.ShowModal() == wxID_OK)
+ {
+ _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadMeshVTK( dialog.GetPath().char_str() );
+ _wxvtkclipping3Dview->Refresh();
+ wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+ _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+
+ } // if
+ #endif
+
}
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
try{
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+ #else
+ _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+ #endif
}catch(char* e){
std::cout<<e<<std::endl;
}
_wxvtkmpr3Dview->Refresh();
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-
+ #else
+ _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+ #endif
}
//-------------------------------------------------------------------
void wxVtkMPR3DViewCntrlPanel::OnVisibleAxisZ(wxCommandEvent& event)
{
_wxvtkmpr3Dview->VisibleImageActor(2, event.IsChecked() );
_wxvtkmpr3Dview->Refresh();
-
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+ #else
+ _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+ #endif
}
//-------------------------------------------------------------------
void wxVtkMPR3DViewCntrlPanel::OnVisiblePlane(wxCommandEvent& event)
{
_wxvtkmpr3Dview->VisiblePlaneWidget(event.IsChecked());
-
}
//-------------------------------------------------------------------
_wxvtkmpr3Dview->RefreshView();
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+ #else
+ _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+ #endif
}
//-------------------------------------------------------------------
void wxVtkMPR3DViewCntrlPanel::OnPositionY(wxScrollEvent& event)
_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetY( _positionY->GetValue() );
_wxvtkmpr3Dview->RefreshView();
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+ #else
+ _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+ #endif
}
//-------------------------------------------------------------------
void wxVtkMPR3DViewCntrlPanel::OnPositionZ(wxScrollEvent& event)
_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetZ( _positionZ->GetValue() );
_wxvtkmpr3Dview->RefreshView();
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+ #else
+ _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+ #endif
}
_wxvtkmpr3Dview->Refresh();
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+ #else
+ _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+ #endif
}
//-------------------------------------------------------------------
_wxvtkmpr3Dview->Refresh();
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+ #else
+ _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+ #endif
}
//-------------------------------------------------------------------
_wxvtkmpr3Dview->Refresh();
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+ #else
+ _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+ #endif
}
//-------------------------------------------------------------------
_wxvtkmpr3Dview->Refresh();
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+ #else
+ _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+ #endif
+
}