ITK  5.2.0
Insight Toolkit
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  * 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 #ifndef itkScalarRegionBasedLevelSetFunction_h
19 #define itkScalarRegionBasedLevelSetFunction_h
20 
25 
26 namespace itk
27 {
65 template <typename TInputImage, typename TFeatureImage, typename TSharedData>
66 class ITK_TEMPLATE_EXPORT ScalarRegionBasedLevelSetFunction
67  : public RegionBasedLevelSetFunction<TInputImage, TFeatureImage, TSharedData>
68 {
69 public:
70  ITK_DISALLOW_COPY_AND_MOVE(ScalarRegionBasedLevelSetFunction);
71 
76 
77  // itkNewMacro() is not provided since this is an abstract class.
78 
81 
82  static constexpr unsigned int ImageDimension = TFeatureImage::ImageDimension;
83 
94 
96  using FeatureImageConstPointer = typename FeatureImageType::ConstPointer;
100 
106  using GlobalDataStruct = typename Superclass::GlobalDataStruct;
109 
112 
117 
118  using ListPixelType = std::list<unsigned int>;
119  using ListPixelConstIterator = typename ListPixelType::const_iterator;
120  using ListPixelIterator = typename ListPixelType::iterator;
122 
127  void
128  UpdatePixel(const unsigned int & idx,
130  InputPixelType & newValue,
131  bool & status);
132 
133 protected:
135  : Superclass()
136  {}
137  ~ScalarRegionBasedLevelSetFunction() override = default;
138 
139  ScalarValueType
140  ComputeOverlapParameters(const FeatureIndexType & featIndex, ScalarValueType & product) override;
141 
142  // update the background and foreground constants for pixel updates
143  // Called only when sparse filters are used to prevent iteration through the
144  // entire image
145  virtual void
146  UpdateSharedDataInsideParameters(const unsigned int & iId,
147  const FeaturePixelType & iVal,
148  const ScalarValueType & iChange) = 0;
149 
150  virtual void
151  UpdateSharedDataOutsideParameters(const unsigned int & iId,
152  const FeaturePixelType & iVal,
153  const ScalarValueType & iChange) = 0;
154 };
155 } // namespace itk
156 
157 #ifndef ITK_MANUAL_INSTANTIATION
158 # include "itkScalarRegionBasedLevelSetFunction.hxx"
159 #endif
160 
161 #endif
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::InputIndexType
typename InputImageType::IndexType InputIndexType
Definition: itkRegionBasedLevelSetFunction.h:130
itk::ScalarRegionBasedLevelSetFunction::InputSizeValueType
typename Superclass::InputSizeValueType InputSizeValueType
Definition: itkScalarRegionBasedLevelSetFunction.h:91
itk::ScalarRegionBasedLevelSetFunction::InputRegionType
typename Superclass::InputRegionType InputRegionType
Definition: itkScalarRegionBasedLevelSetFunction.h:92
itk::ScalarRegionBasedLevelSetFunction::InputSizeType
typename Superclass::InputSizeType InputSizeType
Definition: itkScalarRegionBasedLevelSetFunction.h:90
itk::ScalarRegionBasedLevelSetFunction::InputImagePointer
typename Superclass::InputImagePointer InputImagePointer
Definition: itkScalarRegionBasedLevelSetFunction.h:86
itk::ImageRegionConstIteratorWithIndex
A multi-dimensional iterator templated over image type that walks an image region and is specialized ...
Definition: itkImageRegionConstIteratorWithIndex.h:130
itkNeighborhoodIterator.h
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::InputSizeValueType
typename InputImageType::SizeValueType InputSizeValueType
Definition: itkRegionBasedLevelSetFunction.h:133
itk::ScalarRegionBasedLevelSetFunction::InputIndexValueType
typename Superclass::InputIndexValueType InputIndexValueType
Definition: itkScalarRegionBasedLevelSetFunction.h:89
itk::ScalarRegionBasedLevelSetFunction::VectorType
typename Superclass::VectorType VectorType
Definition: itkScalarRegionBasedLevelSetFunction.h:108
itk::GTest::TypedefsAndConstructors::Dimension2::VectorType
ImageBaseType::SpacingType VectorType
Definition: itkGTestTypedefsAndConstructors.h:53
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::InputPointType
typename InputImageType::PointType InputPointType
Definition: itkRegionBasedLevelSetFunction.h:135
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::PixelType
typename Superclass::PixelType PixelType
Definition: itkRegionBasedLevelSetFunction.h:88
itk::ScalarRegionBasedLevelSetFunction::InputImageType
typename Superclass::InputImageType InputImageType
Definition: itkScalarRegionBasedLevelSetFunction.h:84
itk::ScalarRegionBasedLevelSetFunction::ListPixelIterator
typename ListPixelType::iterator ListPixelIterator
Definition: itkScalarRegionBasedLevelSetFunction.h:120
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::InputSizeType
typename InputImageType::SizeType InputSizeType
Definition: itkRegionBasedLevelSetFunction.h:132
itk::ScalarRegionBasedLevelSetFunction::SharedDataType
typename Superclass::SharedDataType SharedDataType
Definition: itkScalarRegionBasedLevelSetFunction.h:110
itk::SmartPointer< Self >
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::NeighborhoodType
typename Superclass::NeighborhoodType NeighborhoodType
Definition: itkRegionBasedLevelSetFunction.h:91
itk::ScalarRegionBasedLevelSetFunction::GlobalDataStruct
typename Superclass::GlobalDataStruct GlobalDataStruct
Definition: itkScalarRegionBasedLevelSetFunction.h:106
itkImageRegionIteratorWithIndex.h
itk::ScalarRegionBasedLevelSetFunction::FloatOffsetType
typename Superclass::FloatOffsetType FloatOffsetType
Definition: itkScalarRegionBasedLevelSetFunction.h:103
itkImageRegionConstIterator.h
itk::RegionBasedLevelSetFunction
LevelSet function that computes a speed image based on regional integrals.
Definition: itkRegionBasedLevelSetFunction.h:67
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::SharedDataType
TSharedData SharedDataType
Definition: itkRegionBasedLevelSetFunction.h:144
itk::ScalarRegionBasedLevelSetFunction::SharedDataPointer
typename Superclass::SharedDataPointer SharedDataPointer
Definition: itkScalarRegionBasedLevelSetFunction.h:111
itk::ScalarRegionBasedLevelSetFunction::NeighborhoodType
typename Superclass::NeighborhoodType NeighborhoodType
Definition: itkScalarRegionBasedLevelSetFunction.h:102
itk::ScalarRegionBasedLevelSetFunction::InputPointType
typename Superclass::InputPointType InputPointType
Definition: itkScalarRegionBasedLevelSetFunction.h:93
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::RadiusType
typename Superclass::RadiusType RadiusType
Definition: itkRegionBasedLevelSetFunction.h:90
itk::ScalarRegionBasedLevelSetFunction::FeatureIndexType
typename Superclass::FeatureIndexType FeatureIndexType
Definition: itkScalarRegionBasedLevelSetFunction.h:98
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::FeatureOffsetType
typename FeatureImageType::OffsetType FeatureOffsetType
Definition: itkRegionBasedLevelSetFunction.h:142
itk::ScalarRegionBasedLevelSetFunction::FeatureOffsetType
typename Superclass::FeatureOffsetType FeatureOffsetType
Definition: itkScalarRegionBasedLevelSetFunction.h:99
itk::ScalarRegionBasedLevelSetFunction::InputImageConstPointer
typename Superclass::InputImageConstPointer InputImageConstPointer
Definition: itkScalarRegionBasedLevelSetFunction.h:85
itk::ScalarRegionBasedLevelSetFunction
LevelSet function that computes a speed image based on regional integrals.
Definition: itkScalarRegionBasedLevelSetFunction.h:66
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::FeaturePixelType
typename FeatureImageType::PixelType FeaturePixelType
Definition: itkRegionBasedLevelSetFunction.h:139
itk::ScalarRegionBasedLevelSetFunction::ScalarRegionBasedLevelSetFunction
ScalarRegionBasedLevelSetFunction()
Definition: itkScalarRegionBasedLevelSetFunction.h:134
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::FloatOffsetType
typename Superclass::FloatOffsetType FloatOffsetType
Definition: itkRegionBasedLevelSetFunction.h:93
itk::ScalarRegionBasedLevelSetFunction::InputIndexType
typename Superclass::InputIndexType InputIndexType
Definition: itkScalarRegionBasedLevelSetFunction.h:88
itk::ScalarRegionBasedLevelSetFunction::InputPixelType
typename Superclass::InputPixelType InputPixelType
Definition: itkScalarRegionBasedLevelSetFunction.h:87
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::InputPixelType
typename InputImageType::PixelType InputPixelType
Definition: itkRegionBasedLevelSetFunction.h:129
itkRegionBasedLevelSetFunction.h
itk::ScalarRegionBasedLevelSetFunction::ListPixelType
std::list< unsigned int > ListPixelType
Definition: itkScalarRegionBasedLevelSetFunction.h:118
itk::ImageRegionIteratorWithIndex
A multi-dimensional iterator templated over image type that walks pixels within a region and is speci...
Definition: itkImageRegionIteratorWithIndex.h:73
itk::ScalarRegionBasedLevelSetFunction::FeatureImageType
typename Superclass::FeatureImageType FeatureImageType
Definition: itkScalarRegionBasedLevelSetFunction.h:95
itk::NeighborhoodIterator
Defines iteration of a local N-dimensional neighborhood of pixels across an itk::Image.
Definition: itkNeighborhoodIterator.h:212
itk::ScalarRegionBasedLevelSetFunction::ScalarValueType
typename Superclass::ScalarValueType ScalarValueType
Definition: itkScalarRegionBasedLevelSetFunction.h:101
itk::ScalarRegionBasedLevelSetFunction::ListPixelConstIterator
typename ListPixelType::const_iterator ListPixelConstIterator
Definition: itkScalarRegionBasedLevelSetFunction.h:119
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ScalarRegionBasedLevelSetFunction::FeatureImageConstPointer
typename FeatureImageType::ConstPointer FeatureImageConstPointer
Definition: itkScalarRegionBasedLevelSetFunction.h:96
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::InputImageConstPointer
typename InputImageType::ConstPointer InputImageConstPointer
Definition: itkRegionBasedLevelSetFunction.h:127
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::FeatureIndexType
typename FeatureImageType::IndexType FeatureIndexType
Definition: itkRegionBasedLevelSetFunction.h:140
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::InputIndexValueType
typename InputImageType::IndexValueType InputIndexValueType
Definition: itkRegionBasedLevelSetFunction.h:131
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::FeatureImageType
TFeatureImage FeatureImageType
Definition: itkRegionBasedLevelSetFunction.h:137
itk::ImageRegionConstIterator
A multi-dimensional iterator templated over image type that walks a region of pixels.
Definition: itkImageRegionConstIterator.h:109
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::InputImageType
TInputImage InputImageType
Definition: itkRegionBasedLevelSetFunction.h:126
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:86
itk::ScalarRegionBasedLevelSetFunction::FeaturePixelType
typename Superclass::FeaturePixelType FeaturePixelType
Definition: itkScalarRegionBasedLevelSetFunction.h:97
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::ScalarValueType
PixelType ScalarValueType
Definition: itkRegionBasedLevelSetFunction.h:89
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::TimeStepType
double TimeStepType
Definition: itkRegionBasedLevelSetFunction.h:86
itk::ScalarRegionBasedLevelSetFunction::PixelType
typename Superclass::PixelType PixelType
Definition: itkScalarRegionBasedLevelSetFunction.h:107
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::SharedDataPointer
typename SharedDataType::Pointer SharedDataPointer
Definition: itkRegionBasedLevelSetFunction.h:145
itk::ScalarRegionBasedLevelSetFunction::TimeStepType
typename Superclass::TimeStepType TimeStepType
Definition: itkScalarRegionBasedLevelSetFunction.h:105
itk::ScalarRegionBasedLevelSetFunction::RadiusType
typename Superclass::RadiusType RadiusType
Definition: itkScalarRegionBasedLevelSetFunction.h:104
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkRegionBasedLevelSetFunction.h:128
itk::RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >::InputRegionType
typename InputImageType::RegionType InputRegionType
Definition: itkRegionBasedLevelSetFunction.h:134