]> Creatis software - creaContours.git/commitdiff
#3094 creaContours Bug New Normal - Contour information in pixels and image units...
authorEduardo DAVILA <davila@localhost.localdomain>
Tue, 30 May 2017 12:54:41 +0000 (14:54 +0200)
committerEduardo DAVILA <davila@localhost.localdomain>
Tue, 30 May 2017 12:54:41 +0000 (14:54 +0200)
lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx
lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h

index 617dce59520bbb9db6365a86d28add0a4af07306..3d4413be34a071a8f99afdf762f7b8e8ee747966 100644 (file)
@@ -1194,11 +1194,22 @@ void wxContourMainFrame::saveFileWithContours( std::string filename )
        fprintf(pFileData,"NumberOfContours %d\n", sizeLstNameThings );
 //------------------------------------------------------------------------------------------------------------
 
+
+// EED 2017-05-30
+       double spc[3];
+       spc[0]=1; 
+       spc[1]=1; 
+       spc[2]=1; 
+
        for (i=0 ; i<sizeLstNameThings ; i++)
        {
 //CMRU 03-09-09-----------------------------------------------------------------------------------------------
                manualBaseModel * manualModel = kernelManager->getOutlineByKeyName(lstNameThings[i]);
-               double sizeInPixel = manualModel ->GetPathSize();
+
+// EED 2017-05-30
+//             double sizeInPixel = manualModel ->GetPathSize(  );
+               double sizeInPixel = manualModel ->GetPathSize( spc );
+
                double realContourSize = sizeInPixel*_onePixelSize;
                manualModel ->SetRealSize(realContourSize);
 //------------------------------------------------------------------------------------------------------------
@@ -3227,10 +3238,18 @@ double wxContourMainFrame::getContourSizeInPixels()
                std::string cloneName = currentSelection [0];
 
                manualBaseModel * manualModel = kernelManager->getOutlineByKeyName(cloneName);//_modelManager->getOutlineByKeyName( cloneName )->getModel();
-               contourSize = manualModel-> GetPathSize();
+
+// EED 2017-05-30
+//             contourSize = manualModel->GetPathSize();
+               double spc[3];
+               spc[0]=1; 
+               spc[1]=1; 
+               spc[2]=1; 
+               contourSize = manualModel->GetPathSize( spc );
        }
        return contourSize;
 }
+
 manualBaseModel * wxContourMainFrame::getContour ()
 {
        std::vector<std::string> currentSelection = _theViewPanel->getSelectedObjects();
@@ -3260,9 +3279,16 @@ void wxContourMainFrame::onPrintLabel (wxString label, manualBaseModel* manualMo
 }
 void wxContourMainFrame::onInsertCalculation(manualBaseModel* manualModel)
 {
-       double sizeInPixel = manualModel ->GetPathSize();
+// EED 2017-05-30
+//     double sizeInPixel      = manualModel ->GetPathSize(  );
+       double spc[3];
+       spc[0]=1; // ????
+       spc[1]=1; // ????
+       spc[2]=1; // ????
+       double sizeInPixel      = manualModel ->GetPathSize( spc );
+
        double onePixelRealSize = interfMainPanel::getInstance()->GetPixelValue();;
-       double realContourSize = sizeInPixel*onePixelRealSize;
+       double realContourSize  = sizeInPixel*onePixelRealSize;
        manualModel ->SetRealSize(realContourSize);
 }
 
index ba7da1b5182f88f71d8e9e09cecc809437dee3cd..934238ed23ac3235c499b8719bd627483edc053c 100644 (file)
@@ -379,16 +379,16 @@ private:
 
        wxAuiManager                m_mgr;
        wxAuiNotebook               *notebook;
-       long                        m_notebook_style;
-       long                        m_notebook_theme;
-       int                         _numberOfVariablesStatistics;
+       long                    m_notebook_style;
+       long                    m_notebook_theme;
+       int                      _numberOfVariablesStatistics;
 
        // Contour Image Mask
        ThresholdImageView              *_viewMaskImage;
        ThresholdImageViewPanel         *_viewMaskImagePanel;
 
        // Threshold Image
-       ThresholdImageView              *_viewThresholdImage;
+       ThresholdImageView                      *_viewThresholdImage;
        ThresholdImageViewPanel         *_viewThresholdImagePanel;
 
        // Color Layer Image
@@ -397,9 +397,9 @@ private:
        bool                        _actorPresent;
 
     // temporary variables readding .roi file
-    int             _tmpReadFileImageDim[3];
-       double          _tmpReadFileImageSpac[3];
-    int             _tmpReadFileTypeOfTransformation;
+    int                                _tmpReadFileImageDim[3];
+       double                                  _tmpReadFileImageSpac[3];
+    int                                _tmpReadFileTypeOfTransformation;
     void readDimSpc(FILE *pFile, bool interactiveOption);