ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkVideoToVideoFilter.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 __itkVideoToVideoFilter_h
19 #define __itkVideoToVideoFilter_h
20 
21 #include "itkVideoSource.h"
22 #include "itkVideoStream.h"
23 
24 namespace itk
25 {
26 
43 template< class TInputVideoStream, class TOutputVideoStream >
44 class ITK_EXPORT VideoToVideoFilter : public VideoSource< TOutputVideoStream >
45 {
46 public:
47 
48  /*-TYPEDEFS----------------------------------------------------------------*/
49 
51  typedef TInputVideoStream InputVideoStreamType;
52  typedef TOutputVideoStream OutputVideoStreamType;
59 
61  typedef typename Superclass::OutputFrameType OutputFrameType;
62  typedef typename Superclass::OutputFrameSpatialRegionType OutputFrameSpatialRegionType;
63 
65  typedef typename InputVideoStreamType::FrameType InputFrameType;
66  typedef typename InputVideoStreamType::SpatialRegionType InputFrameSpatialRegionType;
67  typedef typename InputVideoStreamType::IndexType InputFrameIndexType;
68  typedef typename InputVideoStreamType::PixelType InputFramePixelType;
69  typedef typename InputVideoStreamType::PointType InputFramePointType;
70  typedef typename InputVideoStreamType::SpacingType InputFrameSpacingType;
71  typedef typename InputVideoStreamType::SizeType InputFrameSizeType;
72  typedef typename InputVideoStreamType::DirectionType InputFrameDirectionType;
73 
74  itkNewMacro(Self);
75 
77  itkTypeMacro(VideoToVideoFilter, VideoSource);
78 
79  /*-PUBLIC METHODS----------------------------------------------------------*/
80 
82  using Superclass::SetInput;
83  virtual void SetInput( const InputVideoStreamType* videoStream);
84 
85  virtual void SetInput( unsigned int idx, const InputVideoStreamType* videoStream);
86 
88  const InputVideoStreamType* GetInput() const;
89 
90  const InputVideoStreamType* GetInput(unsigned int idx) const;
91 
98  virtual void UpdateOutputInformation();
99 
100 protected:
101 
105  InputVideoStreamType* GetInput();
106 
107  InputVideoStreamType* GetInput(unsigned int idx);
108 
113  virtual void GenerateOutputRequestedRegion(DataObject* output);
114 
120  virtual void GenerateInputRequestedRegion();
121 
125  virtual void BeforeTemporalStreamingGenerateData();
126 
128  virtual ~VideoToVideoFilter();
129 
130  virtual void PrintSelf(std::ostream & os, Indent indent) const;
131 
132 private:
133 
134  VideoToVideoFilter(const Self &); //purposely not implemented
135  void operator=(const Self &); //purposely not implemented
136 
137 }; // end class VideoToVideoFilter
138 
139 } // end namespace itk
140 
141 #ifndef ITK_MANUAL_INSTANTIATION
142 #include "itkVideoToVideoFilter.hxx"
143 #endif
144 
145 #endif
146