ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkScalarRegionBasedLevelSetFunction.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#ifndef itkScalarRegionBasedLevelSetFunction_h
19#define itkScalarRegionBasedLevelSetFunction_h
20
25
26namespace itk
27{
58template <typename TInputImage, typename TFeatureImage, typename TSharedData>
59class ITK_TEMPLATE_EXPORT ScalarRegionBasedLevelSetFunction
60 : public RegionBasedLevelSetFunction<TInputImage, TFeatureImage, TSharedData>
61{
62public:
63 ITK_DISALLOW_COPY_AND_MOVE(ScalarRegionBasedLevelSetFunction);
64
69
70 // itkNewMacro() is not provided since this is an abstract class.
71
73 itkOverrideGetNameOfClassMacro(ScalarRegionBasedLevelSetFunction);
74
75 static constexpr unsigned int ImageDimension = TFeatureImage::ImageDimension;
76
77 using typename Superclass::InputImageType;
79 using typename Superclass::InputImagePointer;
80 using typename Superclass::InputPixelType;
81 using typename Superclass::InputIndexType;
83 using typename Superclass::InputSizeType;
84 using typename Superclass::InputSizeValueType;
85 using typename Superclass::InputRegionType;
86 using typename Superclass::InputPointType;
87
88 using typename Superclass::FeatureImageType;
89 using FeatureImageConstPointer = typename FeatureImageType::ConstPointer;
90 using typename Superclass::FeaturePixelType;
91 using typename Superclass::FeatureIndexType;
92 using typename Superclass::FeatureOffsetType;
93
94 using typename Superclass::ScalarValueType;
95 using typename Superclass::NeighborhoodType;
96 using typename Superclass::FloatOffsetType;
97 using typename Superclass::RadiusType;
98 using typename Superclass::TimeStepType;
99 using typename Superclass::GlobalDataStruct;
100 using typename Superclass::PixelType;
101 using typename Superclass::VectorType;
102
103 using typename Superclass::SharedDataType;
104 using typename Superclass::SharedDataPointer;
105
110
111 using ListPixelType = std::list<unsigned int>;
112 using ListPixelConstIterator = typename ListPixelType::const_iterator;
113 using ListPixelIterator = typename ListPixelType::iterator;
115
120 void
121 UpdatePixel(const unsigned int idx,
123 InputPixelType & newValue,
124 bool & status);
125
126protected:
131
135 ComputeOverlapParameters(const FeatureIndexType & featIndex, ScalarValueType & product) override;
136
140 virtual void
141 UpdateSharedDataInsideParameters(const unsigned int & iId,
142 const FeaturePixelType & iVal,
143 const ScalarValueType & iChange) = 0;
144
145 virtual void
146 UpdateSharedDataOutsideParameters(const unsigned int & iId,
147 const FeaturePixelType & iVal,
148 const ScalarValueType & iChange) = 0;
149};
150} // namespace itk
151
152#ifndef ITK_MANUAL_INSTANTIATION
153# include "itkScalarRegionBasedLevelSetFunction.hxx"
154#endif
155
156#endif
ConstNeighborhoodIterator< TImageType, DefaultBoundaryConditionType > NeighborhoodType
Vector< float, Self::ImageDimension > FloatOffsetType
typename ImageType::PixelType PixelType
typename ConstNeighborhoodIterator< TImageType >::RadiusType RadiusType
A multi-dimensional iterator templated over image type that walks an image region and is specialized ...
A multi-dimensional iterator templated over image type that walks a region of pixels.
A multi-dimensional iterator templated over image type that walks pixels within a region and is speci...
Templated n-dimensional image class.
Definition itkImage.h:89
Defines iteration of a local N-dimensional neighborhood of pixels across an itk::Image.
RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData > Superclass
void UpdatePixel(const unsigned int idx, NeighborhoodIterator< TInputImage > &iterator, InputPixelType &newValue, bool &status)
ImageRegionConstIteratorWithIndex< InputImageType > ConstImageIteratorType
ImageRegionConstIterator< FeatureImageType > ConstFeatureIteratorType
ImageRegionIteratorWithIndex< FeatureImageType > FeatureImageIteratorType
virtual void UpdateSharedDataInsideParameters(const unsigned int &iId, const FeaturePixelType &iVal, const ScalarValueType &iChange)=0
virtual void UpdateSharedDataOutsideParameters(const unsigned int &iId, const FeaturePixelType &iVal, const ScalarValueType &iChange)=0
typename FeatureImageType::ConstPointer FeatureImageConstPointer
ImageRegionIteratorWithIndex< InputImageType > ImageIteratorType
ScalarValueType ComputeOverlapParameters(const FeatureIndexType &featIndex, ScalarValueType &product) override
~ScalarRegionBasedLevelSetFunction() override=default
typename ListPixelType::const_iterator ListPixelConstIterator
Image< ListPixelType, Self::ImageDimension > ListImageType
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....