#include #include // ------------------------------------------------------------------------- void cpPlugins::DataObjects::Image:: SetITK( itk::LightObject* o ) { this->Superclass::SetITK( o ); cpPlugins_Demangle_ImageVisualDims( o, _ITK_2_VTK_0 ); else cpPlugins_Demangle_ImageDiffusionTensors3D( o, _ITK_2_VTK_1 ); else { this->m_VTK = NULL; this->m_ITKvVTK = NULL; } // fi this->Modified( ); } // ------------------------------------------------------------------------- void cpPlugins::DataObjects::Image:: SetVTK( vtkObjectBase* o ) { vtkImageData* img = dynamic_cast< vtkImageData* >( o ); this->Superclass::SetVTK( img ); if( img == NULL ) { this->m_ITK = NULL; this->m_ITKvVTK = NULL; this->Modified( ); return; } // fi // Connect both worlds this->_VTK_2_ITK_0< unsigned char >( img ); /* TODO switch( img->GetScalarType( ) ) { case VTK_CHAR: this->_VTK_2_ITK_0< char >( img ); break; case VTK_SHORT: this->_VTK_2_ITK_0< short >( img ); break; case VTK_INT: this->_VTK_2_ITK_0< int >( img ); break; case VTK_LONG: this->_VTK_2_ITK_0< long >( img ); break; case VTK_UNSIGNED_CHAR: this->_VTK_2_ITK_0< unsigned char >( img ); break; case VTK_UNSIGNED_SHORT: this->_VTK_2_ITK_0< unsigned short >( img ); break; case VTK_UNSIGNED_INT: this->_VTK_2_ITK_0< unsigned int >( img ); break; case VTK_UNSIGNED_LONG: this->_VTK_2_ITK_0< unsigned long >( img ); break; case VTK_FLOAT: this->_VTK_2_ITK_0< float >( img ); break; case VTK_DOUBLE: this->_VTK_2_ITK_0< double >( img ); break; default: { this->m_ITK = NULL; this->m_ITKvVTK = NULL; } } // hctiws */ this->Modified( ); } // ------------------------------------------------------------------------- cpPlugins::DataObjects::Image:: Image( ) : Superclass( ) { } // ------------------------------------------------------------------------- cpPlugins::DataObjects::Image:: ~Image( ) { } // eof - $RCSfile$