X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Fkernel%2Fvolume.hxx;h=0412c8d3895a5dc5974305d4d50e10597438f620;hb=f7634324fc5790ec510ad4f3db642c705dfb685e;hp=5d29892cf6e14209f331ba256144ac6676270550;hpb=b299d0edface430f0b0ed6221987593bb123f513;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/kernel/volume.hxx b/lib/maracasVisuLib/src/kernel/volume.hxx index 5d29892..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: 2008/11/24 10:47:12 $ - Version: $Revision: 1.2 $ + Date: $Date: 2010/04/29 16:05:37 $ + Version: $Revision: 1.8 $ Copyright: (c) 2002, 2003 License: @@ -21,18 +21,11 @@ #include "marTypes.h" #include -#ifdef KGFO_USE_IDO -extern "C" -{ -#include -}; -#endif // KGFO_USE_IDO - #ifdef KGFO_USE_VTK #include #endif // KGFO_USE_VTK -class MARACASVISULIB_EXPORTS kVolume +class creaMaracasVisu_EXPORT kVolume { public: @@ -50,22 +43,17 @@ class MARACASVISULIB_EXPORTS kVolume static const vtkIdType VTKTypes[]; #endif // KGFO_USE_VTK -#ifdef KGFO_USE_IDO - - static const int IDOTypes[]; - -#endif // KGFO_USE_IDO public: kVolume( ); kVolume( Type type, - uint xdim, uint ydim, uint zdim, + uint32_t xdim, uint32_t ydim, uint32_t zdim, double xsize = 1, double ysize = 1, double zsize = 1, void* data = 0 ); kVolume( Type type, - const uint *dims, + const uint32_t *dims, const double *sizes, void* data = 0 ); @@ -79,30 +67,30 @@ class MARACASVISULIB_EXPORTS kVolume bool sameDimension( const kVolume& comp ); - const uint* getDimensions( ) const { return( _dims ); } - uint getWidth( ) const { return( _dims[ CX ] ); } - uint getHeight( ) const { return( _dims[ CY ] ); } - uint getDepth( ) const { return( _dims[ CZ ] ); } - uint getNcols( ) const { return( _dims[ CX ] ); } - uint getNrows( ) const { return( _dims[ CY ] ); } - uint getNplanes( ) const { return( _dims[ CZ ] ); } - uint getXdim( ) const { return( _dims[ CX ] ); } - uint getYdim( ) const { return( _dims[ CY ] ); } - uint getZdim( ) const { return( _dims[ CZ ] ); } - - void setDimensions( uint* dims ) + const uint32_t* getDimensions( ) const { return( _dims ); } + uint32_t getWidth( ) const { return( _dims[ CX ] ); } + uint32_t getHeight( ) const { return( _dims[ CY ] ); } + uint32_t getDepth( ) const { return( _dims[ CZ ] ); } + uint32_t getNcols( ) const { return( _dims[ CX ] ); } + uint32_t getNrows( ) const { return( _dims[ CY ] ); } + uint32_t getNplanes( ) const { return( _dims[ CZ ] ); } + uint32_t getXdim( ) const { return( _dims[ CX ] ); } + uint32_t getYdim( ) const { return( _dims[ CY ] ); } + uint32_t getZdim( ) const { return( _dims[ CZ ] ); } + + void setDimensions( uint32_t* dims ) { - memcpy( _dims, dims, 3 * sizeof( uint ) ); + memcpy( _dims, dims, 3 * sizeof( uint32_t ) ); } - void setWidth( uint w ) { _dims[ CX ] = w; } - void setHeight( uint h ) { _dims[ CY ] = h; } - void setDepth( uint d ) { _dims[ CZ ] = d; } - void setNcols( uint c ) { _dims[ CX ] = c; } - void setNrows( uint r ) { _dims[ CY ] = r; } - void setNplanes( uint p ) { _dims[ CZ ] = p; } - void setXdim( uint x ) { _dims[ CX ] = x; } - void setYdim( uint y ) { _dims[ CY ] = y; } - void setZdim( uint z ) { _dims[ CZ ] = z; } + void setWidth( uint32_t w ) { _dims[ CX ] = w; } + void setHeight( uint32_t h ) { _dims[ CY ] = h; } + void setDepth( uint32_t d ) { _dims[ CZ ] = d; } + void setNcols( uint32_t c ) { _dims[ CX ] = c; } + void setNrows( uint32_t r ) { _dims[ CY ] = r; } + void setNplanes( uint32_t p ) { _dims[ CZ ] = p; } + void setXdim( uint32_t x ) { _dims[ CX ] = x; } + void setYdim( uint32_t y ) { _dims[ CY ] = y; } + void setZdim( uint32_t z ) { _dims[ CZ ] = z; } const double *getSizes( ) const { return( _sizes ); } double getXsize( ) const { return( _sizes[ CX ] ); } @@ -166,7 +154,7 @@ class MARACASVISULIB_EXPORTS kVolume Type _type; Creator _creator; - uint _dims[ 3 ]; + uint32_t _dims[ 3 ]; double _sizes[ 3 ]; void* _raw; void** _columns; @@ -196,62 +184,6 @@ class MARACASVISULIB_EXPORTS kVolume #endif // KGFO_USE_VTK - -#ifdef KGFO_USE_IDO - - public: - - kVolume( PPPVOLUME org ); - - kVolume& operator=( PPPVOLUME org ); - void copyFrom( PPPVOLUME org ); - - PPPVOLUME castIdo( ) const - { - return( ( PPPVOLUME )( &_privateIdo[ 1 ] ) ); - } - operator PPPVOLUME( ) const - { - return( ( PPPVOLUME )( &_privateIdo[ 1 ] ) ); - } - operator PPPVOLUME_CHAR( ) const - { - return( ( PPPVOLUME_CHAR )( &_privateIdo[ 1 ] ) ); - } - operator PPPVOLUME_FLOAT( ) const - { - return( ( PPPVOLUME_FLOAT )( &_privateIdo[ 1 ] ) ); - } - operator PPPVOLUME_DOUBLE( ) const - { - return( ( PPPVOLUME_DOUBLE )( &_privateIdo[ 1 ] ) ); - } - operator PPPVOLUME_LONG( ) const - { - return( ( PPPVOLUME_LONG )( &_privateIdo[ 1 ] ) ); - } - operator PPPVOLUME_SHORT( ) const - { - return( ( PPPVOLUME_SHORT )( &_privateIdo[ 1 ] ) ); - } - operator PPPVOLUME_UCHAR( ) const - { - return( ( PPPVOLUME_UCHAR )( &_privateIdo[ 1 ] ) ); - } - operator PPPVOLUME_ULONG( ) const - { - return( ( PPPVOLUME_ULONG )( &_privateIdo[ 1 ] ) ); - } - operator PPPVOLUME_USHORT( ) const - { - return( ( PPPVOLUME_USHORT )( &_privateIdo[ 1 ] ) ); - } - - protected: - - PRIVATE_VOLUME* _privateIdo; - -#endif // KGFO_USE_IDO }; #endif // KGFO__VOLUME__HXX