ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkMRASlabIdentifier.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 #ifndef itkMRASlabIdentifier_h
19 #define itkMRASlabIdentifier_h
20 
21 #include "itkObject.h"
22 #include "itkImage.h"
23 #include <vector>
24 
25 namespace itk
26 {
64 template< typename TInputImage >
65 class ITK_TEMPLATE_EXPORT MRASlabIdentifier:public Object
66 {
67 public:
68  ITK_DISALLOW_COPY_AND_ASSIGN(MRASlabIdentifier);
69 
72  using Superclass = Object;
75 
77  itkTypeMacro(MRASlabIdentifier, Object);
78 
80  itkNewMacro(Self);
81 
83  using ImageType = TInputImage;
84 
86  using ImagePointer = typename TInputImage::Pointer;
87 
89  using ImageConstPointer = typename TInputImage::ConstPointer;
90 
92  using ImagePixelType = typename TInputImage::PixelType;
96  using SlabRegionVectorType = std::vector< ImageRegionType >;
97 
99  itkSetConstObjectMacro(Image, ImageType);
100  itkGetConstObjectMacro(Image, ImageType);
102 
104  itkSetMacro(NumberOfSamples, unsigned int);
105  itkGetConstReferenceMacro(NumberOfSamples, unsigned int);
107 
109  itkSetMacro(BackgroundMinimumThreshold, ImagePixelType);
110  itkGetConstReferenceMacro(BackgroundMinimumThreshold, ImagePixelType);
112 
114  itkSetMacro(Tolerance, double);
115  itkGetConstReferenceMacro(Tolerance, double);
117 
120  itkSetMacro(SlicingDirection, int);
121  itkGetConstReferenceMacro(SlicingDirection, int);
123 
126  void GenerateSlabRegions();
127 
129  SlabRegionVectorType GetSlabRegionVector();
130 
131 protected:
133  ~MRASlabIdentifier() override = default;
134  void PrintSelf(std::ostream & os, Indent indent) const override;
135 
136 private:
139 
142  unsigned int m_NumberOfSamples;
143 
146  double m_Tolerance;
148 };
149 } // end namespace itk
150 
151 #ifndef ITK_MANUAL_INSTANTIATION
152 #include "itkMRASlabIdentifier.hxx"
153 #endif
154 
155 #endif /* itkMRASlabIdentifier_h */
std::vector< ImageRegionType > SlabRegionVectorType
Light weight base class for most itk classes.
SlabRegionVectorType m_Slabs
typename TInputImage::SizeType ImageSizeType
typename TInputImage::ConstPointer ImageConstPointer
ImagePixelType m_BackgroundMinimumThreshold
typename TInputImage::PixelType ImagePixelType
typename TInputImage::IndexType ImageIndexType
identifies slab in MR images comparing minimum intensity averages
typename TInputImage::RegionType ImageRegionType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for most ITK classes.
Definition: itkObject.h:60
typename TInputImage::Pointer ImagePointer
Templated n-dimensional image class.
Definition: itkImage.h:75