ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkLevelSetDenseImage.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 
19 #ifndef itkLevelSetDenseImage_h
20 #define itkLevelSetDenseImage_h
21 
23 
24 namespace itk
25 {
40 template< typename TImage >
41 class ITK_TEMPLATE_EXPORT LevelSetDenseImage :
42  public DiscreteLevelSetImage< typename TImage::PixelType, TImage::ImageDimension >
43  {
44 public:
45  typedef TImage ImageType;
46  typedef typename ImageType::Pointer ImagePointer;
47  typedef typename ImageType::IndexType IndexType;
48  typedef typename ImageType::PixelType PixelType;
49  typedef typename ImageType::RegionType RegionType;
51 
56 
58  itkNewMacro ( Self );
59 
61  itkTypeMacro ( LevelSetDenseImage, DiscreteLevelSetImage );
62 
63  itkStaticConstMacro ( Dimension, unsigned int, Superclass::Dimension );
64 
65  typedef typename Superclass::InputType InputType;
66  typedef typename Superclass::OutputType OutputType;
68  typedef typename Superclass::GradientType GradientType;
69  typedef typename Superclass::HessianType HessianType;
70  typedef typename Superclass::LevelSetDataType LevelSetDataType;
71 
72  virtual void SetImage( ImageType* iImage );
73  itkGetModifiableObjectMacro(Image, ImageType );
74 
76  virtual OutputType Evaluate( const InputType& inputIndex ) const ITK_OVERRIDE;
77  virtual void Evaluate( const InputType& inputIndex, LevelSetDataType& data ) const ITK_OVERRIDE;
79 
80 protected:
82 
83  virtual ~LevelSetDenseImage() ITK_OVERRIDE;
84 
85  ImagePointer m_Image;
86 
87  virtual bool IsInsideDomain( const InputType& inputIndex ) const ITK_OVERRIDE;
88 
90  virtual void Initialize() ITK_OVERRIDE;
91 
93  virtual void CopyInformation(const DataObject *data) ITK_OVERRIDE;
94 
96  virtual void Graft( const DataObject* data ) ITK_OVERRIDE;
97 
98 private:
99 
100  ITK_DISALLOW_COPY_AND_ASSIGN(LevelSetDenseImage);
101  };
102 }
103 
104 #ifndef ITK_MANUAL_INSTANTIATION
105 #include "itkLevelSetDenseImage.hxx"
106 #endif
107 
108 #endif // itkLevelSetDenseImage_h
ImageType::PixelType PixelType
Superclass::OutputRealType OutputRealType
ImageType::IndexType IndexType
ImageType::RegionType RegionType
ImageType::Pointer ImagePointer
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
Superclass::OutputType OutputType
Superclass::HessianType HessianType
Superclass::InputType InputType
Superclass::LevelSetDataType LevelSetDataType
Base class for the &quot;dense&quot; representation of a level-set function on one image.
Superclass::OutputRealType OutputRealType
Abstract class for a level-set function on one Image.
Superclass::GradientType GradientType
DiscreteLevelSetImage< PixelType, ImageType::ImageDimension > Superclass
Base class for all data objects in ITK.
Templated n-dimensional image class.
Definition: itkImage.h:75