]> Creatis software - cpMesh.git/blob - lib/cpm/Algorithms/Base/InPlaceMeshFilter.hxx
First commit
[cpMesh.git] / lib / cpm / Algorithms / Base / InPlaceMeshFilter.hxx
1 #ifndef __CPM__ALGORITHMS__BASE__INPLACEMESHFILTER__HXX__
2 #define __CPM__ALGORITHMS__BASE__INPLACEMESHFILTER__HXX__
3
4 // -------------------------------------------------------------------------
5 template< class M >
6 cpm::Algorithms::Base::InPlaceMeshFilter< M >::
7 InPlaceMeshFilter( )
8   : Superclass( )
9 {
10 }
11
12 // -------------------------------------------------------------------------
13 template< class M >
14 cpm::Algorithms::Base::InPlaceMeshFilter< M >::
15 ~InPlaceMeshFilter( )
16 {
17 }
18
19 // -------------------------------------------------------------------------
20 template< class M >
21 void cpm::Algorithms::Base::InPlaceMeshFilter< M >::
22 PrepareOutputs( )
23 {
24   const M* inPtr = dynamic_cast< const M* >(
25     this->itk::ProcessObject::GetInput( 0 )
26     );
27   M* outPtr = this->GetOutput( );
28
29   if( inPtr != NULL )
30   {
31     typename M::Pointer inAsOut = NULL;
32     inAsOut = const_cast< M* >( inPtr );
33     this->GraftOutput( inAsOut );
34
35   } // fi
36 }
37
38 // -------------------------------------------------------------------------
39 template< class M >
40 void cpm::Algorithms::Base::InPlaceMeshFilter< M >::
41 ReleaseInputs( )
42 {
43   /*
44     this->itk::ProcessObject::ReleaseInputs( );
45     M* ptr = const_cast< M* >( this->GetInput( ) );
46     if( ptr )
47     ptr->ReleaseData( );
48   */
49   std::cout << "InPlaceMeshFilter::ReleaseData" << std::endl;
50 }
51
52 #endif // __CPM__ALGORITHMS__BASE__INPLACEMESHFILTER__HXX__
53
54 // eof - $RCSfile$