imageactor->GetMapper()->SetInputData( color->GetOutput() );
#endif
imageactor->GetProperty()->SetInterpolationTypeToNearest();
+ imageactor->SetForceOpaque(true);
}
if (transform!=NULL)
vtkClipping3DDataViewer::~vtkClipping3DDataViewer()
{
int i;
- for (i=0; i< VTKMPRDATA_MAXTISSUE ; i++){
+ for (i=0; i< VTKMPRDATA_MAXTISSUE ; i++)
+ {
_mCubes[i]->Delete();
_tissueStripper[i]->Delete();
_tissueMapper[i]->Delete();
_tissuePlanes[i]->Delete();
_tissueClipper[i]->Delete();
- }
+ } // for i
// Volume
_tfun->Delete();
if(_interpolation)
{
_volumeProperty->SetInterpolationTypeToLinear();
- }
- else
- {
+ } else {
_volumeProperty->SetInterpolationTypeToNearest();
- }
+ } // if _interpolation
if(_shade)
{
_volumeProperty->ShadeOn();
- }
- else
- {
+ } else {
_volumeProperty->ShadeOff();
- }
+ } // if _shade
}
#include "vtkColorTransferFunction.h"
#include "vtkVolume.h"
#include "vtkActor.h"
-#include "vtkOutlineFilter.h"
+//#include "vtkOutlineFilter.h"
#include "vtkRenderWindowInteractor.h"
((wxVtkMPR3DViewCntrlPanel*)controlPanelMPR3D)->SetVisibleZ(true);
((wxVtkMPR3DViewCntrlPanel*)controlPanelMPR3D)->SetVisibleXYZ(true);
- mwxvtkmpr3Dview->showOutlineActor(true);
+ mwxvtkmpr3Dview->showOutlineBoxActor(true);
mwxvtkmpr3Dview->Refresh();
}
mwxvtkmpr3Dview->VisibleImageActor( 2, valueZ );
mwxvtkmpr3Dview->VisiblePointWidget(valueXYZ);
mwxvtkmpr3Dview->VisiblePlaneWidget(valuePlane);
- mwxvtkmpr3Dview->showOutlineActor(true);
+ mwxvtkmpr3Dview->showOutlineBoxActor(true);
mwxvtkmpr3Dview->Refresh();
} else {
wxtabs->GetPage(id)->Disable();
mwxvtkmpr3Dview->VisibleImageActor(0, false );
mwxvtkmpr3Dview->VisibleImageActor(1, false );
mwxvtkmpr3Dview->VisibleImageActor(2, false );
- mwxvtkmpr3Dview->showOutlineActor(false);
+ mwxvtkmpr3Dview->showOutlineBoxActor(false);
mwxvtkmpr3Dview->Refresh();
wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
if(checkboxSB->GetValue())
{
wxtabs->GetPage(id)->Enable();
- }
- else
- {
+ } else {
wxtabs->GetPage(id)->Disable();
- }
+ } // if checkboxSB
}
catch(char* str){
std::cout << "Exception : " << str << '\n';
double range[2];
vtkImageData *vtkimagedata = wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
vtkimagedata->GetScalarRange( range );
- _isoValue->SetRange( (int)(range[1]*0.1) , (int)(range[1]) );
+//EED 2020-11-25 _isoValue->SetRange( (int)(range[1]*0.1) , (int)(range[1]) );
+ _isoValue->SetRange( (int)(range[0]) , (int)(range[1]) );
_isoValue->SetValue( (int)(wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetIsovalue(0)) );
//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
}
//CPR: Method added 30 Nov 2009
-void wxVtkMPR3DView::showOutlineActor(bool value)
+void wxVtkMPR3DView::showOutlineBoxActor(bool value)
{
vtkActor* _outlineActor = _vtkmpr3Ddataviewer->GetOutlineActor();
if(value == true)
} // value
}
+//-------------------------------------------------------------------
+void wxVtkMPR3DView::showOutlinePlaneActor(bool value)
+{
+ vtkProperty *prop1=NULL;
+ if(value == true)
+ {
+ prop1 = _planeWidgetX ->GetPlaneProperty();
+ prop1->SetOpacity(1);
+ prop1 = _planeWidgetY ->GetPlaneProperty();
+ prop1->SetOpacity(1);
+ prop1 = _planeWidgetZ ->GetPlaneProperty();
+ prop1->SetOpacity(1);
+ } else {
+ prop1 = _planeWidgetX ->GetPlaneProperty();
+ prop1->SetOpacity(0);
+ prop1 = _planeWidgetY ->GetPlaneProperty();
+ prop1->SetOpacity(0);
+ prop1 = _planeWidgetZ ->GetPlaneProperty();
+ prop1->SetOpacity(0);
+ } // value
+}
+
+
//-------------------------------------------------------------------
void wxVtkMPR3DView::SetVtkMPR3DDataViewer(vtkMPR3DDataViewer *vtkmpr3Ddataviewer)
{
vtkMPR3DDataViewer* GetVtkMPR3DDataViewer();
wxVtk3DBaseView* GetWxvtk3Dbaseview() throw (char*);
void InitOrientationPointWidget();
- void showOutlineActor(bool value);
+ void showOutlineBoxActor(bool value);
+ void showOutlinePlaneActor(bool value);
// EED 25 Janvier 2007 testLoic
void TestLoic1();
void TestLoic2();
_ckBoxXYZ->SetValue(false);
////EED 05Nov2012 _ckBox_BW_Color_Plane->SetValue(true);
_ckBoxPlane->SetValue(false);
- _ckBoxOutline= new wxCheckBox(panel,-1,_T("Outline"));
- _ckBoxOutline->SetValue(true);
_ckBoxInterpolate= new wxCheckBox(panel,-1,_T("Interpolate"));
_ckBoxInterpolate->SetValue(true);
+ _ckBoxOutlineBox= new wxCheckBox(panel,-1,_T("Outline Box"));
+ _ckBoxOutlineBox->SetValue(true);
+ _ckBoxOutlinePlane= new wxCheckBox(panel,-1,_T("Outline Plane"));
+ _ckBoxOutlinePlane->SetValue(true);
+ _ckBoxBackGroundBlack= new wxCheckBox(panel,-1,_T("Background Black"));;
+ _ckBoxBackGroundBlack->SetValue(false);
+
_ckBoxBackGroundBlack= new wxCheckBox(panel,-1,_T("Background Black"));;
_ckBoxBackGroundBlack->SetValue(false);
Connect(btnFreePlanesOrtho->GetId() , wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnFreePlanesOrtho );
Connect(_ckFreePlaneInteraction->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneInteraction );
Connect(_cbStereo->GetId() , wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnSetStereo );
- Connect(_ckBoxOutline->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnOutline );
+ Connect(_ckBoxOutlineBox->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnOutlineBox );
+ Connect(_ckBoxOutlinePlane->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnOutlinePlane );
Connect(_ckBoxBackGroundBlack->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnBackGroundBlack );
Connect(_ckBoxInterpolate->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnInterpolate );
Connect(_ckBoxFixAxis2D->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnFixAxis2D );
sizerH5->Add( _cbStereo , 1, wxALL|wxEXPAND , 0);
sizerH6 = new wxFlexGridSizer(1);
- sizerH6->Add( _ckBoxOutline , 1, wxALL|wxEXPAND , 0);
+ sizerH6->Add( _ckBoxOutlineBox , 1, wxALL|wxEXPAND , 0);
+ sizerH6->Add( _ckBoxOutlinePlane , 1, wxALL|wxEXPAND , 0);
sizerH6->Add( _ckBoxBackGroundBlack , 1, wxALL|wxEXPAND , 0);
sizer->Add( sizerH4, 1, wxALL|wxGROW, 2);
//-------------------------------------------------------------------
-void wxVtkMPR3DViewCntrlPanel::OnOutline(wxCommandEvent& event)
+void wxVtkMPR3DViewCntrlPanel::OnOutlineBox(wxCommandEvent& event)
{
- _wxvtkmpr3Dview->showOutlineActor( _ckBoxOutline->GetValue() );
+ _wxvtkmpr3Dview->showOutlineBoxActor( _ckBoxOutlineBox->GetValue() );
_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->Refresh();
+}
+//-------------------------------------------------------------------
+void wxVtkMPR3DViewCntrlPanel::OnOutlinePlane(wxCommandEvent& event)
+{
+ _wxvtkmpr3Dview->showOutlinePlaneActor( _ckBoxOutlinePlane->GetValue() );
+ _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->Refresh();
}
//-------------------------------------------------------------------
void OnVisibleFreePlaneInteraction(wxCommandEvent& event);
void OnSetStereo(wxCommandEvent& event);
void OnFreePlanesOrtho(wxCommandEvent& event);
- void OnOutline(wxCommandEvent& event);
+ void OnOutlineBox(wxCommandEvent& event);
+ void OnOutlinePlane(wxCommandEvent& event);
void OnBackGroundBlack(wxCommandEvent& event);
void OnInterpolate(wxCommandEvent& event);
void OnFixAxis2D(wxCommandEvent& event);
wxComboBox *_cbStereo;
- wxCheckBox *_ckBoxOutline;
+ wxCheckBox *_ckBoxOutlineBox;
+ wxCheckBox *_ckBoxOutlinePlane;
wxCheckBox *_ckBoxBackGroundBlack;
wxCheckBox *_ckBoxInterpolate;