]> Creatis software - creaContours.git/commitdiff
OK
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Mon, 20 Apr 2009 09:16:02 +0000 (09:16 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Mon, 20 Apr 2009 09:16:02 +0000 (09:16 +0000)
appli/wxContourGUIExample/wxContourGUIExample.cxx
lib/Interface_Icons_NDimensions/interfSegmentationPanels.cxx
lib/Interface_ManagerContour_NDimensions/PanelBullEyeOptions.cxx
lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx
lib/Interface_ManagerContour_NDimensions/wxContourViewPanel.cxx
lib/Interface_ManagerContour_NDimensions/wxInstantChooserPanel.cxx
lib/kernel_ManagerContour_NDimensions/KernelManagerContour.cxx

index 307361e8c2b596df4e5d0308f6c632e8d5687421..399080797331edf6526afc3641686990baaf6bd9 100644 (file)
@@ -2,7 +2,6 @@
 // Class definition include
 //----------------------------------------------------------------------------------------------------------------
 
-
 #include "wxContourGUIExample.h"
 #include "wxContourMainFrame.h"
 //#include "OutlineModelManager.h"
@@ -28,9 +27,6 @@
 //#include "SomeEnvironment.h"
 //#include "ReaderEnvironment.h"
 
-
-
-
 //#include "interfMainPanel.h"
 
 
index 4345971c95586d0bafa9d6830dbfc982162ce964..b4e169642ec5c8c7ed80fdad89aed8dc525a3e34 100644 (file)
@@ -126,20 +126,27 @@ void interfSegmentationPanelVTK::setLabel(wxString tmpString){
 interfSegmentationPanelITK::interfSegmentationPanelITK(wxWindow * parent)
 : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN)
 {
-       int sizeZ = interfMainPanel::getInstance()->GetImageDataSizeZ();
+//     int sizeZ = interfMainPanel::getInstance()->GetImageDataSizeZ();
        //int sizeZ = _theViewPanel->getSceneManager()->GetImageDataSizeZ();
        double range[2];
        //_theViewPanel->getSceneManager()->GetImageDataRange(range);
        interfMainPanel::getInstance()->GetImageDataRange(range);
        
        //The labels
-       wxStaticText * distance =    new wxStaticText(this, wxID_ANY, wxT("Initial Distance"),   wxPoint(5, 5));
-       wxStaticText * sigma =       new wxStaticText(this, wxID_ANY, wxT("Sigma"),              wxPoint(5, 30));
-       wxStaticText * alfa =        new wxStaticText(this, wxID_ANY, wxT("Sigmoid Alfa"),       wxPoint(5, 55));
-       wxStaticText * beta =        new wxStaticText(this, wxID_ANY, wxT("Sigmoid Beta"),       wxPoint(5, 80));
-       wxStaticText * propagation = new wxStaticText(this, wxID_ANY, wxT("Propagation Scaling"),wxPoint(5, 105));
-       wxStaticText * iterations =  new wxStaticText(this, wxID_ANY, wxT("Iterations"),         wxPoint(5, 130));
-       wxStaticText * infStrength = new wxStaticText(this, wxID_ANY, wxT("Inflation Strength"), wxPoint(5, 155));
+       //wxStaticText * distance =    
+       new wxStaticText(this, wxID_ANY, wxT("Initial Distance"),   wxPoint(5, 5));
+       //wxStaticText * sigma =       
+       new wxStaticText(this, wxID_ANY, wxT("Sigma"),              wxPoint(5, 30));
+       //wxStaticText * alfa =        
+       new wxStaticText(this, wxID_ANY, wxT("Sigmoid Alfa"),       wxPoint(5, 55));
+       //wxStaticText * beta =        
+       new wxStaticText(this, wxID_ANY, wxT("Sigmoid Beta"),       wxPoint(5, 80));
+       //wxStaticText * propagation = 
+       new wxStaticText(this, wxID_ANY, wxT("Propagation Scaling"),wxPoint(5, 105));
+       //wxStaticText * iterations =  
+       new wxStaticText(this, wxID_ANY, wxT("Iterations"),         wxPoint(5, 130));
+       //wxStaticText * infStrength = 
+       new wxStaticText(this, wxID_ANY, wxT("Inflation Strength"), wxPoint(5, 155));
 
        //Text Controls
 
@@ -152,7 +159,8 @@ interfSegmentationPanelITK::interfSegmentationPanelITK(wxWindow * parent)
        _infStrength =   new wxTextCtrl(this, wxID_ANY, wxT("3.0"),  wxPoint(98,155), wxSize(80, 20), 0, wxDefaultValidator, wxTextCtrlNameStr);
        
        //El boton
-       wxButton * bot = new wxButton(this, 6, wxT("One Slice"), wxPoint(98, 180), wxSize(70, 25), 0, wxDefaultValidator, wxT("button"));
+       //wxButton * bot = 
+       new wxButton(this, 6, wxT("One Slice"), wxPoint(98, 180), wxSize(70, 25), 0, wxDefaultValidator, wxT("button"));
 
        //Conexion del boton con su respectivo manejador
        Connect(6, wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction) &interfSegmentationPanelITK::onSegmentationOneSlice);
index 68137c53117126f289dc0c206504f625f2527ff8..9ad29387dfea3bb47e768a8f9215e6935626cc96 100644 (file)
@@ -210,7 +210,7 @@ double PanelBullEyeOptions::GetAngOfCrownSection(int nCrown,int section)
        } else {
                angle = this->_lstBullEyeDetailAngle[nCrown]->GetValue();
        }
-       double numOfSec = (double)GetNumberOfSections(nCrown);
+//     double numOfSec = (double)GetNumberOfSections(nCrown);
        double deltaSec = GetAngDeltaOfCrownSection(nCrown);
        return angle + section*deltaSec ;
 }
index 4ca7174761dd6c4e30e7a090ef083ab15a51120e..365cd88bf99817ae26d9000b2435a21b3e6d6215 100644 (file)
@@ -1024,25 +1024,25 @@ void wxContourMainFrame::SegmentationOneSliceITK(int x, int y, int z, wxString d
   typedef unsigned short OutputPixelType2;
   typedef itk::Image< OutputPixelType2, Dimension > OutputImageType2;
 
-  //Definición del thresholder
+  //DefiniciÛn del thresholder
   typedef itk::BinaryThresholdImageFilter< 
                         InternalImageType, 
                         OutputImageType    >    ThresholdingFilterType;
   
-  //Definición del primer filtro de conversión de pixeles
+  //DefiniciÛn del primer filtro de conversiÛn de pixeles
   typedef itk::CastImageFilter<
                OutputImageType, OutputImageType2 >  CastFilterType;
 
-  //Definición del segundo tipo de conversión de pixeles
+  //DefiniciÛn del segundo tipo de conversiÛn de pixeles
   typedef itk::CastImageFilter<
                OutputImageType2, InternalImageType >  CastFilterType2;
 
-  //Tercer tipo de conversión
+  //Tercer tipo de conversiÛn
   typedef itk::RescaleIntensityImageFilter< 
                                InternalImageType, 
                                OutputImageType >   CastFilterType3;
 
-  //Cuarto tipo de conversión
+  //Cuarto tipo de conversiÛn
   typedef itk::RescaleIntensityImageFilter< 
                                OutputImageType, 
                                OutputImageType >   CastFilterType4;
@@ -1055,7 +1055,7 @@ void wxContourMainFrame::SegmentationOneSliceITK(int x, int y, int z, wxString d
   thresholder->SetOutsideValue(  255  );
   thresholder->SetInsideValue(  0 );
 
-  //Definción de conexiónes entre VTK e ITK y el writer
+  //DefinciÛn de conexiÛnes entre VTK e ITK y el writer
   typedef itk::VTKImageToImageFilter<OutputImageType2> ConnectorType;
   typedef itk::ImageToVTKImageFilter<OutputImageType> ConnectorType2;
   typedef  itk::ImageFileWriter<  OutputImageType  > WriterType;
@@ -1271,7 +1271,7 @@ myfile.open ("C:/Creatis/example2.txt");
                        std::cout<<" x Anterior "<<xAct<<" x actual "<<x<<std::endl;
                std::cout<<" y Anterior "<<yAct<<" y actual "<<y<<std::endl;
                std::cout<<" x "<<p[0]<<" y "<<p[1]<<std::endl;
-                       vecZ.push_back( -900 );
+                       vecZ.push_back( 900 );
                        xAct=x;
                        yAct=y;
                        }
@@ -1295,7 +1295,7 @@ myfile.open ("C:/Creatis/example2.txt");
                std::cout<<" y Anterior "<<yAct<<" y actual "<<y<<std::endl;
                std::cout<<" x "<<p[0]<<" y "<<p[1]<<std::endl;
                vecY.push_back( p[1] );
-               vecZ.push_back( -900 );
+               vecZ.push_back( 900 );
                xAct=x;
                yAct=y;
                }
@@ -1308,7 +1308,7 @@ myfile.open ("C:/Creatis/example2.txt");
                vecX.push_back(vecXo.back());
                std::cout<<" x Siguiente "<<vecXo.back();
                vecXo.pop_back();
-               vecZ.push_back( -900 );
+               vecZ.push_back( 900 );
        }
        while(!vecYo.empty())
        {
@@ -1562,7 +1562,7 @@ myfile.close();
 //             double y=p[1];
                vecX.push_back( p[0] );
                vecY.push_back( p[1] );
-               vecZ.push_back( -900 );
+               vecZ.push_back( 900 );
 //                     vecZ.push_back( p[2] );
        }
 
index 1394bfaf953a9f8fe062906eafed785df40ad701..428fcecf9e0858b42393d39d093ce2e3c82f71ff 100644 (file)
@@ -304,7 +304,7 @@ DEFINE_EVENT_TYPE( wxINSTANT_CHANGE )
 
                //}
                //JCP 26 - 11 - 08
-       }
+       } 
        /**
        * Handles the event wxEVT_TSBAR_START from the horizontal bar   
        */
@@ -324,7 +324,7 @@ DEFINE_EVENT_TYPE( wxINSTANT_CHANGE )
        */
        void wxContourViewPanel :: onSelectionEnd_Horizontal(wxCommandEvent& event)
        {
-               
+        
        }
        /**
        * Handles the event wxEVT_TSBAR_MOVED from the horizontal bar   
@@ -378,14 +378,14 @@ DEFINE_EVENT_TYPE( wxINSTANT_CHANGE )
        */
        void wxContourViewPanel :: onStartChange_Bar_Vertical(wxCommandEvent& event)
        {
-               int nxStart_v = getStartVertical();
+//             int nxStart_v = getStartVertical();
        }
        /**
        * Handles the event wxEVT_TSBAR_END from the vertical bar       
        */
        void wxContourViewPanel :: onEndChange_Bar_Vertical(wxCommandEvent& event)
        {
-               int nxEnd_v = getEndVertical();
+//             int nxEnd_v = getEndVertical();
        }
        /**
        * Handles the event wxEVT_SELECTION_END from the vertical bar   
@@ -399,8 +399,8 @@ DEFINE_EVENT_TYPE( wxINSTANT_CHANGE )
        */
        void wxContourViewPanel :: onMovedBar_Vertical(wxCommandEvent& event)
        {
-               int nxStart_v = getStartVertical();
-               int nxEnd_v = getEndVertical();
+//             int nxStart_v = getStartVertical();
+//             int nxEnd_v = getEndVertical();
        }       
 
 
@@ -694,7 +694,7 @@ DEFINE_EVENT_TYPE( wxINSTANT_CHANGE )
 
                
                std::vector<std::string> currentSelection = _sceneManager->getSelectedObjects();
-               int elementsSelected = currentSelection.size();
+//             int elementsSelected = currentSelection.size();
                bool ctrlKey = _sceneManager->isCtrlPressed();
                char toolCommand = _sceneManager->getLastKeyCode();
 
index 0bc1fed8ada8d0a0db23621834c96200bf0d1953..ea1cfeaf9a1180866d618e6e63f90d2c61e33758 100644 (file)
@@ -153,7 +153,7 @@ DEFINE_EVENT_TYPE( wxINSTANT_CHOOSER_CHANGE )
                }
                else
                {
-                       for(int i=0; i<_concepts->size(); i++)
+                       for(int i=0; i< (int)(_concepts->size()); i++)
                        {
                                changeResolutionAtConceptControl( (*_concepts)[i] );
                        }
@@ -194,7 +194,7 @@ DEFINE_EVENT_TYPE( wxINSTANT_CHOOSER_CHANGE )
                {
                        int size = _concepts->size();
                        wxConceptControl * aConcept = NULL;
-                       int accum = 0;
+//                     int accum = 0;
 
                        for(int i = 0; i < eventConcept->getNumCheckBox();i++){
                                if(i!=groupID){
@@ -264,7 +264,7 @@ DEFINE_EVENT_TYPE( wxINSTANT_CHOOSER_CHANGE )
        void wxInstantChooserPanel :: setInstant(std::vector<int> choiceInstant)
        {               
                int max = _concepts->size();
-               if( choiceInstant.size() == max )
+               if( (int)(choiceInstant.size()) == max )
                {
                        int i = 0;
                        while(i< max)
@@ -473,7 +473,7 @@ DEFINE_EVENT_TYPE( wxINSTANT_CHOOSER_CHANGE )
                bool isChecked = false;
 
                int i,size = _concepts->size();
-               wxConceptControl * aConcept = NULL;                     
+//             wxConceptControl * aConcept = NULL;                     
                for ( i=0; i<size && !isChecked; i++ )
                {       
                        if( (*_concepts)[i]->getName().compare( theConceptName ) == 0 )
index 30cff3614c071f943e2a35faf29e2dc23a61d2c1..9d3f861c36c4e01e4ab0f245637e629d87b91f11 100644 (file)
@@ -76,7 +76,7 @@ std::vector<vtkImageData*> KernelManagerContour::getVectImages(){
 }
 void KernelManagerContour::setVectImages(std::vector<vtkImageData*> vectimg){
 
-       for(int i = 0; i < vectimg.size(); i++){
+       for(int i = 0; i < (int)(vectimg.size()); i++){
                vtkImageData* img = vectimg[i];
                vtkImageChangeInformation* change = vtkImageChangeInformation::New();
                change->SetInformationInput(img);
@@ -103,7 +103,7 @@ void KernelManagerContour::initializeEnvironment(std::string datadir){
        std::map<std::string, AxeThing *>* axesMap                                      = new std::map<std::string, AxeThing *>();
        std::map<std::string, ContourThing *>* outlinesMap                      = new std::map<std::string, ContourThing *>();  
 
-       for(int i = 0; i < vectimages.size(); i++){
+       for(int i = 0; i < (int)(vectimages.size()); i++){
                vtkImageData* selectedimage = vectimages[i];
                ImageSourceThing * thing                                                                        = new ImageSourceThing(selectedimage);
                std::string imgstring = "Source Image "+intToString(i+1);
@@ -343,7 +343,7 @@ manualContourModel* KernelManagerContour::GetPoints(int z,int type, std::vector<
                for (int j=0 ; j<sizeCtrPt ; j++)
                {
 //JSTG_16-07-08_----------------------------------------------------------------
-                       manModelContour->AddPoint( (*vecCtrlPointX)[j] , (*vecCtrlPointY)[j] , -900  );
+                       manModelContour->AddPoint( (*vecCtrlPointX)[j] , (*vecCtrlPointY)[j] , 900  );
 //--------------------------------------------------------------------
                } // for j
 
@@ -356,7 +356,6 @@ manualContourModel* KernelManagerContour::GetPoints(int z,int type, std::vector<
                
        }// ifSliceKeyContourExist
        return manModelContour;
-
 }
 
 manualContourModel * KernelManagerContour::factoryManualContourModel(int typeContour)
@@ -400,7 +399,7 @@ std::vector<std::string> KernelManagerContour::getOutlinesNameAtInstant(std::vec
        Instant instant(&tempvector);
        std::vector<ContourThing**> vectcont = modelManager->getOutlinesAtInstant( &instant );
        std::vector<std::string> vectname;
-       for(int i = 0; i < vectcont.size(); i++){
+       for(int i = 0; i < (int)(vectcont.size()); i++){
                ContourThing **contourthing = vectcont[i];
                vectname.push_back((*contourthing)->getName());
        }
@@ -436,7 +435,7 @@ void KernelManagerContour::getConceptsInformation(std::vector<std::string>& conc
 vtkImageData* KernelManagerContour::getImageAtInstant(std::vector<int> inst){
        int index = inst[5]-1;
 
-       if(index < vectimages.size()&&index!=_currentIndex){
+       if(index < (int)(vectimages.size())&&index!=_currentIndex){
                _currentIndex=index;
                return vectimages[index];
        }