Program: wxMaracas
Module: $RCSfile: volume.cxx,v $
Language: C++
- Date: $Date: 2009/05/14 13:54:43 $
- Version: $Revision: 1.5 $
+ Date: $Date: 2010/03/15 14:12:30 $
+ Version: $Revision: 1.6 $
Copyright: (c) 2002, 2003
License:
// -------------------------------------------------------------------------
kVolume::kVolume( )
- : _type( UCHAR ), _creator( SELF ),
-#ifdef KGFO_USE_VTK
- _vtk( NULL ),
-#endif // KGFO_USE_VTK
-//#ifdef KGFO_USE_IDO
-// _privateIdo( NULL ),
-//#endif // KGFO_USE_IDO
- _raw( NULL ), _columns( NULL ),
+ : _type( UCHAR ),
+ _creator( SELF ),
+ _raw( NULL ),
+ _columns( NULL ),
_images( NULL )
+#ifdef KGFO_USE_VTK
+ ,
+ _vtk( NULL )
+#endif // KGFO_USE_VTK
{
_dims[ CX ] = 1; _dims[ CY ] = 1; _dims[ CZ ] = 1;
_sizes[ CX ] = 1; _sizes[ CY ] = 1; _sizes[ CZ ] = 1;
uint xdim, uint ydim, uint zdim,
double xsize, double ysize, double zsize,
void* data )
- : _type( type ), _creator( SELF ),
-#ifdef KGFO_USE_VTK
- _vtk( NULL ),
-#endif // KGFO_USE_VTK
-//#ifdef KGFO_USE_IDO
-// _privateIdo( NULL ),
-//#endif // KGFO_USE_IDO
- _raw( NULL ), _columns( NULL ),
+ : _type( type ),
+ _creator( SELF ),
+ _raw( NULL ),
+ _columns( NULL ),
_images( NULL )
+#ifdef KGFO_USE_VTK
+ ,
+ _vtk( NULL )
+#endif // KGFO_USE_VTK
{
_dims[ CX ] = xdim; _dims[ CY ] = ydim; _dims[ CZ ] = zdim;
_sizes[ CX ] = xsize; _sizes[ CY ] = ysize; _sizes[ CZ ] = zsize;
const uint *dims,
const double *sizes,
void* data )
- : _type( type ), _creator( SELF ),
-#ifdef KGFO_USE_VTK
- _vtk( NULL ),
-#endif // KGFO_USE_VTK
-//#ifdef KGFO_USE_IDO
-// _privateIdo( NULL ),
-//#endif // KGFO_USE_IDO
+ : _type( type ),
+ _creator( SELF ),
_raw( NULL ), _columns( NULL ),
_images( NULL )
+#ifdef KGFO_USE_VTK
+ ,
+ _vtk( NULL )
+#endif // KGFO_USE_VTK
+
{
memcpy( _dims, dims, 3 * sizeof( uint ) );
memcpy( _sizes, sizes, 3 * sizeof( double ) );
// -------------------------------------------------------------------------
kVolume::kVolume( const kVolume& org )
- : _type( UCHAR ), _creator( SELF ),
-#ifdef KGFO_USE_VTK
- _vtk( NULL ),
-#endif // KGFO_USE_VTK
-//#ifdef KGFO_USE_IDO
-// _privateIdo( NULL ),
-//#endif // KGFO_USE_IDO
- _raw( NULL ), _columns( NULL ),
+ : _type( UCHAR ),
+ _creator( SELF ),
+ _raw( NULL ),
+ _columns( NULL ),
_images( NULL )
+#ifdef KGFO_USE_VTK
+ ,
+ _vtk( NULL )
+#endif // KGFO_USE_VTK
+
{
copyFrom( org );
}
void kVolume::deallocate( )
{
#ifdef KGFO_USE_VTK
-
if( _vtk ) _vtk->Delete();
_vtk = NULL;
-
#endif // KGFO_USE_VTK
-
-//#ifdef KGFO_USE_IDO
-
-// if( _creator == SELF || _creator == VTK ) {
-
-// delete[] _privateIdo;
-// _privateIdo = NULL;
-
-// } // fi
-
-//#else
-
delete[] ( uchar* )_images;
-
-//#endif // KGFO_USE_IDO
-
if( _raw && _creator == SELF )
//EED purify 12/sept/2006
// delete[] ( uchar* )_raw;
- free ( _raw );
+ free ( _raw );
- _creator = SELF;
- _raw = NULL;
- _columns = NULL;
- _images = NULL;
+ _creator = SELF;
+ _raw = NULL;
+ _columns = NULL;
+ _images = NULL;
}
#ifdef KGFO_USE_VTK
// -------------------------------------------------------------------------
kVolume::kVolume( vtkImageData* org )
- : _raw( 0 ), _columns( 0 ), _images( 0 ),
+ :
_creator( VTK ),
-//#ifdef KGFO_USE_IDO
-// _privateIdo( NULL ),
-//#endif // KGFO_USE_IDO
+ _raw( 0 ),
+ _columns( 0 ),
+ _images( 0 ),
_vtk( 0 )
{
//int i, j, k, y;
//#endif // KGFO_USE_IDO
- _vtk = NULL;
- _raw = NULL;
- _columns = NULL;
- _images = NULL;
- _creator = SELF;
+ _vtk = NULL;
+ _raw = NULL;
+ _columns = NULL;
+ _images = NULL;
+ _creator = SELF;
switch( org->GetScalarType( ) ) {
Program: wxMaracas
Module: $RCSfile: volume.hxx,v $
Language: C++
- Date: $Date: 2009/05/14 13:54:43 $
- Version: $Revision: 1.5 $
+ Date: $Date: 2010/03/15 14:12:30 $
+ Version: $Revision: 1.6 $
Copyright: (c) 2002, 2003
License:
#include "marTypes.h"
#include <string>
-//#ifdef KGFO_USE_IDO
-//extern "C"
-//{
-//#include <idvol.h>
-//};
-//#endif // KGFO_USE_IDO
-
#ifdef KGFO_USE_VTK
#include <vtkImageData.h>
#endif // KGFO_USE_VTK
static const vtkIdType VTKTypes[];
#endif // KGFO_USE_VTK
-//#ifdef KGFO_USE_IDO
-//
-// static const int IDOTypes[];
-//
-//#endif // KGFO_USE_IDO
public:
#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