+#ifndef __CPEXTENSIONS__DATASTRUCTURES__INFINITEPLANESPATIALOBJECT__HXX__
+#define __CPEXTENSIONS__DATASTRUCTURES__INFINITEPLANESPATIALOBJECT__HXX__
+
+// -------------------------------------------------------------------------
+template< unsigned int D >
+template< class P >
+void cpExtensions::DataStructures::InfinitePlaneSpatialObject< D >::
+SetCenter( const P& p )
+{
+ for( unsigned int d = 0; d < D; ++d )
+ this->m_Center[ d ] = ScalarType( p[ d ] );
+ this->Modified( );
+}
+
+// -------------------------------------------------------------------------
+template< unsigned int D >
+template< class N >
+void cpExtensions::DataStructures::InfinitePlaneSpatialObject< D >::
+SetNormal( const N& n )
+{
+ for( unsigned int d = 0; d < D; ++d )
+ this->m_Normal[ d ] = ScalarType( n[ d ] );
+ ScalarType nn = this->m_Normal.GetNorm( );
+ if( nn > ScalarType( 0 ) )
+ this->m_Normal /= nn;
+ this->Modified( );
+}
+
+// -------------------------------------------------------------------------
+template< unsigned int D >
+bool cpExtensions::DataStructures::InfinitePlaneSpatialObject< D >::
+ValueAt(
+ const PointType& point, double& value, unsigned int depth, char* name
+ ) const
+{
+ value = this->m_Normal * ( point - this->m_Center );
+ return( value >= double( 0 ) );
+}
+
+// -------------------------------------------------------------------------
+template< unsigned int D >
+bool cpExtensions::DataStructures::InfinitePlaneSpatialObject< D >::
+IsEvaluableAt(
+ const PointType& point, unsigned int depth, char* name
+ ) const
+{
+ double value;
+ return( this->ValueAt( point, value, depth, name ) );
+}
+
+// -------------------------------------------------------------------------
+template< unsigned int D >
+bool cpExtensions::DataStructures::InfinitePlaneSpatialObject< D >::
+IsInside(
+ const PointType& point, unsigned int depth, char* name
+ ) const
+{
+ double value;
+ return( this->ValueAt( point, value, depth, name ) );
+}
+
+// -------------------------------------------------------------------------
+template< unsigned int D >
+bool cpExtensions::DataStructures::InfinitePlaneSpatialObject< D >::
+IsInside( const PointType& point ) const
+{
+ double value;
+ return( this->ValueAt( point, value, 0, NULL ) );
+}
+
+// -------------------------------------------------------------------------
+template< unsigned int D >
+bool cpExtensions::DataStructures::InfinitePlaneSpatialObject< D >::
+ComputeLocalBoundingBox( ) const
+{
+ return( false );
+}
+
+// -------------------------------------------------------------------------
+template< unsigned int D >
+cpExtensions::DataStructures::InfinitePlaneSpatialObject< D >::
+InfinitePlaneSpatialObject( )
+ : Superclass( )
+{
+ this->m_Center.Fill( ScalarType( 0 ) );
+ this->m_Normal.Fill( ScalarType( 0 ) );
+ this->m_Normal[ 0 ] = ScalarType( 1 );
+}
+
+// -------------------------------------------------------------------------
+template< unsigned int D >
+cpExtensions::DataStructures::InfinitePlaneSpatialObject< D >::
+~InfinitePlaneSpatialObject( )
+{
+}
+
+// -------------------------------------------------------------------------
+template< unsigned int D >
+void cpExtensions::DataStructures::InfinitePlaneSpatialObject< D >::
+PrintSelf( std::ostream& os, itk::Indent indent ) const
+{
+ this->Superclass::PrintSelf( os, indent );
+ os << indent << "Center: " << this->m_Center << std::endl;
+ os << indent << "Normal: " << this->m_Normal << std::endl;
+}
+
+#endif // __CPEXTENSIONS__DATASTRUCTURES__INFINITEPLANESPATIALOBJECT__HXX__
+
+// eof - $RCSfile$