void appendColsInformationPanel(int _numberOfVariablesStatistics);
void setCellValueInfoPanel(int z,int tmpIntA,wxString tempString);
void setColLableInfoPanel(int tmpIntB ,wxString tmpTitleString);
+ void SetScalarRange(int grayRangeMin,int grayRangeMax);
void onSaveResults(std::string directory,std::string namefile, std::string filename,
int typeContourGroup, int selection, int minZ, int maxZ, bool XYZValues, bool contourImage, bool statistics);
wxString getCellValue(int j,int i);
int colorwindow = _brithtnessColorLevel->GetValue();
int windowlevel = _brithtnessWindowLevel->GetValue();
-
interfMainPanel::getInstance()->onBrigthnessColorWindowLevel(colorwindow, windowlevel);
}
_mbarrangeSliceInformation-> SetStart( 0 );
_mbarrangeSliceInformation-> SetEnd( sizeZ-1 );
+
+
double range[2];
interfMainPanel::getInstance()->getImageRange(range);
_mbarrangeRangeInformation = new mBarRange(this,65,65);
_mbarrangeRangeInformation->SetMin(0);
_mbarrangeRangeInformation->SetStart(0);
- _mbarrangeRangeInformation-> SetOrientation( true );
- _mbarrangeRangeInformation-> setActiveStateTo(true);
- _mbarrangeRangeInformation-> setVisibleLabels( true );
- _mbarrangeRangeInformation-> setDeviceEndMargin(10);
- _mbarrangeRangeInformation-> setRepresentedValues( min , max );
- _mbarrangeRangeInformation-> setDeviceBlitStart(10,10);
- _mbarrangeRangeInformation-> setIfWithActualDrawed( false );
- _mbarrangeRangeInformation-> SetStart( min );
- _mbarrangeRangeInformation-> SetEnd( max );
+ _mbarrangeRangeInformation->SetOrientation( true );
+ _mbarrangeRangeInformation->setActiveStateTo(true);
+ _mbarrangeRangeInformation->setVisibleLabels( true );
+ _mbarrangeRangeInformation->setDeviceEndMargin(10);
+ _mbarrangeRangeInformation->setRepresentedValues( min , max );
+ _mbarrangeRangeInformation->setDeviceBlitStart(10,10);
+ _mbarrangeRangeInformation->setIfWithActualDrawed( false );
+ _mbarrangeRangeInformation->SetStart( min );
+ _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_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 );
+
_staticTextInformation = new wxStaticText(this,-1,_T(" "));
this->Layout();
//return panel;
}
-interfInformationPanel::~interfInformationPanel(){
+
+interfInformationPanel::~interfInformationPanel()
+{
}
+
+void interfInformationPanel::onRangeSliceInformation(wxCommandEvent& event)
+{
+ int grayRangeMin = _mbarrangeRangeInformation->GetStart();
+ int grayRangeMax = _mbarrangeRangeInformation->GetEnd();
+ interfMainPanel::getInstance()->SetScalarRange(grayRangeMin,grayRangeMax);
+ interfMainPanel::getInstance()->RefreshInterface();
+}
+
+
void interfInformationPanel::onInformationContourLabels(wxCommandEvent& event){
wxBusyCursor wait;
FillGridWithContoursInformation();
}
+void wxContourMainFrame::SetScalarRange(int grayRangeMin, int grayRangeMax)
+{
+ _contourextractdata->SetScalarRange(grayRangeMin,grayRangeMax);
+}
+
void wxContourMainFrame::onInformationContourLabels(int typeContourGroup,int selection,int minimumZ,int maximumZ,int grayRangeMin, int grayRangeMax)
{
}
_contourextractdata->SetLstManualContourModel( lstManConModTmp );
+ _contourextractdata->SetScalarRange(grayRangeMin,grayRangeMax);
pLstValue.clear();
pLstValuePosX.clear();
pLstValuePosY.clear();
pLstValuePosZ.clear();
- _contourextractdata->GetValuesInsideCrown( &pLstValue,
+
+
+ int numberOfPixels;
+ _contourextractdata->GetValuesInsideCrown( &numberOfPixels,
+ &pLstValue,
&pLstValuePosX,
&pLstValuePosY,
&pLstValuePosZ);
+ resultSize=numberOfPixels;
// Statistics of each slice.
_contourextractdata->Statistics( &pLstValue,
grayRangeMin,
&resultMax,
&resultAverage,
&resultStandardeviation);
-
+
if (interfMainPanel::getInstance()->getNumberColsInformationPanel()<_numberOfVariablesStatistics*(iContourGroup+1) )
{
interfMainPanel::getInstance()->appendColsInformationPanel(_numberOfVariablesStatistics);
tmpIntA=_numberOfVariablesStatistics*iContourGroup ;
- tempString.Printf(_T("%d"),resultSize);
+ tempString.Printf(_T("%d"),numberOfPixels);
+
interfMainPanel::getInstance()->setCellValueInfoPanel(z, tmpIntA, tempString);
tempString.Printf(_T("%d"),resultGrayRangeCount);
pLstValuePosX.clear();
pLstValuePosY.clear();
pLstValuePosZ.clear();
- _contourextractdata->GetValuesInsideCrown( &pLstValue,
+ int numberOfPixels;
+ _contourextractdata->GetValuesInsideCrown( &numberOfPixels,
+ &pLstValue,
&pLstValuePosX,
&pLstValuePosY,
&pLstValuePosZ);