]> Creatis software - creaMaracasVisu.git/commitdiff
use uint32_t instead of ulong, etc
authorjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Thu, 29 Apr 2010 16:05:33 +0000 (16:05 +0000)
committerjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Thu, 29 Apr 2010 16:05:33 +0000 (16:05 +0000)
lib/maracasVisuLib/src/CutModule/interface/CutModelMainPanel.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualBaseModel.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourControler.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx
lib/maracasVisuLib/src/kernel/include/marAxis.h
lib/maracasVisuLib/src/kernel/volume.cxx
lib/maracasVisuLib/src/kernel/volume.hxx

index 68dbb67e5bf38a8da8e84f39a5c42c19e363ec11..a2265195ca2e5833ce948caaa851f6a48b04b4b0 100644 (file)
@@ -3,8 +3,8 @@
 Program:   wxMaracas
 Module:    $RCSfile: CutModelMainPanel.cxx,v $
 Language:  C++
-Date:      $Date: 2010/04/29 15:39:43 $
-Version:   $Revision: 1.9 $
+Date:      $Date: 2010/04/29 16:05:33 $
+Version:   $Revision: 1.10 $
 
 Copyright: (c) 2002, 2003
 License:
@@ -265,7 +265,7 @@ void CutModelMainPanel::onUndo()
 void CutModelMainPanel::onRedo(){
        try{
                checkInvariant();               
-               int result = cutmanager->Redo();
+               /*int result = */ cutmanager->Redo();
 
        }catch(CutModelException e){
                showErrorDialog(e.getCause());
index 43a52ba2b9f65728c8b4cfaa8426a99afe3bb5b0..073cba028b26d183b6e798efa327b901140e5589 100644 (file)
@@ -197,7 +197,6 @@ int  manualBaseModel::IsPoint(double x, double y)
                }
        }
        return exists;
-
 }
 // ----------------------------------------------------------------------------
 manualPoint* manualBaseModel::GetManualPoint(int id)
@@ -243,20 +242,20 @@ void manualBaseModel::CopyAttributesTo( manualBaseModel * cloneObject)
        }
 }
 
-
 // ---------------------------------------------------------------------------
 void manualBaseModel::AddManualPoint( manualPoint* theManualPoint )
 {
        _lstPoints.push_back( theManualPoint );
 }
-
+// ---------------------------------------------------------------------------
 void manualBaseModel::Open(FILE *ff)   // virtual
 {
 }
+// ---------------------------------------------------------------------------
 void manualBaseModel::Save(FILE *ff)   // virtual
 {
 }
-
+// ---------------------------------------------------------------------------
 void manualBaseModel::SaveData(FILE *ff)// virtual
 {
 }
@@ -267,16 +266,16 @@ void manualBaseModel::SetNumberOfPointsSpline(int size)
 {
        _sizePointsContour = size;
 }
-
+// ---------------------------------------------------------------------------
 double manualBaseModel::GetPathSize()
 {
        return 0.0;
 }
-
+// ---------------------------------------------------------------------------
 void manualBaseModel::Transform_Ax_Plus_B (double Ax, double Bx, double Ay, double By)
 {
 }
-
+// ---------------------------------------------------------------------------
 void manualBaseModel::GetSpline_i_Point(int i, double *x, double *y, double *z)
 {
        //RaC 20-09-09 IF it's a points contour
@@ -295,9 +294,7 @@ void manualBaseModel::GetSpline_i_Point(int i, double *x, double *y, double *z)
                        *y      = mp->GetY();
                        *z      = mp->GetZ();
                }
-
        }
-
 }
 
 void manualBaseModel::GetSpline_t_Point(double t, double *x, double *y, double *z)
@@ -329,17 +326,17 @@ std::vector<manualBaseModel*> manualBaseModel::ExploseModel(  )
 }
 
 // ---------------------------------------------------------------------------
-double                 manualBaseModel::GetPathArea()
+double manualBaseModel::GetPathArea()
 {
        return 0.0;
 }
-void                   manualBaseModel::GetNearestPointAndNormal(double *p, double *rp,  double *rn)
+void manualBaseModel::GetNearestPointAndNormal(double *p, double *rp,  double *rn)
 {
 }
-void                   manualBaseModel::SetCloseContour(bool closeContour)
+void manualBaseModel::SetCloseContour(bool closeContour)
 {
 }
-bool                   manualBaseModel::IfCloseContour()
+bool manualBaseModel::IfCloseContour()
 {
        return false;
 }
index c8db3cb46879a1248283bd07e3f77ffb347a30a2..0711912763befc8956c37cb445377bdbf87e8bea 100644 (file)
@@ -262,7 +262,6 @@ void manualContourBaseControler::MouseClickLeft(int x, int y) // virtual
 // ----------------------------------------------------------------------------
 void manualContourBaseControler::MouseClickRight(int x, int y)
 {
-
        SetCompleteCreation( true );
        SetKeyBoardMoving( false );
        this->GetManualContourModel()->SetCloseContour(true);
@@ -467,7 +466,7 @@ void manualContourBaseControler::AddPoint(int x, int y, int z) // virtual
 
                GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz);
 printf("EED %p manualContourBaseControler::AddPoint \n", this);
-               GetManualContourModel()->AddPoint(xx,yy,zz);  
+               GetManualContourModel()->AddPoint(xx,yy,zz);
                GetManualViewBaseContour()->AddPoint();
 //             GetManualViewBaseContour()->UpdateViewPoint(id);
        }
index d16ba12a064f1c12f477493fefcb4f625f9cfa87..24e8b715a72ca0bb19eada6c3f0a11bd78fa7d65 100644 (file)
@@ -29,7 +29,7 @@ public:
 protected:
        bool    _easyCreation;
 private:
-       
+
 };
 
 #endif // manualContourControler_h
index f7a1a7955909522c179281abcfc5697a6f815adc..f8369751bf63a9c61c893790852361d8776a308e 100644 (file)
@@ -266,7 +266,6 @@ void manualContourModel::SetNumberOfPointsSpline(int size)
        _sizePointsContour = size;
 }
 
-
 // ----------------------------------------------------------------------------
 
 void manualContourModel::SetCloseContour(bool closeContour)
index f448458d1dcccfce36e0d4e3faecb4bde3916ef7..9c8005e3326b9fc0c71f348fff473ea88f8b8c23 100644 (file)
@@ -267,20 +267,16 @@ void manualViewBaseContour::ConstructVTKObjects()
     _bboxMapper                        =       vtkPolyDataMapper::New();
     _bboxMapper->ScalarVisibilityOff( );
 
-
        _bboxMapper->SetInput(_pd);
        _bboxMapper->ImmediateModeRenderingOn();
        _contourVtkActor->SetMapper(_bboxMapper);
        _contourVtkActor->GetProperty()->BackfaceCullingOff();
 
-
        UpdateColorActor();
 
        _pd->ComputeBounds();
 
        InitTextActor();
-       
-       
 }
 
 void manualViewBaseContour::InitTextActor()
@@ -529,9 +525,8 @@ bool manualViewBaseContour::SelectPosibleContour(int x, int y, int z)
                        {
                                result=true;
                                SetPosibleSelected(result);
-                       } 
+                       }
                }
-
        }
        return result;
 }
index 6247a2b926784e6d713a66d364519317a1f4f707..bf749e6620b70d7eced6ca83f1921234ade995b7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracas_ViewerWidget.cxx,v $
   Language:  C++
-  Date:      $Date: 2010/04/20 16:11:37 $
-  Version:   $Revision: 1.27 $
+  Date:      $Date: 2010/04/29 16:05:34 $
+  Version:   $Revision: 1.28 $
 
   Copyright: (c) 2002, 2003
   License:
@@ -65,8 +65,8 @@
                mwxsphereview                   = NULL;
                mwxvtkclipping3Dview            = NULL;
                mwxvtk3Dbaseview_Clipping3D     = NULL;
-               mwxvtkmpr3Dview                 = NULL;
-               vtkmpr3Ddataviewer              = NULL;
+               mwxvtkmpr3Dview                     = NULL;
+               vtkmpr3Ddataviewer                  = NULL;
 
                if (type==-1)
                {
index 61064749ed68ab1a77fc892a76711b91ef093d91..db7c7861431fc84f073a63d568b93a3844c110fb 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: marAxis.h,v $
   Language:  C++
-  Date:      $Date: 2010/04/20 16:11:41 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2010/04/29 16:05:38 $
+  Version:   $Revision: 1.3 $
 
   Copyright: (c) 2002, 2003
   License:
@@ -106,17 +106,17 @@ public:
   void calculateSignal( kVolume* vol );
     
 
-  int getActualQuant( )                                { return _actualQuant;                  }
+  int getActualQuant( )                                                { return _actualQuant;                          }
 
-  float getSignal( uint32_t slice )            { return( _signal[ slice ] );           };
+  float getSignal( uint slice )                                { return( _signal[ slice ] );           };
 
-  double* getSplinePoint( uint32_t i )         { return ( _points[ i ] );              };
+  double* getSplinePoint( uint i )                     { return ( _points[ i ] );                      };
 
-  int getHealthySlice( )                       { return( _healthySlice );              };
-  int getHealthySliceStart( )                  { return( _healthySliceStart );         };
-  int getHealthySliceEnd( )                    { return( _healthySliceEnd );           };
+  int getHealthySlice( )                                       { return( _healthySlice );                      };
+  int getHealthySliceStart( )                          { return( _healthySliceStart );         };
+  int getHealthySliceEnd( )                                    { return( _healthySliceEnd );           };
 
-  void setActualQuant(int act)                 { _actualQuant=act;                     };
+  void setActualQuant(int act)                         { _actualQuant=act;                                     };
 
   void setHealthySlice( int hsS, int hs, int hsE );
 
@@ -156,14 +156,12 @@ public:
   vtkImageData* getSliceImage( int i ) { return(_quantificationImages[ i ]);  };
 */
 
-
-  bool if3DcontourExist(int i); 
-  void Save3Dcontour(FILE *ff,int i);
-  void SaveExisting3DContours(FILE *ff);
-
+  bool              if3DcontourExist(int i);
+  void                         Save3Dcontour(FILE *ff,int i);
+  void                         SaveExisting3DContours(FILE *ff);
        
   marContour*          getContour(             int i , kVolume* vol );         // DATA-MODEL-2D  
-  kVolume*             getSlice(               int i , kVolume* vol );         // DATA-MODEL-Voxel XxYx1
+  kVolume*                     getSlice(               int i , kVolume* vol );         // DATA-MODEL-Voxel XxYx1
   vtkProbeFilter*      get3DSlice(             int i , kVolume* vol );         // VISUALISATION-VTK 3D
   vtkPoints*           get3Dcontour(   int i , kVolume* vol );         // VISUALISATION-VTK 3D
   vtkImageData*                getSliceImage(  int i , kVolume* vol );         // VISUALISATION-VTK 2D
index 7fbe85cc1276d06e2b598a3bb3a4cfdf977d50bf..698133ad22050a11860cf4b24f73b7d534702a6a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: volume.cxx,v $
   Language:  C++
-  Date:      $Date: 2010/04/20 16:11:40 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2010/04/29 16:05:37 $
+  Version:   $Revision: 1.9 $
 
   Copyright: (c) 2002, 2003
   License:
@@ -220,12 +220,12 @@ double kVolume::getPixel( uint32_t x, uint32_t y, uint32_t z ) const
 
     switch( _type ) {
                
-    case CHAR:   p = ( double )( ( int8_t*** )_images )[ z ][ y ][ x ]; break;
-    case FLOAT:  p = ( double )( ( float*** )_images )[ z ][ y ][ x ]; break;
-    case DOUBLE: p = ( double )( ( double*** )_images )[ z ][ y ][ x ]; break;
-    case INT:    p = ( double )( ( int32_t*** )_images )[ z ][ y ][ x ]; break;
-    case SHORT:  p = ( double )( ( int16_t*** )_images )[ z ][ y ][ x ]; break;
-    case UCHAR:  p = ( double )( ( uint8_t*** )_images )[ z ][ y ][ x ]; break;
+    case CHAR:   p = ( double )( ( int8_t*** )_images )[ z ][ y ][ x ];   break;
+    case FLOAT:  p = ( double )( ( float*** )_images )[ z ][ y ][ x ];    break;
+    case DOUBLE: p = ( double )( ( double*** )_images )[ z ][ y ][ x ];   break;
+    case INT:    p = ( double )( ( int32_t*** )_images )[ z ][ y ][ x ];  break;
+    case SHORT:  p = ( double )( ( int16_t*** )_images )[ z ][ y ][ x ];  break;
+    case UCHAR:  p = ( double )( ( uint8_t*** )_images )[ z ][ y ][ x ];  break;
     case UINT:   p = ( double )( ( uint32_t*** )_images )[ z ][ y ][ x ]; break;
     case USHORT: p = ( double )( ( uint16_t*** )_images )[ z ][ y ][ x ]; break;
     default: p = 0.0; break;
@@ -269,12 +269,12 @@ void kVolume::convertCast( Type type )
        case CHAR:
            switch( type ) {
 
-           case SHORT:  convertCastT( ( char* )_raw, ( int16_t* )buffer, size ); break;
-           case INT:    convertCastT( ( char* )_raw, ( int32_t* )buffer, size ); break;
+           case SHORT:  convertCastT( ( char* )_raw, ( int16_t* )buffer, size );  break;
+           case INT:    convertCastT( ( char* )_raw, ( int32_t* )buffer, size );  break;
            case USHORT: convertCastT( ( char* )_raw, ( uint16_t* )buffer, size ); break;
            case UINT:   convertCastT( ( char* )_raw, ( uint32_t* )buffer, size ); break;
-           case FLOAT:  convertCastT( ( char* )_raw, ( float* )buffer, size ); break;
-           case DOUBLE: convertCastT( ( char* )_raw, ( double* )buffer, size ); break;
+           case FLOAT:  convertCastT( ( char* )_raw, ( float* )buffer, size );    break;
+           case DOUBLE: convertCastT( ( char* )_raw, ( double* )buffer, size );   break;
            case UCHAR:  convertCastT( ( char* )_raw, ( uint8_t* )buffer, size ); break;
            default : break;
 
@@ -284,13 +284,13 @@ void kVolume::convertCast( Type type )
        case SHORT:
            switch( type ) {
 
-           case CHAR:   convertCastT( ( int16_t* )_raw, ( uint8_t* )buffer, size ); break;
-           case INT:    convertCastT( ( int16_t* )_raw, ( int32_t* )buffer, size ); break;
+           case CHAR:   convertCastT( ( int16_t* )_raw, ( uint8_t* )buffer, size );  break;
+           case INT:    convertCastT( ( int16_t* )_raw, ( int32_t* )buffer, size );  break;
            case USHORT: convertCastT( ( int16_t* )_raw, ( uint16_t* )buffer, size ); break;
            case UINT:   convertCastT( ( int16_t* )_raw, ( uint32_t* )buffer, size ); break;
-           case FLOAT:  convertCastT( ( int16_t* )_raw, ( float* )buffer, size ); break;
-           case DOUBLE: convertCastT( ( int16_t* )_raw, ( double* )buffer, size ); break;
-           case UCHAR:  convertCastT( ( int16_t* )_raw, ( uint8_t* )buffer, size ); break;
+           case FLOAT:  convertCastT( ( int16_t* )_raw, ( float* )buffer, size );    break;
+           case DOUBLE: convertCastT( ( int16_t* )_raw, ( double* )buffer, size );   break;
+           case UCHAR:  convertCastT( ( int16_t* )_raw, ( uint8_t* )buffer, size );  break;
            default : break;
            } // fswitch
            break;
index 112b6a65c3b273fcd3198fac7a9f5a6dab7ef04f..0412c8d3895a5dc5974305d4d50e10597438f620 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: volume.hxx,v $
   Language:  C++
-  Date:      $Date: 2010/04/20 16:11:40 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2010/04/29 16:05:37 $
+  Version:   $Revision: 1.8 $
 
   Copyright: (c) 2002, 2003
   License:
@@ -127,8 +127,8 @@ class creaMaracasVisu_EXPORT kVolume
        return( SIZETypes[ _type ] * getRawSize( ) );
     }
 
-    double getPixel( uint32_t x, uint32_t y, uint32_t z ) const;
-    void setPixel( double v, uint32_t x, uint32_t y, uint32_t z );
+    double getPixel( uint x, uint y, uint z ) const;
+    void setPixel( double v, uint x, uint y, uint z );
 
     void convertCast( Type type );
     void convertScale( Type type, double min, double max );