//wxVtk2DBaseView *wxvtk2dbaseview = (wxVtk2DBaseView*)this->_theViewPanel->getWxVtkBaseView();
//vtkImageViewer2 *imageviewer = wxvtk2dbaseview->_imageViewer2XYZ->GetVtkImageViewer2();
//int colorwindow = (int)imageviewer->GetWindowLevel()->GetLevel();
- //int windowlevel = (int)imageviewer->GetWindowLevel()->GetWindow();
+ //int windowlevel = (int)imageviewer->GetWindowLevel()->GetWindow();
int colorwindow = interfMainPanel::getInstance()->getColorWindow();
int windowlevel = interfMainPanel::getInstance()->getWindowLevel();
int min = (int)floor (range[0]);
int max = (int)ceil (range[1]);
-
+
_brithtnessWindowLevel = new wxSlider(this, -1, windowlevel , min, max, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
_brithtnessColorLevel = new wxSlider(this, -1, colorwindow , min, max, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
_interpolationCheckBox = new wxCheckBox(this, -1, _T("Image interpolation") );
- _interpolationCheckBox->SetValue(true);
+ _interpolationCheckBox->SetValue(true);
- Connect( _withOfContourLine->GetId(), wxEVT_SCROLL_CHANGED, (wxObjectEventFunction) &interfConfigurationPanel::onWidthOfContour);
- Connect( _withOfContourLine->GetId(), wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction) &interfConfigurationPanel::onWidthOfContour);
+ Connect( _withOfContourLine->GetId(), wxEVT_SCROLL_CHANGED, (wxObjectEventFunction) &interfConfigurationPanel::onWidthOfContour);
+ Connect( _withOfContourLine->GetId(), wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction) &interfConfigurationPanel::onWidthOfContour);
- Connect( _brithtnessWindowLevel->GetId(), wxEVT_SCROLL_CHANGED, (wxObjectEventFunction) &interfConfigurationPanel::onBrigthnessColorWindowLevel);
- Connect( _brithtnessWindowLevel->GetId(), wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction) &interfConfigurationPanel::onBrigthnessColorWindowLevel);
- Connect( _brithtnessColorLevel->GetId() , wxEVT_SCROLL_CHANGED, (wxObjectEventFunction) &interfConfigurationPanel::onBrigthnessColorWindowLevel);
- Connect( _brithtnessColorLevel->GetId() , wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction) &interfConfigurationPanel::onBrigthnessColorWindowLevel);
+ Connect( _brithtnessWindowLevel->GetId(), wxEVT_SCROLL_CHANGED, (wxObjectEventFunction) &interfConfigurationPanel::onBrigthnessColorWindowLevel);
+ Connect( _brithtnessWindowLevel->GetId(), wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction) &interfConfigurationPanel::onBrigthnessColorWindowLevel);
+ Connect( _brithtnessColorLevel->GetId() , wxEVT_SCROLL_CHANGED, (wxObjectEventFunction) &interfConfigurationPanel::onBrigthnessColorWindowLevel);
+ Connect( _brithtnessColorLevel->GetId() , wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction) &interfConfigurationPanel::onBrigthnessColorWindowLevel);
Connect( _interpolationCheckBox->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &interfConfigurationPanel::OnInterpolation);
wxFlexGridSizer * sizer = new wxFlexGridSizer(1);
//13-10-08
this->SetAutoLayout( true );
this->Layout();
-
+
}
void interfConfigurationPanel::OnInterpolation(wxCommandEvent& event)
{
-
+
interfMainPanel::getInstance()->onInterpolation(_interpolationCheckBox->GetValue());
-
-
+
+
}
/**
_wxtextctrlSpread = new wxTextCtrl(this,-1, _T(""),wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
_wxtextctrlSpread->SetEditable(false);
-
- Connect( spreadResetBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfSpreadPanel::onSpreadReset );
- Connect( spreadAddBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfSpreadPanel::onSpreadAdd );
- Connect( spreadGoBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfSpreadPanel::onSpreadGo );
+
+ Connect( spreadResetBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfSpreadPanel::onSpreadReset );
+ Connect( spreadAddBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfSpreadPanel::onSpreadAdd );
+ Connect( spreadGoBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfSpreadPanel::onSpreadGo );
wxFlexGridSizer * sizer = new wxFlexGridSizer(1);
sizer -> Add( spreadResetBtn , 1, wxGROW );
void interfSpreadPanel::onSpreadReset(wxCommandEvent& event){
setStringSpread(" ");
_wxtextctrlSpread->SetValue(wxString("",wxConvUTF8));
- interfMainPanel::getInstance()->resetAppend();
+ interfMainPanel::getInstance()->resetAppend();
}
void interfSpreadPanel::onSpreadAdd(wxCommandEvent& event){
interfMainPanel::getInstance()->onSpreadAdd();
setStringSpread(" ");
int typeMethodFindCtrlPoints=_spreadMethodRadiobox->GetSelection();
-
+printf("EED interfSpreadPanel::onSpreadGo %d\n",typeMethodFindCtrlPoints);
interfMainPanel::getInstance()->onSpreadGo(typeMethodFindCtrlPoints);
}
lstOptions[0]=_T("Current Slice");
lstOptions[1]=_T("Range Slices");
// lstOptions[2]=_T("All Slices");
- _informationRadiobox = new wxRadioBox(this, -1, _T("Slice analysis"), wxDefaultPosition, wxSize(270,45), 2 , lstOptions, 2, wxRA_SPECIFY_COLS);
+ _informationRadiobox = new wxRadioBox(this, -1, _T("Slice analysis"), wxDefaultPosition, wxSize(270,45), 2 , lstOptions, 2, wxRA_SPECIFY_COLS);
+
-
wxString lstOptContOperation[5];
lstOptContOperation[0]=_T("AND");
lstOptContOperation[1]=_T("OR");
_radiolstboxContourGroup = new wxRadioBox(this, -1, _T("Contour group"), wxDefaultPosition, wxSize(270,45), 4 , lstOptContOperation, 4, wxRA_SPECIFY_COLS);
_radiolstboxContourGroup->SetSelection(1);
Connect( _radiolstboxContourGroup->GetId(), wxEVT_COMMAND_RADIOBOX_SELECTED , (wxObjectEventFunction) &interfInformationPanel::onContourGroup );
-
-
+
+
_XYZValues = new wxCheckBox(this, -1, _T("Save Contour Values") );
_XYZValues->SetValue(true);
_contourImage = new wxCheckBox(this, -1, _T("Extract Contours as Images") );
- _contourImage->SetValue(true);
+ _contourImage->SetValue(true);
_statistics = new wxCheckBox(this, -1, _T("Save Statistics") );
_statistics->SetValue(true);
wxButton *informationContourLabelsBtn = new wxButton(this,-1,_T("Contour labels"),wxDefaultPosition, wxSize(140,35) );
informationContourLabelsBtn->SetEventHandler( this );
- Connect( informationContourLabelsBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfInformationPanel::onInformationContourLabels );
+ Connect( informationContourLabelsBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfInformationPanel::onInformationContourLabels );
wxButton *statisticsContourBtn = new wxButton(this,-1,_T("Contour statistics"),wxDefaultPosition, wxSize(140,35) );
statisticsContourBtn->SetEventHandler( this );
- Connect( statisticsContourBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfInformationPanel::onExtractInformation );
+ Connect( statisticsContourBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfInformationPanel::onExtractInformation );
wxButton *showResultImagesBtn = new wxButton(this,-1,_T("Show result images"),wxDefaultPosition, wxSize(140,35) );
showResultImagesBtn->SetEventHandler( this );
- Connect( showResultImagesBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfInformationPanel::onShowResultImages );
-
-
+ Connect( showResultImagesBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfInformationPanel::onShowResultImages );
+
+
wxButton *saveResultsBtn = new wxButton(this,-1,_T("Save Results"),wxDefaultPosition, wxSize(140,35) );
saveResultsBtn->SetEventHandler( this );
- Connect( saveResultsBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfInformationPanel::onSaveResults );
-
-
+ Connect( saveResultsBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfInformationPanel::onSaveResults );
+
+
int sizeZ = interfMainPanel::getInstance()->GetImageDataSizeZ();
- //_theViewPanel->getSceneManager()->GetImageDataSizeZ();
+ //_theViewPanel->getSceneManager()->GetImageDataSizeZ();
_mbarrangeSliceInformation = new mBarRange(this,65,65);
_mbarrangeSliceInformation->SetMin(0);
_mbarrangeSliceInformation->SetStart(0);
_mbarrangeSliceInformation-> setVisibleLabels( true );
_mbarrangeSliceInformation-> setDeviceEndMargin(10);
_mbarrangeSliceInformation-> setRepresentedValues( 0 , sizeZ-1 );
- _mbarrangeSliceInformation-> setDeviceBlitStart(10,10);
+ _mbarrangeSliceInformation-> setDeviceBlitStart(10,10);
_mbarrangeSliceInformation-> setIfWithActualDrawed( false );
_mbarrangeSliceInformation-> SetStart( 0 );
- _mbarrangeSliceInformation-> SetEnd( sizeZ-1 );
+ _mbarrangeSliceInformation-> SetEnd( sizeZ-1 );
_mbarrangeRangeInformation->setVisibleLabels( true );
_mbarrangeRangeInformation->setDeviceEndMargin(10);
_mbarrangeRangeInformation->setRepresentedValues( min , max );
- _mbarrangeRangeInformation->setDeviceBlitStart(10,10);
+ _mbarrangeRangeInformation->setDeviceBlitStart(10,10);
_mbarrangeRangeInformation->setIfWithActualDrawed( false );
_mbarrangeRangeInformation->SetStart( min );
- _mbarrangeRangeInformation->SetEnd( max );
+ _mbarrangeRangeInformation->SetEnd( max );
// _mbarrangeSliceInformation->PushEventHandler(this);
// Connect(_mbarrangeRangeInformation->GetId(),wxEVT_TSBAR,(wxObjectEventFunction) (wxCommandEventFunction) &interfInformationPanel::onRangeSliceInformation );
// Connect(_mbarrangeRangeInformation->GetId(),wxEVT_TSBAR_ACTUAL,(wxObjectEventFunction) (wxCommandEventFunction) &interfInformationPanel::onRangeSliceInformation );
- Connect(_mbarrangeRangeInformation->GetId(),wxEVT_TSBAR_START,(wxObjectEventFunction) (wxCommandEventFunction) &interfInformationPanel::onRangeSliceInformation );
+ Connect(_mbarrangeRangeInformation->GetId(),wxEVT_TSBAR_START,(wxObjectEventFunction) (wxCommandEventFunction) &interfInformationPanel::onRangeSliceInformation );
Connect(_mbarrangeRangeInformation->GetId(),wxEVT_TSBAR_END,(wxObjectEventFunction) (wxCommandEventFunction) &interfInformationPanel::onRangeSliceInformation );
// Connect(_mbarrangeRangeInformation->GetId(),wxEVT_SELECTION_END,(wxObjectEventFunction) (wxCommandEventFunction) &interfInformationPanel::onRangeSliceInformation );
- Connect(_mbarrangeRangeInformation->GetId(),wxEVT_TSBAR_MOVED,(wxObjectEventFunction) (wxCommandEventFunction) &interfInformationPanel::onRangeSliceInformation );
+ Connect(_mbarrangeRangeInformation->GetId(),wxEVT_TSBAR_MOVED,(wxObjectEventFunction) (wxCommandEventFunction) &interfInformationPanel::onRangeSliceInformation );
_staticTextInformation = new wxStaticText(this,-1,_T(" "));
wxFlexGridSizer * sizer = new wxFlexGridSizer(1,8);
sizer->Add( sizerA , 1, wxALL , 0 );
sizer->Add( new wxStaticText(this ,-1,_T("Slice Range")) , 1, wxALL , 0 );
- sizer->Add( _mbarrangeSliceInformation , 1, wxALL|wxGROW , 2 );
+ sizer->Add( _mbarrangeSliceInformation , 1, wxALL|wxGROW , 2 );
sizer->Add( new wxStaticText(this ,-1,_T("Gray Range")) , 1, wxALL , 0 );
- sizer->Add( _mbarrangeRangeInformation , 1, wxALL|wxGROW , 2 );
+ sizer->Add( _mbarrangeRangeInformation , 1, wxALL|wxGROW , 2 );
sizer->Add( sizerB , 1, wxEXPAND , 0 );
sizer->Add( _staticTextInformation , 1, wxEXPAND , 0 );
sizer->Add( _grid , 1, wxEXPAND , 0 );
void interfInformationPanel::onRangeSliceInformation(wxCommandEvent& event)
-{
+{
int grayRangeMin = _mbarrangeRangeInformation->GetStart();
- int grayRangeMax = _mbarrangeRangeInformation->GetEnd();
- interfMainPanel::getInstance()->SetScalarRange(grayRangeMin,grayRangeMax);
- interfMainPanel::getInstance()->RefreshInterface();
+ int grayRangeMax = _mbarrangeRangeInformation->GetEnd();
+ interfMainPanel::getInstance()->SetScalarRange(grayRangeMin,grayRangeMax);
+ interfMainPanel::getInstance()->RefreshInterface();
}
int minZ = _mbarrangeSliceInformation->GetStart();
int maxZ = _mbarrangeSliceInformation->GetEnd();
int typeContourGroup = _radiolstboxContourGroup->GetSelection();
- interfMainPanel::getInstance()->ShowResultImages(typeContourGroup, selection, minZ, maxZ);
+ interfMainPanel::getInstance()->ShowResultImages(typeContourGroup, selection, minZ, maxZ);
}
int maxZ = _mbarrangeSliceInformation->GetEnd();
int grayRangeMin = _mbarrangeRangeInformation->GetStart();
int grayRangeMax = _mbarrangeRangeInformation->GetEnd();
-
- interfMainPanel::getInstance()->onInformationContourLabels(typeContourGroup, selection, minZ, maxZ, grayRangeMin, grayRangeMax);
+
+ interfMainPanel::getInstance()->onInformationContourLabels(typeContourGroup, selection, minZ, maxZ, grayRangeMin, grayRangeMax);
}
void interfInformationPanel::onSaveResults(wxCommandEvent& event)
std::string namefile = (const char *)(dialog.GetFilename().mb_str());
std::string filename = (const char *)(dialog.GetPath().mb_str() );
int typeContourGroup = _radiolstboxContourGroup->GetSelection();
- interfMainPanel::getInstance()->onSaveResults(directory, namefile, filename,
+ interfMainPanel::getInstance()->onSaveResults(directory, namefile, filename,
typeContourGroup,
selection,minZ,maxZ,
_XYZValues->GetValue(), _contourImage->GetValue(), _statistics->GetValue());
int z,sizeZ = interfMainPanel::getInstance()->GetImageDataSizeZ();//->getSceneManager()->GetImageDataSizeZ();
int ii,sizeLstContourThings;
for ( z=0 ; z<sizeZ ; z++)
- {
-
+ {
+
std::vector<std::string> lstContourThings = interfMainPanel::getInstance()->getOutlinesName(z);
-
+
//this->_modelManager->getOutlinesAtInstant( &instant );
sizeLstContourThings = lstContourThings.size();
_grid->SetCellValue( z, ii, tempString );
} // for ii
}// for z
-
+
// Last line
_grid->SetRowLabelValue(sizeZ, _T(" ") );
for (ii=0 ; ii<sizeLstContourThings ; ii++)
{
_grid->SetCellValue( sizeZ, ii, _T(" ") );
} // for ii
-
+
}
void interfInformationPanel::setStringInfoPanel(wxString tmpString){
{
contourGroup=0;
}
- interfMainPanel::getInstance()->SetContourGroup( _radiolstboxContourGroup->GetSelection() );
+ interfMainPanel::getInstance()->SetContourGroup( _radiolstboxContourGroup->GetSelection() );
}
//CMRU 29-08-09-----------------------------------------------------------------------------------------------
_unitsRadiobox = new wxRadioBox(this, -1, _T("Unit of measurement"), wxPoint(2, 25), wxSize(145,45), 3 , options, 3, wxRA_SPECIFY_COLS);
_unitsRadiobox->SetSelection(0);
-
+
//The label
new wxStaticText(this, wxID_ANY, wxT("Real Size: "), wxPoint(2, 5));
-
+
//Text Control
_size = new wxTextCtrl(this, wxID_ANY, wxT(""), wxPoint(78,3), wxSize(70, 20), 0, wxDefaultValidator, wxTextCtrlNameStr);
-
+
//The button
new wxButton(this, 1, wxT("Calibrate"), wxPoint(78, 70), wxSize(70, 25), 0, wxDefaultValidator, wxT("button"));
//Conexion del boton con su respectivo manejador
Connect(1, wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction) &interfCalibrationPanel::onCalibrate);
-
+
}
interfCalibrationPanel:: ~interfCalibrationPanel()