ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkPipelineMonitorImageFilter.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 itkPipelineMonitorImageFilter_h
19 #define itkPipelineMonitorImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 
23 namespace itk
24 {
25 
66  template <typename TImageType>
68  public ImageToImageFilter< TImageType, TImageType>
69  {
70  public:
71 
76 
77  typedef typename TImageType::PointType PointType;
78  typedef typename TImageType::DirectionType DirectionType;
79  typedef typename TImageType::SpacingType SpacingType;
80  typedef typename TImageType::Pointer InputImagePointer;
81  typedef typename TImageType::ConstPointer InputImageConstPointer;
83 
84  typedef std::vector<typename TImageType::RegionType> RegionVectorType;
85 
87  itkNewMacro(Self);
88 
91 
101  itkSetMacro( ClearPipelineOnGenerateOutputInformation, bool );
102  itkGetMacro( ClearPipelineOnGenerateOutputInformation, bool );
103  itkBooleanMacro( ClearPipelineOnGenerateOutputInformation );
105 
106 
112  bool VerifyAllInputCanStream(int expectedNumber);
113 
114 
119 
123  bool VerifyAllNoUpdate();
124 
126 
136  bool VerifyInputFilterExecutedStreaming(int expectedNumber);
137 
143 
146 
148 
150 
151 
152  unsigned int GetNumberOfUpdates(void) const { return m_NumberOfUpdates; }
157 
158  itkGetConstMacro(UpdatedOutputOrigin, PointType);
159  itkGetConstMacro(UpdatedOutputDirection, DirectionType);
160  itkGetConstMacro(UpdatedOutputSpacing, SpacingType);
161  itkGetConstMacro(UpdatedOutputLargestPossibleRegion, ImageRegionType);
162 
166 
167 
171  virtual void GenerateOutputInformation() ITK_OVERRIDE;
172  virtual void PropagateRequestedRegion(DataObject *output) ITK_OVERRIDE;
173  virtual void EnlargeOutputRequestedRegion( DataObject *output) ITK_OVERRIDE;
174  virtual void GenerateInputRequestedRegion(void) ITK_OVERRIDE;
175  virtual void GenerateData(void) ITK_OVERRIDE;
177 
178  protected:
179 
181 
182  // ~PipelineMonitorImageFilter() { } default implementation OK
183 
184  void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE;
185  private:
186 
187  PipelineMonitorImageFilter(const PipelineMonitorImageFilter &); // not implemented
188  void operator=(const PipelineMonitorImageFilter &); // not implemented
189 
191 
192  unsigned int m_NumberOfUpdates;
193 
195 
200 
205  };
206 
207 } // end namespace itk
208 
209 #ifndef ITK_MANUAL_INSTANTIATION
210 #include "itkPipelineMonitorImageFilter.hxx"
211 #endif
212 
213 #endif //itkPipelineMonitorImageFilter_hxx
void PrintSelf(std::ostream &os, Indent indent) const override
RegionVectorType GetUpdatedRequestedRegions(void) const
virtual void PropagateRequestedRegion(DataObject *output) override
virtual void GenerateData(void) override
Light weight base class for most itk classes.
RegionVectorType GetInputRequestedRegions(void) const
bool VerifyInputFilterMatchedUpdateOutputInformation()
bool VerifyInputFilterExecutedStreaming(int expectedNumber)
RegionVectorType GetOutputRequestedRegions(void) const
ImageToImageFilter< TImageType, TImageType > Superclass
Enables monitoring, recording and debugging of the pipeline execution and information exchange...
virtual void EnlargeOutputRequestedRegion(DataObject *output) override
RegionVectorType GetUpdatedBufferedRegions(void) const
bool VerifyAllInputCanStream(int expectedNumber)
std::vector< typename TImageType::RegionType > RegionVectorType
Superclass::InputImageRegionType ImageRegionType
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
Base class for filters that take an image as input and overwrite that image as the output...
virtual void GenerateInputRequestedRegion(void) override
Base class for all data objects in ITK.
virtual void GenerateOutputInformation() override