ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
#include <itkVideoSource.h>
Classes | |
struct | ThreadStruct |
Public Types | |
typedef SmartPointer< const Self > | ConstPointer |
typedef WeakPointer< const Self > | ConstWeakPointer |
typedef ProcessObject::DataObjectPointerArraySizeType | DataObjectPointerArraySizeType |
typedef OutputVideoStreamType::DirectionType | OutputFrameDirectionType |
typedef OutputVideoStreamType::IndexType | OutputFrameIndexType |
typedef OutputVideoStreamType::PixelType | OutputFramePixelType |
typedef OutputVideoStreamType::PointType | OutputFramePointType |
typedef OutputVideoStreamType::SizeType | OutputFrameSizeType |
typedef OutputVideoStreamType::SpacingType | OutputFrameSpacingType |
typedef OutputVideoStreamType::SpatialRegionType | OutputFrameSpatialRegionType |
typedef OutputVideoStreamType::FrameType | OutputFrameType |
typedef TOutputVideoStream | OutputVideoStreamType |
typedef SmartPointer< Self > | Pointer |
typedef VideoSource | Self |
typedef TemporalProcessObject | Superclass |
Public Member Functions | |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
virtual const char * | GetNameOfClass () const |
OutputVideoStreamType * | GetOutput () |
OutputVideoStreamType * | GetOutput (unsigned int idx) |
virtual void | GraftNthOutput (unsigned int idx, OutputVideoStreamType *output) |
virtual void | GraftOutput (OutputVideoStreamType *output) |
virtual DataObjectPointer | MakeOutput (DataObjectPointerArraySizeType idx) |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
virtual void | AfterThreadedGenerateData () |
virtual void | AllocateOutputs () |
virtual void | BeforeThreadedGenerateData () |
virtual void | GenerateOutputRequestedTemporalRegion (TemporalDataObject *output) |
virtual void | PrintSelf (std::ostream &os, Indent indent) const |
virtual int | SplitRequestedSpatialRegion (int i, int num, OutputFrameSpatialRegionType &splitRegion) |
virtual void | TemporalStreamingGenerateData () |
virtual void | ThreadedGenerateData (const OutputFrameSpatialRegionType &outputRegionForThread, int threadId) |
VideoSource () | |
virtual | ~VideoSource () |
Static Protected Member Functions | |
static ITK_THREAD_RETURN_TYPE | ThreaderCallback (void *arg) |
Private Member Functions | |
void | operator= (const Self &) |
VideoSource (const Self &) | |
static const unsigned int | OutputFrameDimension = OutputFrameType::ImageDimension |
static unsigned int | GetOutputFrameDimension () |
A TemporalProcessObject that produces a VideoStream.
VideoSource acts as the base class for all TemporalProcess objects that produce a VideoStream as their output. This class defines GetOutput() which returns a pointer to the VideoStream object on output port 0.
The other roll that VideoSource plays is to implement the framework for spatial streaming to complement the temporal streaming implemented in TemporalProcessObject. This implementation mirrors the implementation in ImageSource except that each thread will be able to operate on a spatial region of each frame in the current temporal region that is being processed.
Definition at line 43 of file itkVideoSource.h.
typedef SmartPointer< const Self > itk::VideoSource< TOutputVideoStream >::ConstPointer |
Reimplemented from itk::TemporalProcessObject.
Reimplemented in itk::VideoToVideoFilter< TInputVideoStream, TOutputVideoStream >, itk::ImageFilterToVideoFilterWrapper< TImageToImageFilter >, itk::VideoToVideoFilter< itk::VideoStream< TImageToImageFilter::InputImageType >, itk::VideoStream< TImageToImageFilter::OutputImageType > >, itk::VideoToVideoFilter< TVideoStream, TVideoStream >, itk::FrameDifferenceVideoFilter< TInputVideoStream, TOutputVideoStream >, itk::DecimateFramesVideoFilter< TVideoStream >, and itk::FrameAverageVideoFilter< TInputVideoStream, TOutputVideoStream >.
Definition at line 53 of file itkVideoSource.h.
typedef WeakPointer< const Self > itk::VideoSource< TOutputVideoStream >::ConstWeakPointer |
Reimplemented in itk::VideoToVideoFilter< TInputVideoStream, TOutputVideoStream >, itk::ImageFilterToVideoFilterWrapper< TImageToImageFilter >, itk::VideoToVideoFilter< itk::VideoStream< TImageToImageFilter::InputImageType >, itk::VideoStream< TImageToImageFilter::OutputImageType > >, itk::VideoToVideoFilter< TVideoStream, TVideoStream >, itk::FrameDifferenceVideoFilter< TInputVideoStream, TOutputVideoStream >, itk::DecimateFramesVideoFilter< TVideoStream >, and itk::FrameAverageVideoFilter< TInputVideoStream, TOutputVideoStream >.
Definition at line 54 of file itkVideoSource.h.
typedef ProcessObject::DataObjectPointerArraySizeType itk::VideoSource< TOutputVideoStream >::DataObjectPointerArraySizeType |
Make a DataObject of the correct type for the specified output port. The default always creates an OutputVideoStreamType object, so subclasses with multiple types of output must override this to return the proper type.
Reimplemented from itk::ProcessObject.
Definition at line 101 of file itkVideoSource.h.
typedef OutputVideoStreamType::DirectionType itk::VideoSource< TOutputVideoStream >::OutputFrameDirectionType |
Definition at line 64 of file itkVideoSource.h.
typedef OutputVideoStreamType::IndexType itk::VideoSource< TOutputVideoStream >::OutputFrameIndexType |
Definition at line 59 of file itkVideoSource.h.
typedef OutputVideoStreamType::PixelType itk::VideoSource< TOutputVideoStream >::OutputFramePixelType |
Definition at line 60 of file itkVideoSource.h.
typedef OutputVideoStreamType::PointType itk::VideoSource< TOutputVideoStream >::OutputFramePointType |
Definition at line 61 of file itkVideoSource.h.
typedef OutputVideoStreamType::SizeType itk::VideoSource< TOutputVideoStream >::OutputFrameSizeType |
Definition at line 63 of file itkVideoSource.h.
typedef OutputVideoStreamType::SpacingType itk::VideoSource< TOutputVideoStream >::OutputFrameSpacingType |
Definition at line 62 of file itkVideoSource.h.
typedef OutputVideoStreamType::SpatialRegionType itk::VideoSource< TOutputVideoStream >::OutputFrameSpatialRegionType |
Reimplemented in itk::VideoToVideoFilter< TInputVideoStream, TOutputVideoStream >, itk::VideoToVideoFilter< itk::VideoStream< TImageToImageFilter::InputImageType >, itk::VideoStream< TImageToImageFilter::OutputImageType > >, itk::VideoToVideoFilter< TVideoStream, TVideoStream >, itk::FrameDifferenceVideoFilter< TInputVideoStream, TOutputVideoStream >, and itk::FrameAverageVideoFilter< TInputVideoStream, TOutputVideoStream >.
Definition at line 58 of file itkVideoSource.h.
typedef OutputVideoStreamType::FrameType itk::VideoSource< TOutputVideoStream >::OutputFrameType |
Reimplemented in itk::VideoToVideoFilter< TInputVideoStream, TOutputVideoStream >, itk::VideoToVideoFilter< itk::VideoStream< TImageToImageFilter::InputImageType >, itk::VideoStream< TImageToImageFilter::OutputImageType > >, itk::VideoToVideoFilter< TVideoStream, TVideoStream >, itk::FrameDifferenceVideoFilter< TInputVideoStream, TOutputVideoStream >, itk::FrameAverageVideoFilter< TInputVideoStream, TOutputVideoStream >, and itk::ImageFilterToVideoFilterWrapper< TImageToImageFilter >.
Definition at line 57 of file itkVideoSource.h.
typedef TOutputVideoStream itk::VideoSource< TOutputVideoStream >::OutputVideoStreamType |
Reimplemented in itk::VideoToVideoFilter< TInputVideoStream, TOutputVideoStream >, itk::VideoToVideoFilter< itk::VideoStream< TImageToImageFilter::InputImageType >, itk::VideoStream< TImageToImageFilter::OutputImageType > >, itk::VideoToVideoFilter< TVideoStream, TVideoStream >, itk::ImageFilterToVideoFilterWrapper< TImageToImageFilter >, itk::DecimateFramesVideoFilter< TVideoStream >, itk::FrameDifferenceVideoFilter< TInputVideoStream, TOutputVideoStream >, and itk::FrameAverageVideoFilter< TInputVideoStream, TOutputVideoStream >.
Definition at line 55 of file itkVideoSource.h.
typedef SmartPointer< Self > itk::VideoSource< TOutputVideoStream >::Pointer |
Reimplemented from itk::TemporalProcessObject.
Reimplemented in itk::VideoToVideoFilter< TInputVideoStream, TOutputVideoStream >, itk::ImageFilterToVideoFilterWrapper< TImageToImageFilter >, itk::VideoToVideoFilter< itk::VideoStream< TImageToImageFilter::InputImageType >, itk::VideoStream< TImageToImageFilter::OutputImageType > >, itk::VideoToVideoFilter< TVideoStream, TVideoStream >, itk::VideoFileReader< TOutputVideoStream >, itk::FrameDifferenceVideoFilter< TInputVideoStream, TOutputVideoStream >, itk::DecimateFramesVideoFilter< TVideoStream >, and itk::FrameAverageVideoFilter< TInputVideoStream, TOutputVideoStream >.
Definition at line 52 of file itkVideoSource.h.
typedef VideoSource itk::VideoSource< TOutputVideoStream >::Self |
Standard class typedefs
Reimplemented from itk::TemporalProcessObject.
Reimplemented in itk::VideoToVideoFilter< TInputVideoStream, TOutputVideoStream >, itk::VideoToVideoFilter< itk::VideoStream< TImageToImageFilter::InputImageType >, itk::VideoStream< TImageToImageFilter::OutputImageType > >, itk::VideoToVideoFilter< TVideoStream, TVideoStream >, itk::ImageFilterToVideoFilterWrapper< TImageToImageFilter >, itk::VideoFileReader< TOutputVideoStream >, itk::FrameDifferenceVideoFilter< TInputVideoStream, TOutputVideoStream >, itk::DecimateFramesVideoFilter< TVideoStream >, and itk::FrameAverageVideoFilter< TInputVideoStream, TOutputVideoStream >.
Definition at line 50 of file itkVideoSource.h.
typedef TemporalProcessObject itk::VideoSource< TOutputVideoStream >::Superclass |
Reimplemented from itk::TemporalProcessObject.
Reimplemented in itk::VideoToVideoFilter< TInputVideoStream, TOutputVideoStream >, itk::ImageFilterToVideoFilterWrapper< TImageToImageFilter >, itk::VideoToVideoFilter< itk::VideoStream< TImageToImageFilter::InputImageType >, itk::VideoStream< TImageToImageFilter::OutputImageType > >, itk::VideoToVideoFilter< TVideoStream, TVideoStream >, itk::VideoFileReader< TOutputVideoStream >, itk::FrameDifferenceVideoFilter< TInputVideoStream, TOutputVideoStream >, itk::DecimateFramesVideoFilter< TVideoStream >, and itk::FrameAverageVideoFilter< TInputVideoStream, TOutputVideoStream >.
Definition at line 51 of file itkVideoSource.h.
itk::VideoSource< TOutputVideoStream >::VideoSource | ( | ) | [protected] |
virtual itk::VideoSource< TOutputVideoStream >::~VideoSource | ( | ) | [protected, virtual] |
itk::VideoSource< TOutputVideoStream >::VideoSource | ( | const Self & | ) | [private] |
virtual void itk::VideoSource< TOutputVideoStream >::AfterThreadedGenerateData | ( | void | ) | [inline, protected, virtual] |
Method that gets called after all threads finish in TemporalStreamingGenerateData
Definition at line 156 of file itkVideoSource.h.
virtual void itk::VideoSource< TOutputVideoStream >::AllocateOutputs | ( | ) | [protected, virtual] |
The GenerateData method normally allocates the buffers for all of the outputs of a filter. Some filters may want to override this default behavior. For example, a filter may have multiple outputs with varying resolution. Or a filter may want to process data in place by grafting its input to its output.
virtual void itk::VideoSource< TOutputVideoStream >::BeforeThreadedGenerateData | ( | void | ) | [inline, protected, virtual] |
Method that gets called before threads are dispatched from TemporalStreamingGeneratData
Definition at line 151 of file itkVideoSource.h.
virtual::itk::LightObject::Pointer itk::VideoSource< TOutputVideoStream >::CreateAnother | ( | void | ) | const [virtual] |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::Object.
Reimplemented in itk::VideoToVideoFilter< TInputVideoStream, TOutputVideoStream >, itk::VideoToVideoFilter< itk::VideoStream< TImageToImageFilter::InputImageType >, itk::VideoStream< TImageToImageFilter::OutputImageType > >, itk::VideoToVideoFilter< TVideoStream, TVideoStream >, itk::VideoFileReader< TOutputVideoStream >, itk::ImageFilterToVideoFilterWrapper< TImageToImageFilter >, itk::FrameDifferenceVideoFilter< TInputVideoStream, TOutputVideoStream >, itk::FrameAverageVideoFilter< TInputVideoStream, TOutputVideoStream >, and itk::DecimateFramesVideoFilter< TVideoStream >.
virtual void itk::VideoSource< TOutputVideoStream >::GenerateOutputRequestedTemporalRegion | ( | TemporalDataObject * | output | ) | [protected, virtual] |
Override GenerateOutputRequestedTemporalRegion to make sure that if the requested temporal region is not set, it gets set to the largest possible temporal region (using TemporalProcessObject's implementation) and the output has enough frame buffer slots to hold the entire request. We don't want the number of buffers to be changed for mid-pipeline filters since they will usually operate on fewer frames than requested at any given time. The solution is to only change the number of buffers if the requested temporal region was unset at the beginning of the call since mid-pipeline filters will always have their outputs' requested spatial regions set by the GenerateInputRequestedRegion call from the filter one further down the pipeline.
Reimplemented from itk::TemporalProcessObject.
virtual const char* itk::VideoSource< TOutputVideoStream >::GetNameOfClass | ( | ) | const [virtual] |
Run-time type information (and related methods).
Reimplemented from itk::TemporalProcessObject.
Reimplemented in itk::VideoToVideoFilter< TInputVideoStream, TOutputVideoStream >, itk::VideoToVideoFilter< itk::VideoStream< TImageToImageFilter::InputImageType >, itk::VideoStream< TImageToImageFilter::OutputImageType > >, itk::VideoToVideoFilter< TVideoStream, TVideoStream >, itk::VideoFileReader< TOutputVideoStream >, itk::ImageFilterToVideoFilterWrapper< TImageToImageFilter >, itk::FrameDifferenceVideoFilter< TInputVideoStream, TOutputVideoStream >, itk::FrameAverageVideoFilter< TInputVideoStream, TOutputVideoStream >, and itk::DecimateFramesVideoFilter< TVideoStream >.
OutputVideoStreamType* itk::VideoSource< TOutputVideoStream >::GetOutput | ( | ) |
GetOutput() returns a pointer to the VideoStream on output port 0. This is analogous to the GetOutput on ImageSource and will be used to pass VideoStream data between TemporalProcessObjects (typically video filters)
OutputVideoStreamType* itk::VideoSource< TOutputVideoStream >::GetOutput | ( | unsigned int | idx | ) |
static unsigned int itk::VideoSource< TOutputVideoStream >::GetOutputFrameDimension | ( | ) | [inline, static] |
Access the spacial dimensionality of the frames
Definition at line 75 of file itkVideoSource.h.
virtual void itk::VideoSource< TOutputVideoStream >::GraftNthOutput | ( | unsigned int | idx, |
OutputVideoStreamType * | output | ||
) | [virtual] |
Graft the provided VideoStream onto the TemporalProcessObject's idx'th output using VideoStream's Graft implementation
virtual void itk::VideoSource< TOutputVideoStream >::GraftOutput | ( | OutputVideoStreamType * | output | ) | [virtual] |
Graft the provided VideoStream onto the 0th output. This is useful for ImageSources that use a mini-pipeline internally. See comment in ImageSource for more information.
virtual DataObjectPointer itk::VideoSource< TOutputVideoStream >::MakeOutput | ( | DataObjectPointerArraySizeType | idx | ) | [virtual] |
Make a DataObject of the correct type to used as the specified output. Every ProcessObject subclass must be able to create a DataObject that can be used as a specified output. This method is automatically called when DataObject::DisconnectPipeline() is called. DataObject::DisconnectPipeline, disconnects a data object from being an output of its current source. When the data object is disconnected, the ProcessObject needs to construct a replacement output data object so that the ProcessObject is in a valid state. So DataObject::DisconnectPipeline eventually calls ProcessObject::MakeOutput. Note that MakeOutput always returns a itkSmartPointer to a DataObject. ImageSource and MeshSource override this method to create the correct type of image and mesh respectively. If a filter has multiple outputs of different types, then that filter must provide an implementation of MakeOutput().
Reimplemented from itk::ProcessObject.
static Pointer itk::VideoSource< TOutputVideoStream >::New | ( | ) | [static] |
Method for creation through the object factory.
Reimplemented from itk::Object.
Reimplemented in itk::VideoToVideoFilter< TInputVideoStream, TOutputVideoStream >, itk::VideoToVideoFilter< itk::VideoStream< TImageToImageFilter::InputImageType >, itk::VideoStream< TImageToImageFilter::OutputImageType > >, itk::VideoToVideoFilter< TVideoStream, TVideoStream >, itk::VideoFileReader< TOutputVideoStream >, itk::ImageFilterToVideoFilterWrapper< TImageToImageFilter >, itk::FrameDifferenceVideoFilter< TInputVideoStream, TOutputVideoStream >, itk::FrameAverageVideoFilter< TInputVideoStream, TOutputVideoStream >, and itk::DecimateFramesVideoFilter< TVideoStream >.
void itk::VideoSource< TOutputVideoStream >::operator= | ( | const Self & | ) | [private] |
Time when GenerateOutputInformation was last called.
Reimplemented from itk::TemporalProcessObject.
Reimplemented in itk::VideoFileReader< TOutputVideoStream >, itk::VideoToVideoFilter< TInputVideoStream, TOutputVideoStream >, itk::VideoToVideoFilter< itk::VideoStream< TImageToImageFilter::InputImageType >, itk::VideoStream< TImageToImageFilter::OutputImageType > >, itk::VideoToVideoFilter< TVideoStream, TVideoStream >, itk::ImageFilterToVideoFilterWrapper< TImageToImageFilter >, itk::FrameDifferenceVideoFilter< TInputVideoStream, TOutputVideoStream >, itk::FrameAverageVideoFilter< TInputVideoStream, TOutputVideoStream >, and itk::DecimateFramesVideoFilter< TVideoStream >.
virtual void itk::VideoSource< TOutputVideoStream >::PrintSelf | ( | std::ostream & | os, |
Indent | indent | ||
) | const [protected, virtual] |
ITK print mechanism
Reimplemented from itk::TemporalProcessObject.
Reimplemented in itk::VideoToVideoFilter< TInputVideoStream, TOutputVideoStream >, itk::VideoToVideoFilter< itk::VideoStream< TImageToImageFilter::InputImageType >, itk::VideoStream< TImageToImageFilter::OutputImageType > >, itk::VideoToVideoFilter< TVideoStream, TVideoStream >, itk::VideoFileReader< TOutputVideoStream >, itk::ImageFilterToVideoFilterWrapper< TImageToImageFilter >, itk::FrameDifferenceVideoFilter< TInputVideoStream, TOutputVideoStream >, itk::FrameAverageVideoFilter< TInputVideoStream, TOutputVideoStream >, and itk::DecimateFramesVideoFilter< TVideoStream >.
virtual int itk::VideoSource< TOutputVideoStream >::SplitRequestedSpatialRegion | ( | int | i, |
int | num, | ||
OutputFrameSpatialRegionType & | splitRegion | ||
) | [protected, virtual] |
This method functions like SplitRequestedRegion in ImageSource and is used by the implementation of TemporalStreamingGenerateData to dispatch threads that call ThreadedGenerateData.
virtual void itk::VideoSource< TOutputVideoStream >::TemporalStreamingGenerateData | ( | ) | [protected, virtual] |
We override the default implementation of TemporalStreamingGenerateData from TemporalProcessObject to provide functionality for spatial streaming. This implementation works exactly the same way as the implementation of GenerateData in ImageSource. The filter-specific implementation of ThreadedGenerateData will be responsible of accessing the correct frames.
Reimplemented from itk::TemporalProcessObject.
Reimplemented in itk::VideoFileReader< TOutputVideoStream >, and itk::ImageFilterToVideoFilterWrapper< TImageToImageFilter >.
virtual void itk::VideoSource< TOutputVideoStream >::ThreadedGenerateData | ( | const OutputFrameSpatialRegionType & | outputRegionForThread, |
int | threadId | ||
) | [protected, virtual] |
ThreadedGenerateData here serves the same symnatic purpose as ThreadedGenerateData in ProcessObjects that handle Images. This is to say that ThreadedGenerateData is in charge of performing a single algorithmic operation on a portion of the requested region. The difference will come in the implementation of each filter. Subclass implementations must access the passed spatial region across the desired number of frames in the buffered TemporalRegion of the input.
WARNING: subclasses may need to handle the case where different frames have different spatial dimensions and thus some frames may not be accessible at the requested spatial region.
Reimplemented in itk::FrameDifferenceVideoFilter< TInputVideoStream, TOutputVideoStream >, and itk::FrameAverageVideoFilter< TInputVideoStream, TOutputVideoStream >.
static ITK_THREAD_RETURN_TYPE itk::VideoSource< TOutputVideoStream >::ThreaderCallback | ( | void * | arg | ) | [static, protected] |
Static thread callback function for the MultiThreader. This gives control to ThreadedGenerateData().
const unsigned int itk::VideoSource< TOutputVideoStream >::OutputFrameDimension = OutputFrameType::ImageDimension [static] |
Access the spacial dimensionality of the frames
Definition at line 74 of file itkVideoSource.h.