From 29d20b730ae0aaabfb6328f36aaec34cb22cc56e Mon Sep 17 00:00:00 2001 From: jean-pierre roux Date: Mon, 8 Feb 2010 13:27:08 +0000 Subject: [PATCH] re indent No newline at end of file --- bbtk/src/bbCreaContournDimensions.cxx | 16 +-- .../interfToolsPanels.cxx | 103 +++++++++--------- 2 files changed, 56 insertions(+), 63 deletions(-) diff --git a/bbtk/src/bbCreaContournDimensions.cxx b/bbtk/src/bbCreaContournDimensions.cxx index d7ff4b8..29aca63 100644 --- a/bbtk/src/bbCreaContournDimensions.cxx +++ b/bbtk/src/bbCreaContournDimensions.cxx @@ -7,7 +7,6 @@ BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaContours,nDimensions) BBTK_BLACK_BOX_IMPLEMENTATION(nDimensions,bbtk::WxBlackBox); void nDimensions::Process() { - double **vectx, **vecty, **vectz; std::vector< void * > vectortemp; @@ -25,8 +24,6 @@ void nDimensions::Process() wxContourMainFrame::getInstance()->setVectImages(selectedimages); } - - if(currentimg != NULL){ int contourtype = bbGetInputContourType(); //wxContourMainFrame::getInstance()->getValuesXYZ(vectx, vecty, vectz, &size); @@ -40,9 +37,10 @@ void nDimensions::Process() bbSetOutputMask(*mask); bbSetOutputValue(*value); } + +//----------------------------------------------------------------- void nDimensions::CreateWidget(wxWindow* parent) { - //vtkImageData* img = bbGetInputIn(); std::vector selectedimages; @@ -68,12 +66,8 @@ std::string path="."; wxContourMainFrame::getInstance()->ShowToolsPanel(false); //std::cout<<"creaContours = "<GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &interfConfigurationPanel::OnInterpolation); wxFlexGridSizer * sizer = new wxFlexGridSizer(1); - sizer -> Add( new wxStaticText(this,-1,_T("Contour width")) , 1, wxGROW ); + sizer -> Add( new wxStaticText(this,-1, _T("Contour width")) , 1, wxGROW ); sizer -> Add( _withOfContourLine , 1, wxGROW ); - sizer -> Add( new wxStaticText(this,-1,_T(" ")) , 1, wxGROW ); - sizer -> Add( new wxStaticText(this,-1,_T(" ")) , 1, wxGROW ); - sizer -> Add( new wxStaticText(this,-1,_T("Brightness of the image")) , 1, wxGROW ); - sizer -> Add( new wxStaticText(this,-1,_T("--Window level--")) , 1, wxGROW ); + sizer -> Add( new wxStaticText(this,-1, _T(" ")) , 1, wxGROW ); + sizer -> Add( new wxStaticText(this,-1, _T(" ")) , 1, wxGROW ); + sizer -> Add( new wxStaticText(this,-1, _T("Brightness of the image")) , 1, wxGROW ); + sizer -> Add( new wxStaticText(this,-1, _T("--Window level--")) , 1, wxGROW ); sizer -> Add( _brithtnessWindowLevel , 1, wxGROW ); - sizer -> Add( new wxStaticText(this,-1,_T("--Color level--")) , 1, wxGROW ); + sizer -> Add( new wxStaticText(this,-1, _T("--Color level--")) , 1, wxGROW ); sizer -> Add( _brithtnessColorLevel, 1, wxGROW ); - sizer -> Add( new wxStaticText(this,-1,_T(" ")) , 1, wxGROW ); - sizer -> Add( new wxStaticText(this,-1,_T(" ")) , 1, wxGROW ); + sizer -> Add( new wxStaticText(this,-1, _T(" ")) , 1, wxGROW ); + sizer -> Add( new wxStaticText(this,-1, _T(" ")) , 1, wxGROW ); sizer -> Add( _interpolationCheckBox , 1, wxGROW ); this->SetSizer( sizer ); @@ -188,7 +188,7 @@ interfInformationPanel::interfInformationPanel(wxWindow * parent) 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]; @@ -196,7 +196,7 @@ interfInformationPanel::interfInformationPanel(wxWindow * parent) lstOptContOperation[1]=_T("OR"); lstOptContOperation[2]=_T("XOR"); lstOptContOperation[3]=_T("ALL"); - _radiolstboxContourGroup = new wxRadioBox(this, -1, _T("Contour group"), wxDefaultPosition, wxSize(270,45), 4 , lstOptContOperation, 4, wxRA_SPECIFY_COLS); + _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 ); @@ -210,27 +210,27 @@ interfInformationPanel::interfInformationPanel(wxWindow * parent) _statistics = new wxCheckBox(this, -1, _T("Save Statistics") ); _statistics->SetValue(true); - wxButton *informationContourLabelsBtn = new wxButton(this,-1,_T("Contour labels"),wxDefaultPosition, wxSize(140,35) ); + 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 ); - wxButton *statisticsContourBtn = new wxButton(this,-1,_T("Contour statistics"),wxDefaultPosition, wxSize(140,35) ); + 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 ); - wxButton *showResultImagesBtn = new wxButton(this,-1,_T("Show result images"),wxDefaultPosition, wxSize(140,35) ); + 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 ); - wxButton *saveResultsBtn = new wxButton(this,-1,_T("Save Results"),wxDefaultPosition, wxSize(140,35) ); + 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 ); int sizeZ = interfMainPanel::getInstance()->GetImageDataSizeZ(); //_theViewPanel->getSceneManager()->GetImageDataSizeZ(); - _mbarrangeSliceInformation = new mBarRange(this,65,65); + _mbarrangeSliceInformation = new mBarRange(this,65,65); _mbarrangeSliceInformation->SetMin(0); _mbarrangeSliceInformation->SetStart(0); _mbarrangeSliceInformation-> SetOrientation( true ); @@ -296,31 +296,31 @@ interfInformationPanel::interfInformationPanel(wxWindow * parent) wxFlexGridSizer * sizerSave = new wxFlexGridSizer(2,2); sizerSave -> Add( new wxStaticText(this,-1,_T("Save Options: ")) , 1, wxGROW ); - sizerSave->Add( _XYZValues, 1, wxALL ,2 ); - sizerSave->Add( _statistics, 1, wxALL ,2 ); - sizerSave->Add( _contourImage, 1, wxALL ,2 ); + sizerSave->Add( _XYZValues, 1, wxALL, 2 ); + sizerSave->Add( _statistics, 1, wxALL, 2 ); + sizerSave->Add( _contourImage, 1, wxALL, 2 ); wxFlexGridSizer * sizerA = new wxFlexGridSizer(10); - sizerA->Add( _informationRadiobox , 1, wxALL ,2 ); - sizerA->Add( _radiolstboxContourGroup , 1, wxALL ,2 ); - sizerA->Add( sizerSave , 1, wxALL ,2 ); + sizerA->Add( _informationRadiobox, 1, wxALL, 2 ); + sizerA->Add( _radiolstboxContourGroup, 1, wxALL, 2 ); + sizerA->Add( sizerSave, 1, wxALL, 2 ); wxFlexGridSizer * sizerB = new wxFlexGridSizer(10); - sizerB->Add( informationContourLabelsBtn, 1, wxALL ,2 ); - sizerB->Add( statisticsContourBtn, 1, wxALL ,2 ); - sizerB->Add( showResultImagesBtn, 1, wxALL ,2 ); - sizerB->Add( saveResultsBtn, 1, wxALL ,2 ); + sizerB->Add( informationContourLabelsBtn, 1, wxALL, 2 ); + sizerB->Add( statisticsContourBtn, 1, wxALL, 2 ); + sizerB->Add( showResultImagesBtn, 1, wxALL, 2 ); + sizerB->Add( saveResultsBtn, 1, wxALL, 2 ); 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( new wxStaticText(this ,-1,_T("Gray Range")) , 1, wxALL , 0 ); - 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 ); + 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( new wxStaticText(this ,-1,_T("Gray Range")) , 1, wxALL , 0 ); + 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 ); this->SetSizer( sizer ); this->SetSize( wxSize(1500,1500) ); @@ -353,11 +353,11 @@ void interfInformationPanel::onInformationContourLabels(wxCommandEvent& event){ void interfInformationPanel::onShowResultImages(wxCommandEvent& event) { // onExtractInformation( event ); - int selection = _informationRadiobox->GetSelection(); - int minZ = _mbarrangeSliceInformation->GetStart(); - int maxZ = _mbarrangeSliceInformation->GetEnd(); + int selection = _informationRadiobox->GetSelection(); + 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); } @@ -366,13 +366,13 @@ void interfInformationPanel::onExtractInformation(wxCommandEvent& event){ _grid->ClearGrid(); int typeContourGroup = this->_radiolstboxContourGroup->GetSelection(); - int selection = _informationRadiobox->GetSelection(); - int minZ = _mbarrangeSliceInformation->GetStart(); - int maxZ = _mbarrangeSliceInformation->GetEnd(); - int grayRangeMin = _mbarrangeRangeInformation->GetStart(); - int grayRangeMax = _mbarrangeRangeInformation->GetEnd(); + int selection = _informationRadiobox->GetSelection(); + int minZ = _mbarrangeSliceInformation->GetStart(); + 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) @@ -381,13 +381,13 @@ void interfInformationPanel::onSaveResults(wxCommandEvent& event) if (dialog.ShowModal() == wxID_OK) { onExtractInformation( event ); - int selection = _informationRadiobox->GetSelection(); - int minZ = _mbarrangeSliceInformation->GetStart(); - int maxZ = _mbarrangeSliceInformation->GetEnd(); - std::string directory=(const char *)(dialog.GetDirectory().mb_str()); - std::string namefile=(const char *)(dialog.GetFilename().mb_str()); - std::string filename = (const char *)(dialog.GetPath().mb_str() ); - int typeContourGroup = _radiolstboxContourGroup->GetSelection(); + int selection = _informationRadiobox->GetSelection(); + int minZ = _mbarrangeSliceInformation->GetStart(); + int maxZ = _mbarrangeSliceInformation->GetEnd(); + std::string directory = (const char *)(dialog.GetDirectory().mb_str()); + 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, typeContourGroup, selection,minZ,maxZ, @@ -517,4 +517,5 @@ void interfCalibrationPanel::onCalibrate(wxCommandEvent& event) int unit = _unitsRadiobox->GetSelection(); interfMainPanel::getInstance()->onCalibration(size, unit); } -//------------------------------------------------------------------------------------------------------------ \ No newline at end of file +//------------------------------------------------------------------------------------------------------------ + -- 2.45.0