X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FInterface_ManagerContour_NDimensions%2FwxContourMainFrame.cxx;h=e86dc1b19c70df15bb30634ebcb340ab44402ede;hb=eadfc36256b2a77d2c3073d9249ce3020c2f554b;hp=1957a9e4d37aed7e1a61f5576abc4e8e7f95cb0d;hpb=40033c782c0c68ecc676bb59de5c7fe9eb3cac44;p=creaContours.git diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx index 1957a9e..e86dc1b 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx @@ -2304,6 +2304,11 @@ std::vector wxContourMainFrame::getOutlinesName(int slide){ } +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) { @@ -2419,16 +2424,22 @@ void wxContourMainFrame::onInformationContourLabels(int typeContourGroup,int sel } _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, @@ -2439,7 +2450,7 @@ void wxContourMainFrame::onInformationContourLabels(int typeContourGroup,int sel &resultMax, &resultAverage, &resultStandardeviation); - + if (interfMainPanel::getInstance()->getNumberColsInformationPanel()<_numberOfVariablesStatistics*(iContourGroup+1) ) { interfMainPanel::getInstance()->appendColsInformationPanel(_numberOfVariablesStatistics); @@ -2447,7 +2458,8 @@ void wxContourMainFrame::onInformationContourLabels(int typeContourGroup,int sel tmpIntA=_numberOfVariablesStatistics*iContourGroup ; - tempString.Printf(_T("%d"),resultSize); + tempString.Printf(_T("%d"),numberOfPixels); + interfMainPanel::getInstance()->setCellValueInfoPanel(z, tmpIntA, tempString); tempString.Printf(_T("%d"),resultGrayRangeCount); @@ -2699,7 +2711,9 @@ void wxContourMainFrame::SaveValuesXYZ(std::string directory,std::string namefil pLstValuePosX.clear(); pLstValuePosY.clear(); pLstValuePosZ.clear(); - _contourextractdata->GetValuesInsideCrown( &pLstValue, + int numberOfPixels; + _contourextractdata->GetValuesInsideCrown( &numberOfPixels, + &pLstValue, &pLstValuePosX, &pLstValuePosY, &pLstValuePosZ);