ITK  6.0.0
Insight Toolkit
itkMRASlabIdentifier.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 itkMRASlabIdentifier_h
19 #define itkMRASlabIdentifier_h
20 
21 #include "itkObject.h"
22 #include "itkImage.h"
23 #include <vector>
24 
25 namespace itk
26 {
66 template <typename TInputImage>
67 class ITK_TEMPLATE_EXPORT MRASlabIdentifier : public Object
68 {
69 public:
70  ITK_DISALLOW_COPY_AND_MOVE(MRASlabIdentifier);
71 
74  using Superclass = Object;
77 
79  itkOverrideGetNameOfClassMacro(MRASlabIdentifier);
80 
82  itkNewMacro(Self);
83 
85  using ImageType = TInputImage;
86 
89 
92 
94  using ImagePixelType = typename TInputImage::PixelType;
98  using SlabRegionVectorType = std::vector<ImageRegionType>;
99 
101  itkSetConstObjectMacro(Image, ImageType);
102  itkGetConstObjectMacro(Image, ImageType);
106  itkSetMacro(NumberOfSamples, unsigned int);
107  itkGetConstReferenceMacro(NumberOfSamples, unsigned int);
111  itkSetMacro(BackgroundMinimumThreshold, ImagePixelType);
112  itkGetConstReferenceMacro(BackgroundMinimumThreshold, ImagePixelType);
116  itkSetMacro(Tolerance, double);
117  itkGetConstReferenceMacro(Tolerance, double);
122  itkSetMacro(SlicingDirection, int);
123  itkGetConstReferenceMacro(SlicingDirection, int);
128  void
129  GenerateSlabRegions();
130 
133  GetSlabRegionVector();
134 
135 protected:
137  ~MRASlabIdentifier() override = default;
138  void
139  PrintSelf(std::ostream & os, Indent indent) const override;
140 
141 private:
143  ImageConstPointer m_Image{};
144 
147  unsigned int m_NumberOfSamples{};
148 
149  int m_SlicingDirection{};
150  ImagePixelType m_BackgroundMinimumThreshold{};
151  double m_Tolerance{};
153 };
154 } // end namespace itk
155 
156 #ifndef ITK_MANUAL_INSTANTIATION
157 # include "itkMRASlabIdentifier.hxx"
158 #endif
159 
160 #endif /* itkMRASlabIdentifier_h */
itk::MRASlabIdentifier::SlabRegionVectorType
std::vector< ImageRegionType > SlabRegionVectorType
Definition: itkMRASlabIdentifier.h:98
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkAddImageFilter.h:94
itk::MRASlabIdentifier::ImagePointer
typename TInputImage::Pointer ImagePointer
Definition: itkMRASlabIdentifier.h:88
itk::MRASlabIdentifier::ImagePixelType
typename TInputImage::PixelType ImagePixelType
Definition: itkMRASlabIdentifier.h:94
itk::MRASlabIdentifier
Identifies slabs in MR images comparing minimum intensity averages.
Definition: itkMRASlabIdentifier.h:67
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itkImage.h
itk::MRASlabIdentifier::ImageRegionType
typename TInputImage::RegionType ImageRegionType
Definition: itkMRASlabIdentifier.h:97
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::MRASlabIdentifier::ImageType
TInputImage ImageType
Definition: itkMRASlabIdentifier.h:85
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::MRASlabIdentifier::ImageSizeType
typename TInputImage::SizeType ImageSizeType
Definition: itkMRASlabIdentifier.h:96
itkObject.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:61
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:88
itk::MRASlabIdentifier::ImageIndexType
typename TInputImage::IndexType ImageIndexType
Definition: itkMRASlabIdentifier.h:95
itk::MRASlabIdentifier::ImageConstPointer
typename TInputImage::ConstPointer ImageConstPointer
Definition: itkMRASlabIdentifier.h:91