_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);
_ckBoxBackGroundBlack= new wxCheckBox(panel,-1,_T("Background Black"));;
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(_ckBoxBackGroundBlack->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnBackGroundBlack );
+ Connect(_ckBoxBackGroundBlack->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnBackGroundBlack );
+ Connect(_ckBoxInterpolate->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnInterpolate );
wxFlexGridSizer *sizer;
if(align)
{
- sizer = new wxFlexGridSizer(4);
+ sizer = new wxFlexGridSizer(4);
sizerH4 = new wxFlexGridSizer(3);
sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 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);
}
//-------------------------------------------------------------------
-void wxVtkMPR3DViewCntrlPanel::UpdateControlPanel()
+void wxVtkMPR3DViewCntrlPanel::UpdateControlPanel(bool firsttime)
{
vtkMPRBaseData* basedata = _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData();
if(basedata != NULL){
vtkImageData* img = basedata->GetImageData();
int x0,x1,y0,y1,z0,z1;
- if(img){
+ if(img)
+ {
img->GetExtent(x0,x1,y0,y1,z0,z1);
_positionX->SetRange(x0,x1);
_positionY->SetRange(y0,y1);
_positionZ->SetRange(z0,z1);
- _positionX->SetValue((x0+x1)/2);
- _positionY->SetValue((y0+y1)/2);
- _positionZ->SetValue((z0+z1)/2);
+ if (firsttime==true)
+ {
+ _positionX->SetValue((x0+x1)/2);
+ _positionY->SetValue((y0+y1)/2);
+ _positionZ->SetValue((z0+z1)/2);
+ } // if firsttime
//EED 12April2012 This make a floting window in MacOs and Linux with for windows
// _positionX->Update();
}
}
+//-------------------------------------------------------------------
+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);
+
+}
+