]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourCrownWidget.cxx
RaC Changes that includes a Polygon contour in creaMaracasVisu. It includes changes
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / Contour / ContourCrownWidget.cxx
index 70fbc814cf1ab4f16e197b898397762a806fb981..4ed87a8046dbdb7f7f0c15f610cbefac8592e301 100644 (file)
@@ -4,7 +4,8 @@
 #include <vtkImageMapToColors.h>
 #include <vtkImageActor.h>
 
-
+#include "wxVtk2DBaseView.h"
+#include "vtkLookupTable.h"
 
 //----------------------------------------------------------------------
   wxMaracasCoutourTool::wxMaracasCoutourTool(wxWindow *parent, wxVtkBaseView *wxvtkbaseview, vtkImageData* imagedata)
 
 
        _manContourControl_1->SetModelView( _mContourModel_1 , _mViewContour_1 );
-       this->wxvtkbaseview->GetInteractorStyleBaseView()->AddInteractorStyleMaracas( _manContourControl_1 );
+       ((vtkInteractorStyleBaseView*)this->wxvtkbaseview->GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _manContourControl_1 );
        _manContourControl_1->CreateNewManualContour();
        _manContourControl_1->SetActive(false);
        _mViewContour_1->RefreshContour();
 
 
        _manContourControl_2->SetModelView( _mContourModel_2 , _mViewContour_2 );
-       this->wxvtkbaseview->GetInteractorStyleBaseView()->AddInteractorStyleMaracas( _manContourControl_2 );
+       ((vtkInteractorStyleBaseView*)this->wxvtkbaseview->GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _manContourControl_2 );
        _manContourControl_2->CreateNewManualContour();
        _manContourControl_2->SetActive(false);
        _mViewContour_2->RefreshContour();
@@ -567,8 +568,7 @@ void wxMaracasCoutourTool::EreaseLastContour(wxCommandEvent& event)
        {
                while(!feof(fd))        
                {
-                       fscanf(fd,""); // ?? JPRx
-                       //fscanf(fd," %s %d",&firstline,&size); // JPRx
+//             //fscanf(fd," %s %d",&firstline,&size); // JPRx
                        fscanf(fd," %s %d",firstline,&size);
 
                        _SizesC.push_back(size);
@@ -599,7 +599,7 @@ void wxMaracasCoutourTool::EreaseLastContour(wxCommandEvent& event)
        if(fd!=NULL)
        {
                int cont = 0;
-               for(i=0; i<_SizesC.size(); i++)
+               for(i=0; i<(int)(_SizesC.size()); i++)
                {
                        fprintf(fd,"\nNumberOfPoints %d", _SizesC[i] );
                        for(j=0; j<_SizesC[i]; j++)
@@ -639,7 +639,7 @@ void wxMaracasCoutourTool::EreaseLastCP(wxCommandEvent& event)
        {
                while(!feof(fd))        
                {
-                       fscanf(fd,"");  // ?? JPRx
+                       //fscanf(fd,"");  // ?? JPRx
                        //fscanf(fd," %s %d",&firstline,&size);// JPRx
                        fscanf(fd," %s %d",firstline,&size); 
                        _SizesC.push_back(size);
@@ -670,7 +670,7 @@ void wxMaracasCoutourTool::EreaseLastCP(wxCommandEvent& event)
        if(fd!=NULL)
        {
                int cont = 0;
-               for(i=0; i<_SizesC.size(); i++)
+               for(i=0; i<(int)(_SizesC.size()); i++)
                {
                        fprintf(fd,"\nNumberOfControlPoints %d", _SizesC[i] );
                        for(j=0; j<_SizesC[i]; j++)