ITK  5.0.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  ITK_DISALLOW_COPY_AND_ASSIGN(LevelSetDenseImage);
46 
47  using ImageType = TImage;
48  using ImagePointer = typename ImageType::Pointer;
49  using IndexType = typename ImageType::IndexType;
50  using PixelType = typename ImageType::PixelType;
52 
57 
59  itkNewMacro ( Self );
60 
62  itkTypeMacro ( LevelSetDenseImage, DiscreteLevelSetImage );
63 
64  static constexpr unsigned int Dimension = Superclass::Dimension;
65 
66  using InputType = typename Superclass::InputType;
67  using OutputType = typename Superclass::OutputType;
68  using OutputRealType = typename Superclass::OutputRealType;
69  using GradientType = typename Superclass::GradientType;
70  using HessianType = typename Superclass::HessianType;
71  using LevelSetDataType = typename Superclass::LevelSetDataType;
72 
73  virtual void SetImage( ImageType* iImage );
74  itkGetModifiableObjectMacro(Image, ImageType );
75 
77  OutputType Evaluate( const InputType& inputIndex ) const override;
78  void Evaluate( const InputType& inputIndex, LevelSetDataType& data ) const override;
80 
81 protected:
82  LevelSetDenseImage() = default;
83 
84  ~LevelSetDenseImage() override = default;
85 
87 
88  bool IsInsideDomain( const InputType& inputIndex ) const override;
89 
91  void Initialize() override;
92 
94  void CopyInformation(const DataObject *data) override;
95 
97  void Graft( const DataObject* data ) override;
98 
99 private:
100 
101  };
102 }
103 
104 #ifndef ITK_MANUAL_INSTANTIATION
105 #include "itkLevelSetDenseImage.hxx"
106 #endif
107 
108 #endif // itkLevelSetDenseImage_h
typename ImageType::IndexType IndexType
typename Superclass::HessianType HessianType
typename ImageType::Pointer ImagePointer
typename Superclass::OutputType OutputType
typename ImageType::RegionType RegionType
typename Superclass::InputType InputType
typename ImageType::PixelType PixelType
typename Superclass::GradientType GradientType
typename Superclass::LevelSetDataType LevelSetDataType
Base class for the &quot;dense&quot; representation of a level-set function on one image.
Abstract class for a level-set function on one Image.
typename Superclass::OutputRealType OutputRealType
Base class for most ITK classes.
Definition: itkObject.h:60
Base class for all data objects in ITK.
Templated n-dimensional image class.
Definition: itkImage.h:75