]> Creatis software - creaContours.git/commitdiff
*** empty log message ***
authordonadio <donadio>
Tue, 2 Jun 2009 14:04:29 +0000 (14:04 +0000)
committerdonadio <donadio>
Tue, 2 Jun 2009 14:04:29 +0000 (14:04 +0000)
lib/Interface_Icons_NDimensions/interfMainPanel.cxx
lib/Interface_Icons_NDimensions/interfMainPanel.h
lib/Interface_Icons_NDimensions/interfSegmentationPanels.cxx
lib/Interface_Icons_NDimensions/interfSegmentationPanels.h
lib/Interface_Icons_NDimensions/interfToolsPanels.cxx
lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx
lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h

index 8750c4fc6d8308731a49f27709123e88f54b00f6..fe241ccda59884b2c49d46f8ffb94cf8b1362b4a 100644 (file)
@@ -409,10 +409,6 @@ int interfMainPanel::GetImageDataSizeZ(){
        return wxContourMainFrame::getInstance()->GetImageDataSizeZ();
 }
 
-void interfMainPanel::GetImageDataRange(double *range){
-       wxContourMainFrame::getInstance()->GetImageDataRange(range);
-}
-
 void interfMainPanel::onSegmentationAllSlice(int minZ,int maxZ,int isovalue,int sampling,int method){
        wxContourMainFrame::getInstance()->onSegmentationAllSlice(minZ, maxZ,isovalue,sampling,method);
 }
index 8f5224cfbc47a8965f1abd0622dc8ae3e0afc5cb..90bd7838f3480aa760bd7246abaef76d7b544a20 100644 (file)
@@ -122,8 +122,6 @@ public:
 
        int GetImageDataSizeZ();
 
-       void GetImageDataRange(double *range);
-
        void onSegmentationAllSlice(int minZ,int maxZ,int isovalue,int sampling,int method);
 
        void onMirrorPressed();
index 615f852eabaf99152b6523a98d1cb1dff91fe57e..a71b57fdb362964a09c2a6bf982ba0104c96f636 100644 (file)
@@ -5,14 +5,16 @@ interfSegmentationPanelVTK::interfSegmentationPanelVTK(wxWindow * parent)
 : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN)
 {
        int sizeZ = interfMainPanel::getInstance()->GetImageDataSizeZ();
-       //int sizeZ = _theViewPanel->getSceneManager()->GetImageDataSizeZ();
+
        double range[2];
-       //_theViewPanel->getSceneManager()->GetImageDataRange(range);
-       interfMainPanel::getInstance()->GetImageDataRange(range);
+       interfMainPanel::getInstance()->getImageRange(range);
+
+       int min = (int)floor (range[0]);
+       int max = (int)ceil (range[1]);
 
        wxButton *segmentationOneSliceBtn   = new wxButton(this,-1,_T("Current slice"), wxDefaultPosition, wxSize(200,35) );
        wxButton *segmentationAllSliceBtn   = new wxButton(this,-1,_T("All slices") ,wxDefaultPosition, wxSize(200,35) );
-       _isovalue                           = new wxSlider(this, -1, 40 , (int)(range[0]), (int)(range[1]), wxDefaultPosition, wxSize(200,35), wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
+       _isovalue                           = new wxSlider(this, -1, 40 , min, max, wxDefaultPosition, wxSize(200,35), wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
        _sampling                           = new wxSlider(this, -1, 20 , 4, 50, wxDefaultPosition, wxSize(200,35), wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
        wxString lstOptions[3];
        lstOptions[0]=_T("A");
@@ -126,11 +128,11 @@ void interfSegmentationPanelVTK::setLabel(wxString tmpString){
 interfSegmentationPanelITK::interfSegmentationPanelITK(wxWindow * parent)
 : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN)
 {
-//     int sizeZ = interfMainPanel::getInstance()->GetImageDataSizeZ();
-       //int sizeZ = _theViewPanel->getSceneManager()->GetImageDataSizeZ();
        double range[2];
-       //_theViewPanel->getSceneManager()->GetImageDataRange(range);
-       interfMainPanel::getInstance()->GetImageDataRange(range);
+       interfMainPanel::getInstance()->getImageRange(range);
+
+       int min = (int)floor (range[0]);
+       int max = (int)ceil (range[1]);
        
        //The labels
        //wxStaticText * distance =    
@@ -263,8 +265,7 @@ void interfMirrorPanel::onChangeWidth(wxScrollEvent& event)
 interfThresholdPanel::interfThresholdPanel(wxWindow* parent)
 : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN)
 {
-       wxButton *thresholdGoBtn = new wxButton(this,wxID_ANY,_T("Add Fake Color"), wxDefaultPosition, wxSize(200,30) );
-       wxButton *thresholdRemoveBtn = new wxButton(this,wxID_ANY,_T("Remove Fake Color"), wxDefaultPosition, wxSize(200,30) );
+       wxButton *thresholdGoBtn = new wxButton(this,wxID_ANY,_T("Show/Hide Color"), wxDefaultPosition, wxSize(200,30) );
        _interpolationCheckBox = new wxCheckBox(this, -1, _T("Image interpolation") );
        _interpolationCheckBox->SetValue(true); 
        _opacity = new wxSlider(this, wxID_ANY, 6, 1, 10, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
@@ -290,7 +291,6 @@ interfThresholdPanel::interfThresholdPanel(wxWindow* parent)
        _mBarThreshold-> SetEnd( max );  
        
        Connect( thresholdGoBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfThresholdPanel::onThresholdGo ); 
-       Connect( thresholdRemoveBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &interfThresholdPanel::onThresholdRemove );
        Connect( _interpolationCheckBox->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &interfThresholdPanel::onThresholdInterpolation );
 
        wxFlexGridSizer * sizer         = new wxFlexGridSizer(1);
@@ -301,7 +301,6 @@ interfThresholdPanel::interfThresholdPanel(wxWindow* parent)
        sizer -> Add( _opacity, 1, wxGROW );
        sizer -> Add( new wxStaticText(this,-1,_T(" "))  , 1, wxGROW );
        sizer -> Add( thresholdGoBtn, 1, wxGROW );
-       sizer -> Add( thresholdRemoveBtn, 1, wxGROW );
        sizer -> Add( new wxStaticText(this,-1,_T(" "))  , 1, wxGROW );
        sizer -> Add( _interpolationCheckBox, 1, wxGROW );
 
@@ -332,11 +331,7 @@ void interfThresholdPanel::onThresholdGo(wxCommandEvent& event)
                interfMainPanel::getInstance()->onThreshold();
                _thresholdGo=true;
        }
-}
-
-void interfThresholdPanel::onThresholdRemove(wxCommandEvent& event)
-{
-       if (_thresholdGo)
+       else
        {       
                interfMainPanel::getInstance()->onThresholdRemove( );
                _thresholdGo=false;             
index f52a776830be2a140d43cfc8db39ec19754a2b00..e544d84fff495a2e5e40d5efe3926eeec55688ee 100644 (file)
@@ -122,8 +122,6 @@ private:
 
        void onThresholdGo(wxCommandEvent& event);
 
-       void onThresholdRemove(wxCommandEvent& event);
-
        void onThresholdInterpolation(wxCommandEvent& event);
 
        void onChangeOpacity(wxScrollEvent& event);
index 08f736097b34d432237b9bcbfdf7dc353bcad5a3..40c630d2eb34d17ee6d70f368ed24563889aaf88 100644 (file)
@@ -8,7 +8,7 @@ interfConfigurationPanel::interfConfigurationPanel(wxWindow * parent)
        _withOfContourLine                                              = new wxSlider(this, -1, 1 , 1, 10, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
 
        double range[2];
-       interfMainPanel::getInstance()->GetImageDataRange(range);
+       interfMainPanel::getInstance()->getImageRange(range);
        //this->_theViewPanel->getSceneManager()->GetImageDataRange(range);
 
        //wxVtk2DBaseView *wxvtk2dbaseview = (wxVtk2DBaseView*)this->_theViewPanel->getWxVtkBaseView();
@@ -19,9 +19,12 @@ interfConfigurationPanel::interfConfigurationPanel(wxWindow * parent)
        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 , 1, (int)range[1], wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
-       _brithtnessColorLevel                                   = new wxSlider(this, -1, colorwindow , 1, (int)range[1], wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
+       _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);         
@@ -232,22 +235,24 @@ interfInformationPanel::interfInformationPanel(wxWindow * parent)
        _mbarrangeSliceInformation-> SetStart( 0 );
        _mbarrangeSliceInformation-> SetEnd( sizeZ-1 );  
 
-
        double range[2];
-       interfMainPanel::getInstance()->GetImageDataRange(range);
-       //this->_theViewPanel->getSceneManager()->GetImageDataRange(range);
-       _mbarrangeRangeInformation                                      =  new mBarRange(this,65,65);
+       interfMainPanel::getInstance()->getImageRange(range);
+
+       int min = (int)floor (range[0]);
+       int max = (int)ceil (range[1]);
+
+       _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( range[0] , range[1] );
+       _mbarrangeRangeInformation-> setRepresentedValues( min , max );
        _mbarrangeRangeInformation-> setDeviceBlitStart(10,10); 
        _mbarrangeRangeInformation-> setIfWithActualDrawed( false );
-       _mbarrangeRangeInformation-> SetStart( (int)range[0] );
-       _mbarrangeRangeInformation-> SetEnd( (int)range[1] );  
+       _mbarrangeRangeInformation-> SetStart( min );
+       _mbarrangeRangeInformation-> SetEnd( max );  
 
        _staticTextInformation  = new wxStaticText(this,-1,_T("    "));
 
@@ -326,7 +331,7 @@ void interfInformationPanel::onExtractInformation(wxCommandEvent& event){
 }
 void interfInformationPanel::onSaveResults(wxCommandEvent& event)
 {
-       wxFileDialog dialog(this, _T("Choose a file"), _T(""), _T(""), _T("*.txt"), wxSAVE );
+       wxFileDialog dialog(this, _T("Choose a filename"), _T(""), _T(""), wxFileSelectorDefaultWildcardStr, wxSAVE );
        if (dialog.ShowModal() == wxID_OK)
        {
                onExtractInformation( event );
index 4261ef1ee6b6c15d9e272d986921fa462ecf9ae8..0c8433570f22364d0e07e1108b16f6ba24cdef6f 100644 (file)
@@ -99,12 +99,14 @@ char wxContourMainFrame::COPY = 'C';
 
                if(images.size() > 0)
                {
-                       this->setVectImages(images);
+                       _images = images;
+                       this->setVectImages();
                }
 
 }
 
-void wxContourMainFrame::setVectImages( std::vector<vtkImageData*> images ){
+void wxContourMainFrame::setVectImages( )
+{
 
        #if defined(__GNUC__)
                std::string str_home(getenv("HOME"));
@@ -119,7 +121,7 @@ void wxContourMainFrame::setVectImages( std::vector<vtkImageData*> images ){
        notebook = this->createNotebook();              
 
 
-       kernelManager = new KernelManagerContour( images , _datadir+"/data/" , strCreaContourDataTmp );
+       kernelManager = new KernelManagerContour( _images , _datadir+"/data/" , strCreaContourDataTmp );
 
 
        _instantPanel                           = new wxInstantChooserPanel( notebook, "Instant Chooser", true, false, "c" );
@@ -166,7 +168,7 @@ void wxContourMainFrame::setVectImages( std::vector<vtkImageData*> images ){
 
        wxContourMainFrame :: ~wxContourMainFrame()
        {
-
+               deleteAllContours();
                _pannew->Close();
                interfMainPanel::resetInstance();
                delete kernelManager;
@@ -780,11 +782,16 @@ void wxContourMainFrame::onLoad(){
                fscanf(pFile,"%s",tmp); // --CreaContour--
 
                fscanf(pFile,"%s",tmp); // Version
-               fscanf(pFile,"%s",tmp); // 1.0.1
+               fscanf(pFile,"%s",tmp); // 1.0.1 || 1.0.0
                std::string version(tmp);
 
-               openContours(pFile,false);
-               if (version!="1.0.0"){
+               if (version=="1.0.1")
+               {
+                       openContours(pFile,false);
+               }
+
+               else if (version=="1.0.0")
+               {
                        openContours(pFile,true);
                }
 //                       _theViewPanel->getSceneManager()->openFileWithContours(ff);
@@ -794,6 +801,8 @@ void wxContourMainFrame::onLoad(){
        _theViewPanel->getSceneManager()->removeSceneContours();
        changeInstant();
 }
+
+//AD: 29-05-09
 void wxContourMainFrame::onSave(){
        wxFileDialog dialog(NULL, _T("Choose a file"), _T(""), _T(""), _T("*.roi"), wxSAVE );
        if (dialog.ShowModal() == wxID_OK)
@@ -803,6 +812,8 @@ void wxContourMainFrame::onSave(){
                saveFileWithContours( fileNameContourROI );
        }
 }
+
+//AD: 29-05-09
 void wxContourMainFrame::saveFileWithContours( std::string filename )
 {
 
@@ -817,6 +828,19 @@ void wxContourMainFrame::saveFileWithContours( std::string filename )
        lstNameThings           = kernelManager->GetLstNameThings();
        sizeLstNameThings       = lstNameThings.size(); 
        fprintf(pFile,"NumberOfContours %d\n", sizeLstNameThings );
+
+       vtkImageData *image = _images[0];
+
+       int dimRange[3];
+       image->GetDimensions(dimRange);
+
+       fprintf(pFile,"ImageDimensions %d %d %d\n", dimRange[0], dimRange[1], dimRange[2] );
+
+       double spaRange[3];
+       image->GetSpacing(spaRange);
+
+       fprintf(pFile,"ImageSpacing %f %f %f\n", spaRange[0], spaRange[1], spaRange[2] );
+
        for (i=0 ; i<sizeLstNameThings ; i++) 
        {
                kernelManager->SaveThingName( pFile, lstNameThings[i] );
@@ -835,6 +859,7 @@ void wxContourMainFrame::saveFileWithContours( std::string filename )
        fclose(pFile);
 }
 
+//AD:02-06-09: TODO: Adjust spacing and dimensions to Rois comming from images with different specifications
 void wxContourMainFrame::openContours( FILE *pFile, bool staticContour ){
        char tmp[255];
        fscanf(pFile,"%s",tmp); // NumberOfContours 
@@ -846,64 +871,105 @@ void wxContourMainFrame::openContours( FILE *pFile, bool staticContour ){
        manualContourModel *manModelContour;
        int typeView;
 
-       int i;
-       for (i=0;i<numberOfContours;i++)
+       vtkImageData *image = _images[0];
+       int imageDim[3];
+       image->GetDimensions(imageDim);
+       double imageSpac[3];
+       image->GetSpacing(imageSpac);
+
+       int tempDim[3];
+       double tempSpac[3];
+
+       fscanf(pFile,"%s",tmp); // ImageDimensions
+       fscanf(pFile,"%s",tmp); // X
+       tempDim[0] = atoi(tmp);
+       fscanf(pFile,"%s",tmp); // Y
+       tempDim[1] = atoi(tmp);
+       fscanf(pFile,"%s",tmp); // Z
+       tempDim[2] = atoi(tmp);
+
+       fscanf(pFile,"%s",tmp); // ImageSpacing
+       fscanf(pFile,"%s",tmp); // X
+       tempSpac[0] = atof(tmp);
+       fscanf(pFile,"%s",tmp); // Y
+       tempSpac[1] = atof(tmp);
+       fscanf(pFile,"%s",tmp); // Z
+       tempSpac[2] = atof(tmp);
+
+       bool compatible = true;
+
+       //Compare Spacing and Dims in X and Y (Necessary in Z?)
+       if (imageDim[0]!=tempDim[0] || imageDim[1]!=tempDim[1] || 
+               imageSpac[0]!=tempSpac[0] || imageSpac[1]!=tempSpac[1])
        {
-               instantVector.clear();
-               fscanf(pFile,"%s",tmp); // Instant
+               compatible = false;
+       }
 
-               fscanf(pFile,"%s",tmp); // 1
-               instantVector.push_back( atoi(tmp) );
-               fscanf(pFile,"%s",tmp); // 2
-               instantVector.push_back( atoi(tmp) );
-               fscanf(pFile,"%s",tmp); // 3
-               instantVector.push_back( atoi(tmp) );
-               fscanf(pFile,"%s",tmp); // 4
-               instantVector.push_back( atoi(tmp) );
-               fscanf(pFile,"%s",tmp); // 5
-               instantVector.push_back( atoi(tmp) );
-               fscanf(pFile,"%s",tmp); // 6
-               instantVector.push_back( atoi(tmp) );
+       if (compatible==true)
+       {
+               int i;
+               for (i=0;i<numberOfContours;i++)
+               {
+                       instantVector.clear();
+                       fscanf(pFile,"%s",tmp); // Instant
 
+                       fscanf(pFile,"%s",tmp); // 1
+                       instantVector.push_back( atoi(tmp) );
+                       fscanf(pFile,"%s",tmp); // 2
+                       instantVector.push_back( atoi(tmp) );
+                       fscanf(pFile,"%s",tmp); // 3
+                       instantVector.push_back( atoi(tmp) );
+                       fscanf(pFile,"%s",tmp); // 4
+                       instantVector.push_back( atoi(tmp) );
+                       fscanf(pFile,"%s",tmp); // 5
+                       instantVector.push_back( atoi(tmp) );
+                       fscanf(pFile,"%s",tmp); // 6
+                       instantVector.push_back( atoi(tmp) );
 
-               fscanf(pFile,"%s",tmp); // TypeContourModel
-               fscanf(pFile,"%s",tmp); // ##
-               typeContourModel = atoi(tmp);
 
-               manModelContour =  kernelManager->factoryManualContourModel(typeContourModel);
-               manModelContour->Open(pFile);
+                       fscanf(pFile,"%s",tmp); // TypeContourModel
+                       fscanf(pFile,"%s",tmp); // ##
+                       typeContourModel = atoi(tmp);
 
-               fscanf(pFile,"%s",tmp); // TypeView
-               fscanf(pFile,"%s",tmp); // ##
-               typeView = atoi(tmp);  
+                       manModelContour =  kernelManager->factoryManualContourModel(typeContourModel);
+                       manModelContour->Open(pFile);
 
+                       fscanf(pFile,"%s",tmp); // TypeView
+                       fscanf(pFile,"%s",tmp); // ##
+                       typeView = atoi(tmp);  
 
-//                     if (typeView==1) 
-//                     {
-//                     }
 
+       //                      if (typeView==1) 
+       //                      {
+       //                      }
 
-               std::string theName;
-               theName = kernelManager->createOutline( manModelContour, instantVector );
-               bool addedModel = theName.compare("") != 0;
-               if( addedModel )
-               {
-                       double spc[3];//Si no hay imagen pero hay contornos que spacing se pone por default
-                       _theViewPanel->getSpacing(spc);                                 
-                       //Adding the manualContourControler to interface objects structure
-                       //Adding the manualViewContour to interface objects structure           
-                       //_theViewPanel->getSceneManager()->setControlActiveStateOfALL( false );//This call is being done here because if the ROI is created underneath the previously created ROIS will still be active.
-                       _theViewPanel->getSceneManager()->configureViewControlTo( theName, manModelContour,spc , typeView) ;
-               }       
 
-               if (staticContour==true)
-               {
-                       Instant instant(&instantVector);
-                       kernelManager->changeContourOfManager( theName , &instant );
-               }
+                       std::string theName;
+                       theName = kernelManager->createOutline( manModelContour, instantVector );
+                       bool addedModel = theName.compare("") != 0;
+                       if( addedModel )
+                       {
+                               double spc[3];//Si no hay imagen pero hay contornos que spacing se pone por default
+                               _theViewPanel->getSpacing(spc);                                 
+                               //Adding the manualContourControler to interface objects structure
+                               //Adding the manualViewContour to interface objects structure           
+                               //_theViewPanel->getSceneManager()->setControlActiveStateOfALL( false );//This call is being done here because if the ROI is created underneath the previously created ROIS will still be active.
+                               _theViewPanel->getSceneManager()->configureViewControlTo( theName, manModelContour,spc , typeView) ;
+                       }       
+
+                       if (staticContour==true)
+                       {
+                               Instant instant(&instantVector);
+                               kernelManager->changeContourOfManager( theName , &instant );
+                       }
 
-       }// for  numberOfContours
+               }// for  numberOfContours
+       }
 
+       else if (compatible==false)
+       {
+               wxMessageBox(_T("The actual image is not compatible with the selected Roi file"), _T("Error"), wxICON_ERROR | wxOK);
+       }
 }
 
 void wxContourMainFrame::RefreshInterface(){
@@ -1943,10 +2009,32 @@ void wxContourMainFrame::onWidthOfContour(double width){
 
        RefreshInterface();
 }
-int wxContourMainFrame::getColorWindow(){
+
+int wxContourMainFrame::getColorWindow()
+{
+       /*
+       double range[2];
+       vtkImageData * img = getImageData();
+       img->GetScalarRange(range);
+
+       std::cout<<"Val 1: "<<range[0]<<" Val 2: "<<range[1]<<std::endl;
+       
+       return (int)range[1];
+       */
        return _theViewPanel->getColorWindow();
 }
-int wxContourMainFrame::getWindowLevel(){
+
+int wxContourMainFrame::getWindowLevel()
+{
+       /*
+       double range[2];
+       vtkImageData * img = getImageData();
+       img->GetScalarRange(range);
+
+       std::cout<<"Val 1: "<<range[0]<<" Val 2: "<<range[1]<<std::endl;
+       
+       return (int)range[1];
+       */
        return _theViewPanel->getWindowLevel();
 }
 
@@ -2246,6 +2334,7 @@ void wxContourMainFrame::onInformationContourLabels(int typeContourGroup,int sel
        delete contourextractdata;
 }
 
+//AD: 29-05-09
 void wxContourMainFrame::onSaveResults(std::string directory,std::string namefile, std::string filename, 
        int typeContourGroup, bool XYZValues, bool contourImage, bool statistics)
 {
@@ -2264,7 +2353,11 @@ void wxContourMainFrame::onSaveResults(std::string directory,std::string namefil
        
        if (statistics)
        {
-               FILE *pFile=fopen(filename.c_str(),"w+");
+               std::ostringstream name;
+               name << filename << ".xls";
+               
+
+               FILE *pFile=fopen(name.str().c_str(),"w+");
 
                int sizeZ = _theViewPanel->GetImageDataSizeZ();
 
@@ -2296,6 +2389,7 @@ void wxContourMainFrame::onSaveResults(std::string directory,std::string namefil
        }
 }
 
+//AD: 29-05-09
 void wxContourMainFrame::SaveValuesXYZ(std::string directory,std::string namefile,int typeContourGroup)
 {
        wxBusyCursor wait;
index 91eac838062a93c4df7b667418fc6ce43c76a1b5..ebb1715d920d624e54b1e00750082e52dedb2fe8 100644 (file)
@@ -134,7 +134,7 @@ class wxContourMainFrame : public wxPanel {
        // Creational and initialization methods
        //------------------------------------------------------------------------------------------------------------
 
-       void setVectImages( std::vector<vtkImageData*> images );
+       void setVectImages( );
 
        bool configurePanels( );
 
@@ -351,6 +351,7 @@ private:
        vtkImageMapToColors * _thresholdMapper;
        vtkImageActor * _thresholdActor;
 
+       std::vector<vtkImageData*> _images;
 
        bool _actorPresent;