ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkStripTsImageFilter.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 
19 
20 #ifndef itkStripTsImageFilter_h
21 #define itkStripTsImageFilter_h
22 
23 #include "itkImageToImageFilter.h"
24 
25 #include "itkImageDuplicator.h"
27 
29 #include "itkResampleImageFilter.h"
34 #include "itkAffineTransform.h"
38 
41 
45 #include "itkSigmoidImageFilter.h"
47 #include "itkCastImageFilter.h"
48 
50 #include "itkProgressAccumulator.h"
51 
52 namespace itk
53 {
54 
93 template <class TImageType, class TAtlasImageType, class TAtlasLabelType>
94 class ITK_EXPORT
95 StripTsImageFilter : public ImageToImageFilter<TImageType, TAtlasLabelType>
96 {
97 public:
98  ITK_DISALLOW_COPY_AND_ASSIGN(StripTsImageFilter);
99 
100  // standard class type alias
105 
106  // method for creation through the object factory
107  itkNewMacro(Self);
108 
109  // run-time type information (and related methods)
110  itkTypeMacro(StripTsImageFilter, ImageToImageFilter);
111 
112  // display
113  void PrintSelf( std::ostream& os, Indent indent ) const override;
114 
115  // image and label templates
116  using ImageType = TImageType;
117  using ImagePointer = typename ImageType::Pointer;
118  using ImageConstPointer = typename ImageType::ConstPointer;
119 
120  using AtlasImageType = TAtlasImageType;
121  using AtlasImagePointer = typename AtlasImageType::Pointer;
122  using AtlasImageConstPointer = typename AtlasImageType::ConstPointer;
123 
124  using AtlasLabelType = TAtlasLabelType;
125  using AtlasLabelPointer = typename AtlasLabelType::Pointer;
126  using AtlasLabelConstPointer = typename AtlasLabelType::ConstPointer;
127 
129 
130  void SetAtlasImage( const TAtlasImageType * ptr );
131  void SetAtlasBrainMask( const TAtlasLabelType * ptr );
132 
133  const std::string &GetTimerReport() const
134  {
135  return m_TimerReport;
136  }
137 
138 protected:
139 
142 
143  // does the real work
144  void GenerateData() override;
145 
146 
147 private:
153  std::string m_TimerReport;
154 
155  void RescaleImages();
156  void DownsampleImage();
157  void RigidRegistration();
158  void AffineRegistration();
159  void BinaryErosion();
160  void MultiResLevelSet();
161  void PyramidFilter(int isoSpacing);
162  void InversePyramidFilter();
163  void LevelSetRefinement(int isoSpacing);
164  void UpsampleLabels();
165 
166 }; // end of class
167 
168 } // end namespace itk
169 
170 #ifndef ITK_MANUAL_INSTANTIATION
171 #include "itkStripTsImageFilter.hxx"
172 #endif
173 
174 #endif
typename ImageType::ConstPointer ImageConstPointer
SmartPointer< Self > Pointer
Aggregates a set of time probes.
const std::string & GetTimerReport() const
Light weight base class for most itk classes.
typename AtlasImageType::Pointer AtlasImagePointer
typename AtlasLabelType::ConstPointer AtlasLabelConstPointer
typename ImageType::Pointer ImagePointer
composite ITK filter for automatic skull-stripping
typename ProgressAccumulator::Pointer ProgressPointer
TimeProbesCollectorBase m_Timer
typename AtlasLabelType::Pointer AtlasLabelPointer
Base class for filters that take an image as input and produce an image as output.
typename AtlasImageType::ConstPointer AtlasImageConstPointer
Control indentation during Print() invocation.
Definition: itkIndent.h:49