ITK  6.0.0
Insight Toolkit
itkLevelSetDenseImage.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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
24namespace itk
25{
40template <typename TImage>
41class ITK_TEMPLATE_EXPORT LevelSetDenseImage
42 : public DiscreteLevelSetImage<typename TImage::PixelType, TImage::ImageDimension>
43{
44public:
45 ITK_DISALLOW_COPY_AND_MOVE(LevelSetDenseImage);
46
47 using ImageType = TImage;
50 using PixelType = typename ImageType::PixelType;
52
57
59 itkNewMacro(Self);
60
62 itkOverrideGetNameOfClassMacro(LevelSetDenseImage);
63
64 static constexpr unsigned int Dimension = Superclass::Dimension;
65
66 using typename Superclass::InputType;
67 using typename Superclass::OutputType;
68 using typename Superclass::OutputRealType;
69 using typename Superclass::GradientType;
70 using typename Superclass::HessianType;
71 using typename Superclass::LevelSetDataType;
72
73 virtual void
74 SetImage(ImageType * inputImage);
75 itkGetModifiableObjectMacro(Image, ImageType);
76
79 Evaluate(const InputType & inputIndex) const override;
80 void
81 Evaluate(const InputType & inputIndex, LevelSetDataType & data) const override;
84protected:
85 LevelSetDenseImage() = default;
86
87 ~LevelSetDenseImage() override = default;
88
89 ImagePointer m_Image{};
90
91 bool
92 IsInsideDomain(const InputType & inputIndex) const override;
93
95 void
96 Initialize() override;
97
99 void
100 CopyInformation(const DataObject * data) override;
101
103 void
104 Graft(const DataObject * data) override;
105
106private:
107};
108} // namespace itk
109
110#ifndef ITK_MANUAL_INSTANTIATION
111# include "itkLevelSetDenseImage.hxx"
112#endif
113
114#endif // itkLevelSetDenseImage_h
Base class for all data objects in ITK.
Abstract class for a level-set function on one Image.
Templated n-dimensional image class.
Definition: itkImage.h:89
Base class for the "dense" representation of a level-set function on one image.
OutputType Evaluate(const InputType &inputIndex) const override
void Evaluate(const InputType &inputIndex, LevelSetDataType &data) const override
void Graft(const DataObject *data) override
typename ImageType::Pointer ImagePointer
typename ImageType::RegionType RegionType
~LevelSetDenseImage() override=default
void CopyInformation(const DataObject *data) override
typename ImageType::IndexType IndexType
bool IsInsideDomain(const InputType &inputIndex) const override
virtual void SetImage(ImageType *inputImage)
void Initialize() override
typename ImageType::PixelType PixelType
Base class for most ITK classes.
Definition: itkObject.h:62
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....