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( unsigned int idx )
41 if( idx < this->m_Inputs.size( ) )
42 return( dynamic_cast< T* >( this->m_Inputs[ idx ].GetPointer( ) ) );
47 // -------------------------------------------------------------------------
49 const T* cpPlugins::Interface::ProcessObject::
50 GetInput( unsigned int idx ) const
52 if( idx < this->m_Inputs.size( ) )
54 dynamic_cast< const T* >( this->m_Inputs[ idx ].GetPointer( ) )
60 // -------------------------------------------------------------------------
62 T* cpPlugins::Interface::ProcessObject::
63 GetOutput( unsigned int idx )
65 if( idx < this->m_Outputs.size( ) )
66 return( dynamic_cast< T* >( this->m_Outputs[ idx ].GetPointer( ) ) );
71 // -------------------------------------------------------------------------
73 const T* cpPlugins::Interface::ProcessObject::
74 GetOutput( unsigned int idx ) const
76 if( idx < this->m_Outputs.size( ) )
78 dynamic_cast< const T* >( this->m_Outputs[ idx ].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( unsigned int idx )
122 if( idx >= this->m_Outputs.size( ) )
124 this->m_Outputs[ idx ] = O::New( );
125 this->m_Outputs[ idx ]->SetSource( this );
128 #endif // __CPPLUGINS__INTERFACE__PROCESSOBJECT__HXX__