1 #ifndef __CPPLUGINS__INTERFACE__PROCESSOBJECT__HXX__
2 #define __CPPLUGINS__INTERFACE__PROCESSOBJECT__HXX__
4 // -------------------------------------------------------------------------
6 T* cpPlugins::Interface::ProcessObject::
9 return( dynamic_cast< T* >( this->m_ITKObject.GetPointer( ) ) );
12 // -------------------------------------------------------------------------
14 const T* cpPlugins::Interface::ProcessObject::
17 return( dynamic_cast< const T* >( this->m_ITKObject.GetPointer( ) ) );
20 // -------------------------------------------------------------------------
22 T* cpPlugins::Interface::ProcessObject::
25 return( dynamic_cast< T* >( this->m_VTKObject.GetPointer( ) ) );
28 // -------------------------------------------------------------------------
30 const T* cpPlugins::Interface::ProcessObject::
33 return( dynamic_cast< const T* >( this->m_VTKObject.GetPointer( ) ) );
36 // -------------------------------------------------------------------------
38 T* cpPlugins::Interface::ProcessObject::
39 GetInput( const std::string& id )
41 _TDataContainer::iterator i = this->m_Inputs.find( id );
42 if( i != this->m_Inputs.end( ) )
43 return( dynamic_cast< T* >( i->second.GetPointer( ) ) );
48 // -------------------------------------------------------------------------
50 const T* cpPlugins::Interface::ProcessObject::
51 GetInput( const std::string& id ) const
53 _TDataContainer::const_iterator i = this->m_Inputs.find( id );
54 if( i != this->m_Inputs.end( ) )
55 return( dynamic_cast< const T* >( i->second.GetPointer( ) ) );
60 // -------------------------------------------------------------------------
62 T* cpPlugins::Interface::ProcessObject::
63 GetOutput( const std::string& id )
65 _TDataContainer::iterator i = this->m_Outputs.find( id );
66 if( i != this->m_Outputs.end( ) )
67 return( dynamic_cast< T* >( i->second.GetPointer( ) ) );
72 // -------------------------------------------------------------------------
74 const T* cpPlugins::Interface::ProcessObject::
75 GetOutput( const std::string& id ) const
77 _TDataContainer::const_iterator i = this->m_Outputs.find( id );
78 if( i != this->m_Outputs.end( ) )
79 return( dynamic_cast< const T* >( i->second.GetPointer( ) ) );
84 // -------------------------------------------------------------------------
86 F* cpPlugins::Interface::ProcessObject::
89 F* filter = dynamic_cast< F* >( this->m_ITKObject.GetPointer( ) );
92 typename F::Pointer ptr = F::New( );
93 this->m_ITKObject = ptr;
94 filter = ptr.GetPointer( );
95 this->m_VTKObject = NULL;
101 // -------------------------------------------------------------------------
103 F* cpPlugins::Interface::ProcessObject::
106 F* filter = dynamic_cast< F* >( this->m_VTKObject.GetPointer( ) );
110 this->m_VTKObject = filter;
111 this->m_ITKObject = NULL;
117 // -------------------------------------------------------------------------
119 void cpPlugins::Interface::ProcessObject::
120 _MakeOutput( const std::string& id )
122 this->m_Outputs[ id ] = O::New( );
123 this->m_Outputs[ id ]->SetSource( this );
127 #endif // __CPPLUGINS__INTERFACE__PROCESSOBJECT__HXX__