ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkVideoToVideoFilter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkVideoToVideoFilter_h
00019 #define __itkVideoToVideoFilter_h
00020 
00021 #include "itkVideoSource.h"
00022 #include "itkVideoStream.h"
00023 
00024 namespace itk
00025 {
00026 
00043 template< class TInputVideoStream, class TOutputVideoStream >
00044 class ITK_EXPORT VideoToVideoFilter : public VideoSource< TOutputVideoStream >
00045 {
00046 public:
00047 
00048   /*-TYPEDEFS----------------------------------------------------------------*/
00049 
00051   typedef TInputVideoStream                           InputVideoStreamType;
00052   typedef TOutputVideoStream                          OutputVideoStreamType;
00053   typedef VideoToVideoFilter< InputVideoStreamType,
00054                               OutputVideoStreamType > Self;
00055   typedef VideoSource< OutputVideoStreamType >        Superclass;
00056   typedef SmartPointer< Self >                        Pointer;
00057   typedef SmartPointer< const Self >                  ConstPointer;
00058   typedef WeakPointer< const Self >                   ConstWeakPointer;
00059 
00061   typedef typename Superclass::OutputFrameType              OutputFrameType;
00062   typedef typename Superclass::OutputFrameSpatialRegionType OutputFrameSpatialRegionType;
00063 
00065   typedef typename InputVideoStreamType::FrameType         InputFrameType;
00066   typedef typename InputVideoStreamType::SpatialRegionType InputFrameSpatialRegionType;
00067   typedef typename InputVideoStreamType::IndexType         InputFrameIndexType;
00068   typedef typename InputVideoStreamType::PixelType         InputFramePixelType;
00069   typedef typename InputVideoStreamType::PointType         InputFramePointType;
00070   typedef typename InputVideoStreamType::SpacingType       InputFrameSpacingType;
00071   typedef typename InputVideoStreamType::SizeType          InputFrameSizeType;
00072   typedef typename InputVideoStreamType::DirectionType     InputFrameDirectionType;
00073 
00074   itkNewMacro(Self);
00075 
00077   itkTypeMacro(VideoToVideoFilter, VideoSource);
00078 
00079   /*-PUBLIC METHODS----------------------------------------------------------*/
00080 
00082   using Superclass::SetInput;
00083   virtual void SetInput( const InputVideoStreamType* videoStream);
00084 
00085   virtual void SetInput( unsigned int idx, const InputVideoStreamType* videoStream);
00086 
00088   const InputVideoStreamType* GetInput() const;
00089 
00090   const InputVideoStreamType* GetInput(unsigned int idx) const;
00091 
00098   virtual void UpdateOutputInformation();
00099 
00100 protected:
00101 
00105   InputVideoStreamType* GetInput();
00106 
00107   InputVideoStreamType* GetInput(unsigned int idx);
00108 
00113   virtual void GenerateOutputRequestedRegion(DataObject* output);
00114 
00120   virtual void GenerateInputRequestedRegion();
00121 
00125   virtual void BeforeTemporalStreamingGenerateData();
00126 
00127   VideoToVideoFilter();
00128   virtual ~VideoToVideoFilter();
00129 
00130   virtual void PrintSelf(std::ostream & os, Indent indent) const;
00131 
00132 private:
00133 
00134   VideoToVideoFilter(const Self &); //purposely not implemented
00135   void operator=(const Self &);     //purposely not implemented
00136 
00137 };  // end class VideoToVideoFilter
00138 
00139 } // end namespace itk
00140 
00141 #if ITK_TEMPLATE_TXX
00142 #include "itkVideoToVideoFilter.hxx"
00143 #endif
00144 
00145 #endif
00146