From: jean-pierre roux Date: Thu, 29 Apr 2010 16:05:33 +0000 (+0000) Subject: use uint32_t instead of ulong, etc X-Git-Tag: CREATOOLS.2-0-3~21 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=c6481486861a91e8ead2033566097c502488670e;p=creaMaracasVisu.git use uint32_t instead of ulong, etc --- diff --git a/lib/maracasVisuLib/src/CutModule/interface/CutModelMainPanel.cxx b/lib/maracasVisuLib/src/CutModule/interface/CutModelMainPanel.cxx index 68dbb67..a226519 100644 --- a/lib/maracasVisuLib/src/CutModule/interface/CutModelMainPanel.cxx +++ b/lib/maracasVisuLib/src/CutModule/interface/CutModelMainPanel.cxx @@ -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()); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualBaseModel.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualBaseModel.cpp index 43a52ba..073cba0 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualBaseModel.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualBaseModel.cpp @@ -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::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; } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp index c8db3cb..0711912 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp @@ -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); } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourControler.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourControler.h index d16ba12..24e8b71 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourControler.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourControler.h @@ -29,7 +29,7 @@ public: protected: bool _easyCreation; private: - + }; #endif // manualContourControler_h diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp index f7a1a79..f836975 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp @@ -266,7 +266,6 @@ void manualContourModel::SetNumberOfPointsSpline(int size) _sizePointsContour = size; } - // ---------------------------------------------------------------------------- void manualContourModel::SetCloseContour(bool closeContour) diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp index f448458..9c8005e 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp @@ -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; } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx index 6247a2b..bf749e6 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx @@ -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) { diff --git a/lib/maracasVisuLib/src/kernel/include/marAxis.h b/lib/maracasVisuLib/src/kernel/include/marAxis.h index 6106474..db7c786 100644 --- a/lib/maracasVisuLib/src/kernel/include/marAxis.h +++ b/lib/maracasVisuLib/src/kernel/include/marAxis.h @@ -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 diff --git a/lib/maracasVisuLib/src/kernel/volume.cxx b/lib/maracasVisuLib/src/kernel/volume.cxx index 7fbe85c..698133a 100644 --- a/lib/maracasVisuLib/src/kernel/volume.cxx +++ b/lib/maracasVisuLib/src/kernel/volume.cxx @@ -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; diff --git a/lib/maracasVisuLib/src/kernel/volume.hxx b/lib/maracasVisuLib/src/kernel/volume.hxx index 112b6a6..0412c8d 100644 --- a/lib/maracasVisuLib/src/kernel/volume.hxx +++ b/lib/maracasVisuLib/src/kernel/volume.hxx @@ -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 );