ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkLevelSetQuadEdgeMeshBase.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 
00019 #ifndef __itkLevelSetQuadEdgeMeshBase_h
00020 #define __itkLevelSetQuadEdgeMeshBase_h
00021 
00022 #include "itkLevelSetBase.h"
00023 #include "itkObjectFactory.h"
00024 
00025 namespace itk
00026 {
00034 template< class TMesh >
00035 class LevelSetQuadEdgeMeshBase :
00036     public LevelSetBase<
00037       typename TMesh::PointIdentifier,
00038       TMesh::PointDimension,
00039       typename TMesh::PixelType,
00040       TMesh >
00041 {
00042 public:
00043   typedef TMesh                   MeshType;
00044   typedef typename TMesh::Pointer MeshPointer;
00045 
00046   typedef LevelSetQuadEdgeMeshBase        Self;
00047   typedef SmartPointer< Self >            Pointer;
00048   typedef SmartPointer< const Self >      ConstPointer;
00049   typedef LevelSetBase< typename MeshType::PointIdentifier,
00050     MeshType::PointDimension,
00051     typename MeshType::PixelType,
00052     MeshType                    >         Superclass;
00053 
00055   itkNewMacro ( Self );
00056 
00058   itkTypeMacro ( LevelSetQuadEdgeMeshBase, LevelSetBase );
00059 
00060   typedef typename Superclass::InputType        InputType;
00061   typedef typename Superclass::OutputType       OutputType;
00062   typedef typename Superclass::OutputRealType   OutputRealType;
00063   typedef typename Superclass::GradientType     GradientType;
00064   typedef typename Superclass::HessianType      HessianType;
00065   typedef typename Superclass::LevelSetDataType LevelSetDataType;
00066 
00067   itkSetObjectMacro( Mesh, MeshType );
00068   itkGetObjectMacro( Mesh, MeshType );
00069 
00071   virtual OutputType Evaluate( const InputType& iP ) const;
00072 
00075   virtual GradientType EvaluateGradient( const InputType& iP ) const;
00076 
00079   virtual HessianType EvaluateHessian( const InputType& iP ) const;
00080 
00081 
00084   virtual void Evaluate( const InputType& iP, LevelSetDataType& ioData ) const;
00085 
00089   virtual void EvaluateGradient( const InputType& iP, LevelSetDataType& ioData ) const;
00090 
00094   virtual void EvaluateHessian( const InputType& iP, LevelSetDataType& ioData ) const;
00095 
00097   virtual void Initialize();
00098 
00100   virtual void CopyInformation(const DataObject *data);
00101 
00103   virtual void Graft( const DataObject* data );
00104 
00105 
00106 protected:
00107   LevelSetQuadEdgeMeshBase();
00108   virtual ~LevelSetQuadEdgeMeshBase();
00109 
00110 private:
00111   LevelSetQuadEdgeMeshBase( const Self& );  // purposely not implemented
00112   void operator = ( const Self& );          // purposely not implemented
00113 
00114   MeshPointer m_Mesh;
00115 };
00116 }
00117 
00118 #ifndef ITK_MANUAL_INSTANTIATION
00119 #include "itkLevelSetQuadEdgeMeshBase.hxx"
00120 #endif
00121 #endif // __itkLevelSetQuadEdgeMeshBase_h
00122