ITK  4.9.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 
99  // standard class typedefs
104 
105  // method for creation through the object factory
106  itkNewMacro(Self);
107 
108  // run-time type information (and related methods)
109  itkTypeMacro(StripTsImageFilter, ImageToImageFilter);
110 
111  // display
112  void PrintSelf( std::ostream& os, Indent indent ) const;
113 
114  // image and label templates
115  typedef TImageType ImageType;
116  typedef typename ImageType::Pointer ImagePointer;
117  typedef typename ImageType::ConstPointer ImageConstPointer;
118 
119  typedef TAtlasImageType AtlasImageType;
120  typedef typename AtlasImageType::Pointer AtlasImagePointer;
121  typedef typename AtlasImageType::ConstPointer AtlasImageConstPointer;
122 
123  typedef TAtlasLabelType AtlasLabelType;
124  typedef typename AtlasLabelType::Pointer AtlasLabelPointer;
125  typedef typename AtlasLabelType::ConstPointer AtlasLabelConstPointer;
126 
128 
129  void SetAtlasImage( const TAtlasImageType * ptr );
130  void SetAtlasBrainMask( const TAtlasLabelType * ptr );
131 
132  const std::string &GetTimerReport() const
133  {
134  return m_TimerReport;
135  }
136 
137 protected:
138 
141 
142  // does the real work
143  virtual void GenerateData();
144 
145 
146 private:
147 
148  StripTsImageFilter(const Self&); //purposely not implemented
149  void operator=(const Self&); //purposely not implemented
150 
156  std::string m_TimerReport;
157 
158  void RescaleImages();
159  void DownsampleImage();
160  void RigidRegistration();
161  void AffineRegistration();
162  void BinaryErosion();
163  void MultiResLevelSet();
164  void PyramidFilter(int isoSpacing);
165  void InversePyramidFilter();
166  void LevelSetRefinement(int isoSpacing);
167  void UpsampleLabels();
168 
169 }; // end of class
170 
171 } // end namespace itk
172 
173 #ifndef ITK_MANUAL_INSTANTIATION
174 #include "itkStripTsImageFilter.hxx"
175 #endif
176 
177 #endif
Aggregates a set of time probes.
const std::string & GetTimerReport() const
Light weight base class for most itk classes.
composite ITK filter for automatic skull-stripping
ImageType::Pointer ImagePointer
ImageType::ConstPointer ImageConstPointer
AtlasLabelType::ConstPointer AtlasLabelConstPointer
TimeProbesCollectorBase m_Timer
ImageToImageFilter< TImageType, TAtlasLabelType > Superclass
AtlasImageType::ConstPointer AtlasImageConstPointer
SmartPointer< const Self > ConstPointer
AtlasLabelType::Pointer AtlasLabelPointer
ProgressAccumulator::Pointer ProgressPointer
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
AtlasImageType::Pointer AtlasImagePointer
SmartPointer< Self > Pointer