1 #ifndef __CPPLUGINS__INTERFACE__IMAGE__HXX__
2 #define __CPPLUGINS__INTERFACE__IMAGE__HXX__
4 #define ITK_MANUAL_INSTANTIATION
5 #include <itkImageToVTKImageFilter.h>
7 // -------------------------------------------------------------------------
9 void cpPlugins::Interface::Image::
10 SetITKImage( itk::DataObject* object )
12 // Check if input object has the desired type
13 I* image = dynamic_cast< I* >( object );
18 typename itk::ImageToVTKImageFilter< I >::Pointer f =
19 itk::ImageToVTKImageFilter< I >::New( );
24 this->m_ITKObject = object;
25 this->m_VTKObject = f->GetOutput( );
26 this->m_ITKvVTKConnection = f;
30 // -------------------------------------------------------------------------
32 I* cpPlugins::Interface::Image::
35 return( dynamic_cast< I* >( this->m_ITKObject.GetPointer( ) ) );
38 // -------------------------------------------------------------------------
40 const I* cpPlugins::Interface::Image::
43 return( dynamic_cast< const I* >( this->m_ITKObject.GetPointer( ) ) );
46 #endif // __CPPLUGINS__INTERFACE__IMAGE__HXX__