ITK  4.6.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 
24 #include "itkImageToImageFilter.h"
25 
26 #include "itkImageDuplicator.h"
28 
30 #include "itkResampleImageFilter.h"
35 #include "itkAffineTransform.h"
39 
42 
46 #include "itkSigmoidImageFilter.h"
48 #include "itkCastImageFilter.h"
49 
51 #include "itkProgressAccumulator.h"
52 
53 namespace itk
54 {
55 
94 template <class TImageType, class TAtlasImageType, class TAtlasLabelType>
95 class ITK_EXPORT
96 StripTsImageFilter : public ImageToImageFilter<TImageType, TAtlasLabelType>
97 {
98 public:
99 
100  // standard class typedefs
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;
114 
115  // image and label templates
116  typedef TImageType ImageType;
117  typedef typename ImageType::Pointer ImagePointer;
118  typedef typename ImageType::ConstPointer ImageConstPointer;
119 
120  typedef TAtlasImageType AtlasImageType;
121  typedef typename AtlasImageType::Pointer AtlasImagePointer;
122  typedef typename AtlasImageType::ConstPointer AtlasImageConstPointer;
123 
124  typedef TAtlasLabelType AtlasLabelType;
125  typedef typename AtlasLabelType::Pointer AtlasLabelPointer;
126  typedef typename AtlasLabelType::ConstPointer AtlasLabelConstPointer;
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  virtual void GenerateData();
145 
146 
147 private:
148 
149  StripTsImageFilter(const Self&); //purposely not implemented
150  void operator=(const Self&); //purposely not implemented
151 
157  std::string m_TimerReport;
158 
159  void RescaleImages();
160  void DownsampleImage();
161  void RigidRegistration();
162  void AffineRegistration();
163  void BinaryErosion();
164  void MultiResLevelSet();
165  void PyramidFilter(int isoSpacing);
166  void InversePyramidFilter();
167  void LevelSetRefinement(int isoSpacing);
168  void UpsampleLabels();
169 
170 }; // end of class
171 
172 } // end namespace itk
173 
174 #ifndef ITK_MANUAL_INSTANTIATION
175 #include "itkStripTsImageFilter.hxx"
176 #endif
177 
178 #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