vtkRenderer *render = bbGetInputRenderer();
vtkImageData *img = bbGetInputIn();
vtkLinearTransform* transform = bbGetInputTransform();
-
- if(img != NULL)
++
++
++ if(img != NULL)
+ {
+ if (bbGetInputLookupTable()==NULL)
+ {
+ imageactor->SetInput( img );
+ } else {
+ /*
+ vtkLookupTable *table = vtkLookupTable::New();
+ table->SetRange(0, 1000); // image intensity range
+ table->SetValueRange(0.0, 1.0); // from black to white
+ table->SetSaturationRange(0.0, 0.0); // no color saturation
+ table->SetRampToLinear();
+ table->Build();
+ double rgba[4];
+ table->GetTableValue(0,rgba);
+ rgba[3]=0;
+ table->SetTableValue(0,rgba);
+ */
- if(img != NULL){
-
- //EED 2017-01-01 Migration VTK7
- #if VTK_MAJOR_VERSION <= 5
- imageshiftscale->SetInput( img );
- #else
- imageshiftscale->SetInputData( img );
- #endif
- imageshiftscale->SetOutputScalarTypeToUnsignedChar();
-
- //EED 2017-01-01 Migration VTK7
- #if VTK_MAJOR_VERSION <= 5
- imageactor->SetInput( imageshiftscale->GetOutput() );
- #else
- imageshiftscale->Update();
- imageactor->SetInputData( imageshiftscale->GetOutput() );
- #endif
- if (transform!=NULL){
+
+ /*
+ vtkLookupTable *table = vtkLookupTable::New();
+ table->SetTableRange (0, 2000);
+ table->SetHueRange (1, 0);
+ table->SetSaturationRange (1, 1);
+ table->SetValueRange (1, 1);
+ table->Build(); //effective built
+ */
+
+ /*
+ vtkColorTransferFunction *table = vtkColorTransferFunction::New();
+ table->SetColorSpaceToHSV();
+ table->HSVWrapOff();
+ table->AddHSVSegment(0.0, 0.6, 1.0, 1.0,
+ 1.0, 0.0, 1.0, 1.0);
+ table->SetNanColor(1.0, 0.0, 1.0);
+ */
+
+ /*
+ printf("EED ImageActor::Process Warnning ***************************Not here this code *");
+ vtkLookupTable *table = vtkLookupTable::New();
+ table->SetNumberOfTableValues(1000);
+ table->SetRange(0, 1000);
+ table->Build();
+ double rgba1[4];
+ double rgba2[4];
+ for (int iLookTable = 0; iLookTable<500; iLookTable++)
+ {
+ table->GetTableValue( iLookTable, rgba1);
+ table->GetTableValue(1000-1-iLookTable, rgba2);
+ table->SetTableValue(1000-1-iLookTable , rgba1[0],rgba1[1],rgba1[2],rgba1[3]);
+ table->SetTableValue( iLookTable , rgba2[0],rgba2[1],rgba2[2],rgba2[3]);
+ } // for iLookTable
+ double rgba[4];
+ table->GetTableValue(0,rgba);
+ rgba[3]=0;
+ table->SetTableValue(0,rgba);
+ */
+ vtkImageMapToColors *color = vtkImageMapToColors::New();
+ color->SetLookupTable( bbGetInputLookupTable() );
+ // color->SetLookupTable( table );
+ color->PassAlphaToOutputOn();
+
+ // imageshiftscale->SetInput( img );
+ // imageshiftscale->SetOutputScalarTypeToUnsignedChar();
+
+ // color->SetInput( imageshiftscale->GetOutput() );
+ color->SetInput( img );
+ color->Update();
+ imageactor->GetMapper()->SetInput( color->GetOutput() );
+ imageactor->GetProperty()->SetInterpolationTypeToNearest();
+ }
+
+ if (transform!=NULL)
+ {
imageactor->SetUserTransform( transform );
} // transform
- if(render != NULL ){
- render->AddActor( imageactor );
+ if(render != NULL )
+ {
+ // render->AddActor( imageactor );
} // render
bbSetOutputOut(imageactor);
} // img
}
mchange = vtkImageChangeInformation::New();
img->GetExtent( ext );
- double origin[3];
- origin[0]=0.0;
- origin[1]=0.0;
- origin[2]=0.0;
- img->SetOrigin(origin);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
mchange->SetInput( img );
- //EED 2016 15 06
- // mchange->SetExtentTranslation( -ext[0], -ext[2], -ext[4] );
- mchange->SetOutputOrigin (0, 0, 0);
+#else
+ mchange->SetInputData( img );
+#endif
+
mchange->SetOutputExtentStart(0,0,0);
if (bbGetInputNewSpacing().size()==3)
{
spc[2] = bbGetInputNewSpacing()[2];
mchange->SetOutputSpacing( spc[0] , spc[1] , spc [2] ); //spacing
}
+ if (bbGetInputNewOrigin().size()==3)
+ {
+ if ( (bbGetInputNewOrigin()[0]==-1) && (bbGetInputNewOrigin()[1]==-1) && (bbGetInputNewOrigin()[2]==-1) )
+ {
+ img->GetOrigin( origin );
+ } else {
+ origin[0] = bbGetInputNewOrigin()[0];
+ origin[1] = bbGetInputNewOrigin()[1];
+ origin[2] = bbGetInputNewOrigin()[2];
+ }
+ } else {
+ origin[0] = 0;
+ origin[1] = 0;
+ origin[2] = 0;
+ }
+ mchange->SetOutputOrigin( origin );
+ mchange->Modified(); //important
mchange->Update(); //important
bbSetOutputOut( mchange->GetOutput() );
- } // img
+ } // if img
++
}
+
void ImageChangeInformation::bbUserSetDefaultValues()
{
- mchange = NULL;
- bbSetOutputOut( NULL);
- bbSetInputIn(NULL);
+ mchange = NULL;
+ bbSetOutputOut( NULL);
+ bbSetInputIn(NULL);
}
void ImageChangeInformation::bbUserInitializeProcessing()
imagedataValueResult->Delete();
}
imagedataValueResult = vtkImageData::New();
++<<<<<<< HEAD
+ // imagedataValueResult->SetScalarType(scalartype);
++=======
+
+ //EED 2017-12-18
+ imagedataValueResult->SetScalarType(scalartype);
+ //imagedataValueResult->SetScalarTypeToUnsignedShort();
+
++>>>>>>> master
imagedataValueResult->SetSpacing(spc);
imagedataValueResult->SetDimensions( newDim );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ imagedataValueResult->SetScalarTypeToUnsignedShort();
imagedataValueResult->AllocateScalars();
+#else
+ imagedataValueResult->AllocateScalars(VTK_UNSIGNED_SHORT,1);
+#endif
+
if (imagedataMaskResult!=NULL)
{
imagedataMaskResult->Delete();
}
imagedataMaskResult = vtkImageData::New();
++<<<<<<< HEAD
+ // imagedataMaskResult->SetScalarType(scalartype);
++=======
+
+ //EED 2017-12-18
+ // imagedataMaskResult->SetScalarType(scalartype);
+ // imagedataMaskResult->SetScalarTypeToUnsignedShort();
+ imagedataMaskResult->SetScalarTypeToUnsignedChar();
+
++>>>>>>> master
imagedataMaskResult->SetSpacing(spc);
imagedataMaskResult->SetDimensions( newDim );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ imagedataMaskResult->SetScalarTypeToUnsignedShort();
imagedataMaskResult->AllocateScalars();
+#else
+ imagedataMaskResult->AllocateScalars(VTK_UNSIGNED_SHORT,1);
+#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
+
+ _thresholdActor->SetOpacity(_opacity);
_scalarbarActor->SetLookupTable( _thresholdTable );
// _scalarbarActor->SetLookupTable( _thresholdMapper->GetLookupTable() );
_scalarbarActor->SetTitle("Value");
if (_stateWindowLevel==true)
{
int tmpPx,tmpPy;
- wxVTKRenderWindowInteractor *wxVTKiren;
+ crea::wxVTKRenderWindowInteractor *wxVTKiren;
wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
wxVTKiren->GetEventPosition( tmpPx , tmpPy );
-
double colorWin;
double colorLev;
-
vtkImageData* imgrange = ((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->GetVtkBaseData()->GetImageData();
-
- if(imgrange != NULL){
+ if(imgrange != NULL)
+ {
double* scalarrange = imgrange->GetScalarRange();
- double scalarr = scalarrange[1] - scalarrange[0];
+ double scalarr;
+ if (scalarrange[1] == scalarrange[0])
+ {
+ scalarr=scalarrange[1];
+ if (scalarrange[1]==0) {scalarr=100;}
+ } else {
+ scalarr = scalarrange[1] - scalarrange[0];
+ }
//std::cout<<"scalar r="<<scalarr<<std::endl;
int w, h;
((wxWindow*)wxVTKiren)->GetSize(&w, &h);
void FillFilter::SetImages(vtkImageData *image,vtkImageData *image2) // virtual
{
baseFilterManualPaint::SetImages(image,image2);
- if (_auxImageFill != NULL)
+
+ if ((_maxX!=_maxXback) || (_maxY!=_maxYback) || (_maxZ!=_maxZback))
{
- _auxImageFill->Delete();
+ if (_auxImageFill != NULL)
+ {
+ _auxImageFill->Delete();
+ }
+ _auxImageFill = vtkImageData::New();
+ _auxImageFill->SetDimensions(_maxX + 1, _maxY + 1, _maxZ + 1);
+ _auxImageFill->SetOrigin(0, 0, 0);
+ _auxImageFill->SetExtent(0, _maxX, 0, _maxY, 0, _maxZ);
+ _auxImageFill->SetWholeExtent(0, _maxX, 0, _maxY, 0, _maxZ);
+ _auxImageFill->SetScalarTypeToUnsignedChar();
+ _auxImageFill->AllocateScalars();
+ _ptrAuxImageFill = (unsigned char *)_auxImageFill->GetScalarPointer();
+ memset(_ptrAuxImageFill, 0, (_maxX+1) * (_maxY+1) * (_maxZ+1) );
}
-
++
+ _auxImageFill = vtkImageData::New();
+ _auxImageFill->SetDimensions(_maxX + 1, _maxY + 1, _maxZ + 1);
+ _auxImageFill->SetOrigin(0, 0, 0);
+ _auxImageFill->SetExtent(0, _maxX, 0, _maxY, 0, _maxZ);
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ _auxImageFill->SetWholeExtent(0, _maxX, 0, _maxY, 0, _maxZ);
+ _auxImageFill->SetScalarTypeToUnsignedChar();
+ _auxImageFill->AllocateScalars();
+#else
+ _auxImageFill->AllocateScalars(VTK_UNSIGNED_CHAR,1);
+#endif
+
+ _maxXback=_maxX;
+ _maxYback=_maxY;
+ _maxYback=_maxZ;
}
+
//---------------------------------------------------------------------------
void FillFilter::Run() // virtual
{
{
_image = image;
_image2 = image2;
-
int ext[6];
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_image->GetWholeExtent(ext);
+#else
+ _image->GetExtent(ext);
+#endif
_minX = 0;
_minY = 0;
_minZ = 0;
//-------------------------------------------------------------------
void vtkMPR3DDataViewer::SetImage()
{
- _saggitalColors -> SetInput( _vtkmprbasedata->GetImageData() );
- _axialColors -> SetInput( _vtkmprbasedata->GetImageData() );
- _coronalColors -> SetInput( _vtkmprbasedata->GetImageData() );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ _saggitalColors->SetInput( _vtkmprbasedata->GetImageData() );
+ _axialColors->SetInput( _vtkmprbasedata->GetImageData() );
+ _coronalColors->SetInput( _vtkmprbasedata->GetImageData() );
+#else
+ _saggitalColors->SetInputData( _vtkmprbasedata->GetImageData() );
+ _axialColors->SetInputData( _vtkmprbasedata->GetImageData() );
+ _coronalColors->SetInputData( _vtkmprbasedata->GetImageData() );
+#endif
+ _outlineData -> SetInput((vtkDataSet *) _vtkmprbasedata->GetImageData() );
}
//-------------------------------------------------------------------
_satLut->SetValueRange (1, 1);
*/
-
double range[2];
double delta;
-
if(_vtkmprbasedata->GetImageData())
{
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_vtkmprbasedata->GetImageData()->Update();
+#else
+ // ..
+#endif
_vtkmprbasedata->GetImageData()->Modified();
_vtkmprbasedata->GetImageData()->GetScalarRange(range);
delta = range[1]-range[0];
_saggitalColors = vtkImageMapToColors::New();
}
_saggitalColors->RemoveAllInputs();
- _saggitalColors->SetInput( _vtkmprbasedata->GetImageData() );
++
// _saggitalColors->SetLookupTable(_bwLut);
_saggitalColors->SetLookupTable(_ctfun);
-
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ _saggitalColors->SetInput( _vtkmprbasedata->GetImageData() );
+#else
+ _saggitalColors->SetInputData( _vtkmprbasedata->GetImageData() );
+ _saggitalColors->Update();
+#endif
+
+
if(_saggital==NULL)
{
_saggital = vtkImageActor::New();
{
_axialColors = vtkImageMapToColors::New();
}
-
_axialColors->RemoveAllInputs();
- _axialColors->SetInput( _vtkmprbasedata->GetImageData() );
// _axialColors->SetLookupTable(_hueLut);
_axialColors->SetLookupTable(_ctfun);
-
+
++
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ _axialColors->SetInput( _vtkmprbasedata->GetImageData() );
+#else
+ _axialColors->SetInputData( _vtkmprbasedata->GetImageData() );
+ _axialColors->Update();
+#endif
+
if(_axial==NULL)
{
_axial = vtkImageActor::New();
_coronalColors = vtkImageMapToColors::New();
}
_coronalColors->RemoveAllInputs();
- _coronalColors->SetInput( _vtkmprbasedata->GetImageData() );
// _coronalColors->SetLookupTable(_satLut);
_coronalColors->SetLookupTable(_ctfun);
+
++
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ _coronalColors->SetInput( _vtkmprbasedata->GetImageData() );
+#else
+ _coronalColors->SetInputData( _vtkmprbasedata->GetImageData() );
+ _coronalColors->Update();
+#endif
+
+
if(_coronal==NULL)
{
_coronal = vtkImageActor::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_coronal->SetInput(_coronalColors->GetOutput());
- }
+#else
+ _coronal->SetInputData(_coronalColors->GetOutput());
+#endif
+
+ } // if _coronal
-
-
// An outline provides context around the data.
//
if(_outlineData==NULL)
double spx = 0,spy = 0,spz = 0;
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){
+ if(imageData)
+ {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
imageData->UpdateInformation();
imageData->SetUpdateExtent( imageData->GetWholeExtent());
imageData->Update();
//-------------------------------------------------------------------
void wxVtk2DBaseView::SetImageToVtkViewer(vtkImageData *imageData)
{
+ int ext[6];
+ imageData->Update();
+ imageData->GetWholeExtent(ext);
if (_imageViewer2XYZ!=NULL)
{
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ _imageViewer2XYZ->SetExtentDimension( ext[0],ext[1],ext[2],ext[3],ext[4],ext[5] );
_imageViewer2XYZ->GetVtkImageViewer2()->SetInput( imageData );
+#else
+ _imageViewer2XYZ->GetVtkImageViewer2()->SetInputData( imageData );
+#endif
} // if _imageViewer2XYZ
+
+ GetRenderer()->GetActiveCamera()->SetClippingRange(0.01, 1000000);
+
}
//-------------------------------------------------------------------
_pdB->SetPoints( _ptsB );
_pdB->SetLines( linesB );
linesB->Delete(); //do not delete lines ??
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_lineBMapper->SetInput(_pdB);
+#else
+ _lineBMapper->SetInputData(_pdB);
+#endif
+
_lineBMapper->ImmediateModeRenderingOn();
- if(_imageViewer2XYZ){
+ if(_imageViewer2XYZ)
+ {
_imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineAActor );
_imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineBActor );
vtkCamera *camera =_imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->GetActiveCamera();
_ptsA->SetPoint(1, xx2 , y , z1 );
_ptsB->SetPoint(0, x , yy1, z1 );
_ptsB->SetPoint(1, x , yy2, z1 );
-
-
+ position[0] = x;
+ position[1] = y;
+ focalpoint[0] = x;
+ focalpoint[1] = y;
} // if back
-
++
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ // ..
+#else
+ _ptsA->Modified();
+ _ptsB->Modified();
+#endif
+
- _backX=xx;
- _backY=yy;
- _backZ=zz;
+ if (fixAxis2D == true)
+ {
+ GetRenderer()->GetActiveCamera()->SetPosition(position);
+ GetRenderer()->GetActiveCamera()->SetFocalPoint(focalpoint);
+ } // if GetFixAxis2D
+ _lineAActor->GetProperty()->SetOpacity( opacityAxis );
+ _lineBActor->GetProperty()->SetOpacity( opacityAxis );
+ _backX = xx;
+ _backY = yy;
+ _backZ = zz;
+ _backFixAxis2D = fixAxis2D;
+ _backOpacityAxis= opacityAxis;
} // if image
//EED 2016/02/19
int _backX;
int _backY;
int _backZ;
++
+ bool _backFixAxis2D;
+ double _backOpacityAxis;
++
bool _visibleAxis;
int _direction;
vtkPoints *_ptsA;
// Actors are added to the renderer.
vtkActor* _outlineActor = _vtkmpr3Ddataviewer->GetOutlineActor();
_wxvtk3Dbaseview->GetRenderer()->AddActor( _outlineActor );
-// _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkmpr3Ddataviewer->GetImageActor(0) ); // _saggital
-// _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkmpr3Ddataviewer->GetImageActor(1) ); // _axial
-// _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkmpr3Ddataviewer->GetImageActor(2) ); // _coronal
- // vtkPointWidget
- //if(_myCallback!=NULL){
- //_myCallback->Delete();
- //}
++
vtkmyPWCallback_3DPointWidget *_myCallback = vtkmyPWCallback_3DPointWidget::New();
_myCallback->SetWxVtkMPR3DView(this);
if(imageData){
{
_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);
-
_planeWidget->NormalToXAxisOn();
_planeWidget->SetResolution(50);
_planeWidget->SetRepresentationToOutline();
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();
++ if(_vtkplane==NULL)
++ {
+ _vtkplane = vtkPolyData::New();
+ _probe = vtkProbeFilter::New();
+ _contourMapper = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_probe->SetInput(_vtkplane);
- _contourMapper = vtkPolyDataMapper::New();
_contourMapper->SetInput( _probe->GetPolyDataOutput() );
+#else
+ _myCallback->SetVtkPolyData(_vtkplane);
+ _myCallback->SetVtkProbeFilter(_probe);
+ _planeWidget->GetPolyData(_vtkplane);
+ _probe->SetInputData(_vtkplane);
+ _probe->SetSourceData(imageData);
+// _probe->Update();
+ _contourMapper->SetInputData( _probe->GetPolyDataOutput() );
+#endif
+
_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);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_probe->SetSource( imageData );
+#else
+ _probe->SetSourceData( imageData );
+#endif
_contourMapper->SetScalarRange( imageData->GetScalarRange() );
-
ConfigureFreePlanes();
}
_wxvtk3Dbaseview->GetRenderer()->AddActor( _outlineActor );
} else {
_wxvtk3Dbaseview->GetRenderer()->RemoveActor( _outlineActor );
- }
+ } // value
-
}
//-------------------------------------------------------------------
// EED 25 Janvier 2007 testLoic
void TestLoic1();
void TestLoic2();
-
- void RemoveActor(vtkActor* actor);
-
+ void RemoveActor(vtkActor* actor);
//EED 27/05/2013
// void ResetCamera(int *ext=NULL,double* spc=NULL);
-
void setColorTransferFunction(vtkColorTransferFunction* colortable);
+
//Free planes
//-------------------------------------------------------------------
void ConfigureFreePlanes();
void FreePlaneVisible(int plane, bool ok);
void FreePlaneInteraction(bool ok);
void SetFreePlanesOrtho();
-
void SetColorWindow(double colorWindow);
void SetColorLevel(double colorLevel);
+
private:
wxVtk3DBaseView *_wxvtk3Dbaseview;
vtkMPR3DDataViewer *_vtkmpr3Ddataviewer;
// wxBoxSizer *sizerH4 = new wxBoxSizer(wxHORIZONTAL);
//CPR: If-else statements added 30 Nov 2009
+ wxFlexGridSizer *sizerV1;
wxFlexGridSizer *sizerH4;
+ wxFlexGridSizer *sizerH4a;
wxFlexGridSizer *sizerH5;
wxFlexGridSizer *sizerH6;
{
sizer = new wxFlexGridSizer(4);
sizerH4 = new wxFlexGridSizer(3);
-
- sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0);
- sizerH4->Add( new wxStaticText(panel, -1,_T("GL")) , 1, wxALL|wxEXPAND, 0);
- sizerH4->Add( new wxStaticText(panel, -1,_T("Color ")) , 1, wxALL|wxEXPAND, 0);
-
- sizerH4->Add( _positionX ,1,wxGROW , 0 );
- sizerH4->Add( _ckFreePlaneX, 1, wxALL|wxEXPAND, 0);
- sizerH4->Add( _ckBoxX ,0,wxALIGN_CENTER_VERTICAL|wxSHAPED, 0 );
-
- sizerH4->Add( _positionY ,1,wxGROW, 0 );
- sizerH4->Add( _ckFreePlaneY, 1, wxALL|wxEXPAND, 0);
- sizerH4->Add( _ckBoxY ,0,wxALIGN_CENTER_VERTICAL|wxSHAPED, 0 );
++
+ sizerH4a = new wxFlexGridSizer(3);
- sizerH4->Add( _positionZ ,1,wxGROW, 0 );
- sizerH4->Add( _ckFreePlaneZ, 1, wxALL|wxEXPAND, 0);
- sizerH4->Add( _ckBoxZ ,0,wxALIGN_CENTER_VERTICAL|wxSHAPED, 0 );
+ sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) ,1, wxALL|wxEXPAND , 0);
+ sizerH4->Add( new wxStaticText(panel, -1,_T("GL")) ,1, wxALL|wxEXPAND , 0);
+ sizerH4->Add( new wxStaticText(panel, -1,_T("Color ")),1, wxALL|wxEXPAND , 0);
+ sizerH4->Add( _positionX ,1, wxGROW , 0);
+ sizerH4->Add( _ckFreePlaneX ,1, wxALL|wxEXPAND , 0);
+ sizerH4->Add( _ckBoxX ,0, wxALIGN_CENTER_VERTICAL|wxSHAPED , 0);
+ sizerH4->Add( _positionY ,1, wxGROW , 0);
+ sizerH4->Add( _ckFreePlaneY ,1, wxALL|wxEXPAND , 0);
+ sizerH4->Add( _ckBoxY ,0, wxALIGN_CENTER_VERTICAL|wxSHAPED , 0);
+ sizerH4->Add( _positionZ ,1, wxGROW , 0);
+ sizerH4->Add( _ckFreePlaneZ ,1, wxALL|wxEXPAND , 0);
+ sizerH4->Add( _ckBoxZ ,0, wxALIGN_CENTER_VERTICAL|wxSHAPED , 0);
//EED 2016/02/19
- sizerH4->Add( _ckBoxInterpolate , 1, wxALL|wxEXPAND, 0);
- sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0);
- sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0);
-
+ sizerH4->Add( _ckBoxInterpolate ,1, wxALL|wxEXPAND , 0);
+ sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) ,1, wxALL|wxEXPAND , 0);
+ sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) ,1, wxALL|wxEXPAND , 0);
+ // sizerH4->Add( _ckBoxXYZ ,1, wxALL|wxEXPAND , 0);
+ // sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) ,1, wxALL|wxEXPAND , 0);
+ // sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) ,1, wxALL|wxEXPAND , 0);
+
+ // sizerH4a->Add( new wxStaticText(panel, -1,_T("Axis 2D:")),1, wxALL|wxEXPAND , 0);
+ sizerH4a->Add( _ckBoxXYZ ,1, wxALL|wxEXPAND , 0);
+ sizerH4a->Add( _ckBoxFixAxis2D ,1, wxALL|wxEXPAND , 0);
+ sizerH4a->Add( _opacityAxis ,1, wxALL|wxEXPAND , 0);
+
+ sizerH4->Add( sizerH4a ,1, wxALL|wxEXPAND , 0);
+ sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) ,1, wxALL|wxEXPAND , 0);
+ sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) ,1, wxALL|wxEXPAND , 0);
+
+
+
sizerH5 = new wxFlexGridSizer(1);
- sizerH5->Add( _ckBoxXYZ , 1, wxALL|wxEXPAND, 0);
- sizerH5->Add( _ckBoxPlane , 1, wxALL|wxEXPAND, 0);
- sizerH5->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0);
- ////EED 05Nov2012 sizerH5->Add( _ckBox_BW_Color_Plane , 1, wxALL|wxEXPAND, 0);
- sizerH5->Add( _ckFreePlaneInteraction , 1, wxALL|wxEXPAND, 0);
- sizerH5->Add( btnFreePlanesOrtho , 0, wxALIGN_CENTER_VERTICAL|wxSHAPED, 0 );
- sizerH5->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0);
- sizerH5->Add( btnColorTable , 0, wxALIGN_CENTER_VERTICAL|wxSHAPED, 0 );
- sizerH5->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0);
- sizerH5->Add( _cbStereo, 1, wxALL|wxEXPAND, 0);
+ sizerH5->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND , 0);
+ sizerH5->Add( _ckBoxPlane , 1, wxALL|wxEXPAND , 0);
+ sizerH5->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND , 0);
+ ////EED 05Nov2012 sizerH5->Add( _ckBox_BW_Color_Plane , 1, wxALL|wxEXPAND , 0);
+ sizerH5->Add( _ckFreePlaneInteraction , 1, wxALL|wxEXPAND , 0);
+ sizerH5->Add( btnFreePlanesOrtho , 0, wxALIGN_CENTER_VERTICAL|wxSHAPED , 0);
+ sizerH5->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND , 0);
+ sizerH5->Add( btnColorTable , 0, wxALIGN_CENTER_VERTICAL|wxSHAPED , 0);
+ sizerH5->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND , 0);
+ sizerH5->Add( _cbStereo , 1, wxALL|wxEXPAND , 0);
sizerH6 = new wxFlexGridSizer(1);
- sizerH6->Add( _ckBoxOutline , 1, wxALL|wxEXPAND, 0);
- sizerH6->Add( _ckBoxBackGroundBlack , 1, wxALL|wxEXPAND, 0);
+ sizerH6->Add( _ckBoxOutline , 1, wxALL|wxEXPAND , 0);
+ sizerH6->Add( _ckBoxBackGroundBlack , 1, wxALL|wxEXPAND , 0);
-
- sizer->Add( sizerH4 , 1, wxALL|wxGROW, 2);
+ sizer->Add( sizerH4, 1, wxALL|wxGROW, 2);
sizer->Add( sizerH5, 1, wxALL|wxEXPAND,2);
sizer->Add( sizerH6, 1, wxALL|wxEXPAND,2);
-
-
+
} else {
sizer = new wxFlexGridSizer(1);
void wxVtkMPR3DViewCntrlPanel::OnInterpolate(wxCommandEvent& event)
{
_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetInterpolate( _ckBoxInterpolate->GetValue() );
-
_wxvtkmpr3Dview->Refresh();
+ wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+ _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+ }
+ //-------------------------------------------------------------------
+ void wxVtkMPR3DViewCntrlPanel::OnFixAxis2D(wxCommandEvent& event)
+ {
+ _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetFixAxis2D( _ckBoxFixAxis2D->GetValue() );
+ _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::OnOpacityAxis(wxCommandEvent& event)
+ {
+ _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetOpacityAxis( _opacityAxis->GetValue()/100.0 );
+ _wxvtkmpr3Dview->Refresh();
+ wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+ _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
}