ITK  5.2.0
Insight Toolkit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | List of all members
itk::VideoSource< TOutputVideoStream > Class Template Reference

#include <itkVideoSource.h>

+ Inheritance diagram for itk::VideoSource< TOutputVideoStream >:
+ Collaboration diagram for itk::VideoSource< TOutputVideoStream >:

Classes

struct  ThreadStruct
 

Public Types

using ConstPointer = SmartPointer< const Self >
 
using ConstWeakPointer = WeakPointer< const Self >
 
using DataObjectPointerArraySizeType = ProcessObject::DataObjectPointerArraySizeType
 
using OutputFrameDirectionType = typename OutputVideoStreamType::DirectionType
 
using OutputFrameIndexType = typename OutputVideoStreamType::IndexType
 
using OutputFramePixelType = typename OutputVideoStreamType::PixelType
 
using OutputFramePointType = typename OutputVideoStreamType::PointType
 
using OutputFrameSizeType = typename OutputVideoStreamType::SizeType
 
using OutputFrameSpacingType = typename OutputVideoStreamType::SpacingType
 
using OutputFrameSpatialRegionType = typename OutputVideoStreamType::SpatialRegionType
 
using OutputFrameType = typename OutputVideoStreamType::FrameType
 
using OutputVideoStreamType = TOutputVideoStream
 
using Pointer = SmartPointer< Self >
 
using Self = VideoSource
 
using Superclass = TemporalProcessObject
 
- Public Types inherited from itk::TemporalProcessObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = TemporalProcessObject
 
using Superclass = ProcessObject
 
- Public Types inherited from itk::ProcessObject
using ConstPointer = SmartPointer< const Self >
 
using DataObjectIdentifierType = DataObject::DataObjectIdentifierType
 
using DataObjectPointer = DataObject::Pointer
 
using DataObjectPointerArray = std::vector< DataObjectPointer >
 
using DataObjectPointerArraySizeType = DataObjectPointerArray::size_type
 
using MultiThreaderType = MultiThreaderBase
 
using NameArray = std::vector< DataObjectIdentifierType >
 
using Pointer = SmartPointer< Self >
 
using Self = ProcessObject
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetNameOfClass () const
 
OutputVideoStreamTypeGetOutput ()
 
OutputVideoStreamTypeGetOutput (unsigned int idx)
 
virtual void GraftNthOutput (unsigned int idx, OutputVideoStreamType *graft)
 
virtual void GraftOutput (OutputVideoStreamType *graft)
 
DataObjectPointer MakeOutput (DataObjectPointerArraySizeType idx) override
 
- Public Member Functions inherited from itk::TemporalProcessObject
void EnlargeOutputRequestedRegion (DataObject *output) override
 
void GenerateData () override
 
void GenerateInputRequestedRegion () override
 
void GenerateOutputRequestedRegion (DataObject *output) override
 
virtual SizeValueType GetUnitInputNumberOfFrames ()
 
virtual SizeValueType GetUnitOutputNumberOfFrames ()
 
void UpdateOutputData (DataObject *output) override
 
void UpdateOutputInformation () override
 
- Public Member Functions inherited from itk::ProcessObject
virtual void AbortGenerateDataOff ()
 
virtual void AbortGenerateDataOn ()
 
virtual const bool & GetAbortGenerateData () const
 
DataObjectPointerArray GetIndexedInputs ()
 
DataObjectPointerArray GetIndexedOutputs ()
 
NameArray GetInputNames () const
 
DataObjectPointerArray GetInputs ()
 
DataObjectPointerArraySizeType GetNumberOfIndexedInputs () const
 
DataObjectPointerArraySizeType GetNumberOfIndexedOutputs () const
 
DataObjectPointerArraySizeType GetNumberOfInputs () const
 
DataObjectPointerArraySizeType GetNumberOfOutputs () const
 
virtual DataObjectPointerArraySizeType GetNumberOfValidRequiredInputs () const
 
NameArray GetOutputNames () const
 
DataObjectPointerArray GetOutputs ()
 
virtual float GetProgress () const
 
NameArray GetRequiredInputNames () const
 
bool HasInput (const DataObjectIdentifierType &key) const
 
bool HasOutput (const DataObjectIdentifierType &key) const
 
void IncrementProgress (float increment)
 
virtual DataObjectPointer MakeOutput (const DataObjectIdentifierType &)
 
virtual void PropagateRequestedRegion (DataObject *output)
 
virtual void ResetPipeline ()
 
virtual void SetAbortGenerateData (bool _arg)
 
virtual void Update ()
 
virtual void UpdateLargestPossibleRegion ()
 
void UpdateProgress (float progress)
 
virtual void SetReleaseDataFlag (bool val)
 
virtual bool GetReleaseDataFlag () const
 
void ReleaseDataFlagOn ()
 
void ReleaseDataFlagOff ()
 
virtual void SetReleaseDataBeforeUpdateFlag (bool _arg)
 
virtual const bool & GetReleaseDataBeforeUpdateFlag () const
 
virtual void ReleaseDataBeforeUpdateFlagOn ()
 
virtual void ReleaseDataBeforeUpdateFlagOff ()
 
virtual void SetNumberOfWorkUnits (ThreadIdType _arg)
 
virtual const ThreadIdTypeGetNumberOfWorkUnits () const
 
MultiThreaderTypeGetMultiThreader () const
 
void SetMultiThreader (MultiThreaderType *threader)
 
virtual void PrepareOutputs ()
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static unsigned int GetOutputFrameDimension ()
 
static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Static Public Attributes

static constexpr unsigned int OutputFrameDimension = OutputFrameType::ImageDimension
 

Protected Member Functions

virtual void AfterThreadedGenerateData ()
 
virtual void AllocateOutputs ()
 
virtual void BeforeThreadedGenerateData ()
 
void GenerateOutputRequestedTemporalRegion (TemporalDataObject *output) override
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual int SplitRequestedSpatialRegion (int i, int num, OutputFrameSpatialRegionType &splitRegion)
 
void TemporalStreamingGenerateData () override
 
virtual void ThreadedGenerateData (const OutputFrameSpatialRegionType &outputRegionForThread, int threadId)
 
 VideoSource ()
 
 ~VideoSource () override=default
 
- Protected Member Functions inherited from itk::TemporalProcessObject
virtual void AfterTemporalStreamingGenerateData ()
 
virtual void BeforeTemporalStreamingGenerateData ()
 
virtual void EnlargeOutputRequestedTemporalRegion (TemporalDataObject *output)
 
virtual TemporalRegion GenerateDefaultLargestPossibleTemporalRegion ()
 
virtual void GenerateInputRequestedTemporalRegion ()
 
virtual SizeValueType GetInputStencilCurrentFrameIndex ()
 
virtual void SetFrameSkipPerOutput (OffsetValueType _arg)
 
virtual void SetInputStencilCurrentFrameIndex (SizeValueType _arg)
 
virtual void SetUnitInputNumberOfFrames (SizeValueType _arg)
 
virtual void SetUnitOutputNumberOfFrames (SizeValueType _arg)
 
virtual std::vector< TemporalRegionSplitRequestedTemporalRegion ()
 
 TemporalProcessObject ()
 
 ~TemporalProcessObject () override=default
 
- Protected Member Functions inherited from itk::ProcessObject
 ProcessObject ()
 
 ~ProcessObject () override
 
DataObjectGetInput (const DataObjectIdentifierType &key)
 
const DataObjectGetInput (const DataObjectIdentifierType &key) const
 
DataObjectGetInput (DataObjectPointerArraySizeType idx)
 
const DataObjectGetInput (DataObjectPointerArraySizeType idx) const
 
virtual void SetInput (const DataObjectIdentifierType &key, DataObject *input)
 
virtual void SetNthInput (DataObjectPointerArraySizeType idx, DataObject *input)
 
virtual void AddInput (DataObject *input)
 
virtual void PushBackInput (const DataObject *input)
 
virtual void PopBackInput ()
 
virtual void PushFrontInput (const DataObject *input)
 
virtual void PopFrontInput ()
 
virtual void RemoveInput (const DataObjectIdentifierType &key)
 
virtual void RemoveInput (DataObjectPointerArraySizeType)
 
DataObjectGetPrimaryInput ()
 
const DataObjectGetPrimaryInput () const
 
virtual void SetPrimaryInputName (const DataObjectIdentifierType &key)
 
virtual const char * GetPrimaryInputName () const
 
virtual void SetPrimaryInput (DataObject *object)
 
void SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num)
 
virtual void SetNumberOfRequiredInputs (DataObjectPointerArraySizeType)
 
virtual const DataObjectPointerArraySizeTypeGetNumberOfRequiredInputs () const
 
bool RemoveRequiredInputName (const DataObjectIdentifierType &)
 
bool IsRequiredInputName (const DataObjectIdentifierType &) const
 
void SetRequiredInputNames (const NameArray &)
 
bool AddRequiredInputName (const DataObjectIdentifierType &)
 
bool AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx)
 
void AddOptionalInputName (const DataObjectIdentifierType &)
 
void AddOptionalInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx)
 
DataObjectGetOutput (const DataObjectIdentifierType &key)
 
const DataObjectGetOutput (const DataObjectIdentifierType &key) const
 
virtual void SetPrimaryOutputName (const DataObjectIdentifierType &key)
 
virtual const char * GetPrimaryOutputName () const
 
DataObjectGetOutput (DataObjectPointerArraySizeType i)
 
const DataObjectGetOutput (DataObjectPointerArraySizeType i) const
 
virtual void SetOutput (const DataObjectIdentifierType &name, DataObject *output)
 
virtual void RemoveOutput (const DataObjectIdentifierType &key)
 
DataObjectGetPrimaryOutput ()
 
const DataObjectGetPrimaryOutput () const
 
virtual void SetPrimaryOutput (DataObject *object)
 
virtual void SetNthOutput (DataObjectPointerArraySizeType idx, DataObject *output)
 
virtual void AddOutput (DataObject *output)
 
virtual void RemoveOutput (DataObjectPointerArraySizeType idx)
 
virtual void SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg)
 
virtual const DataObjectPointerArraySizeTypeGetNumberOfRequiredOutputs () const
 
void SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num)
 
DataObjectIdentifierType MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const
 
DataObjectIdentifierType MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const
 
DataObjectPointerArraySizeType MakeIndexFromInputName (const DataObjectIdentifierType &name) const
 
DataObjectPointerArraySizeType MakeIndexFromOutputName (const DataObjectIdentifierType &name) const
 
bool IsIndexedInputName (const DataObjectIdentifierType &) const
 
bool IsIndexedOutputName (const DataObjectIdentifierType &) const
 
virtual void VerifyPreconditions () ITKv5_CONST
 
virtual void VerifyInputInformation () ITKv5_CONST
 
virtual void GenerateOutputInformation ()
 
virtual void PropagateResetPipeline ()
 
virtual void ReleaseInputs ()
 
virtual void CacheInputReleaseDataFlags ()
 
virtual void RestoreInputReleaseDataFlags ()
 
virtual bool GetThreaderUpdateProgress () const
 
virtual void ThreaderUpdateProgressOn ()
 
virtual void ThreaderUpdateProgressOff ()
 
virtual void SetThreaderUpdateProgress (bool arg)
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
 ~Object () override
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Static Protected Member Functions

static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION ThreaderCallback (void *arg)
 
- Static Protected Member Functions inherited from itk::ProcessObject
static constexpr float progressFixedToFloat (uint32_t fixed)
 
static uint32_t progressFloatToFixed (float f)
 

Additional Inherited Members

- Protected Attributes inherited from itk::TemporalProcessObject
OffsetValueType m_FrameSkipPerOutput { 1 }
 
SizeValueType m_InputStencilCurrentFrameIndex { 0 }
 
SizeValueType m_UnitInputNumberOfFrames { 1 }
 
SizeValueType m_UnitOutputNumberOfFrames { 1 }
 
- Protected Attributes inherited from itk::ProcessObject
bool m_Updating
 
TimeStamp m_OutputInformationMTime
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Detailed Description

template<typename TOutputVideoStream>
class itk::VideoSource< TOutputVideoStream >

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 44 of file itkVideoSource.h.

Member Typedef Documentation

◆ ConstPointer

template<typename TOutputVideoStream>
using itk::VideoSource< TOutputVideoStream >::ConstPointer = SmartPointer<const Self>

Definition at line 55 of file itkVideoSource.h.

◆ ConstWeakPointer

template<typename TOutputVideoStream>
using itk::VideoSource< TOutputVideoStream >::ConstWeakPointer = WeakPointer<const Self>

Definition at line 56 of file itkVideoSource.h.

◆ DataObjectPointerArraySizeType

template<typename TOutputVideoStream>
using itk::VideoSource< TOutputVideoStream >::DataObjectPointerArraySizeType = ProcessObject::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.

Definition at line 107 of file itkVideoSource.h.

◆ OutputFrameDirectionType

template<typename TOutputVideoStream>
using itk::VideoSource< TOutputVideoStream >::OutputFrameDirectionType = typename OutputVideoStreamType::DirectionType

Definition at line 66 of file itkVideoSource.h.

◆ OutputFrameIndexType

template<typename TOutputVideoStream>
using itk::VideoSource< TOutputVideoStream >::OutputFrameIndexType = typename OutputVideoStreamType::IndexType

Definition at line 61 of file itkVideoSource.h.

◆ OutputFramePixelType

template<typename TOutputVideoStream>
using itk::VideoSource< TOutputVideoStream >::OutputFramePixelType = typename OutputVideoStreamType::PixelType

Definition at line 62 of file itkVideoSource.h.

◆ OutputFramePointType

template<typename TOutputVideoStream>
using itk::VideoSource< TOutputVideoStream >::OutputFramePointType = typename OutputVideoStreamType::PointType

Definition at line 63 of file itkVideoSource.h.

◆ OutputFrameSizeType

template<typename TOutputVideoStream>
using itk::VideoSource< TOutputVideoStream >::OutputFrameSizeType = typename OutputVideoStreamType::SizeType

Definition at line 65 of file itkVideoSource.h.

◆ OutputFrameSpacingType

template<typename TOutputVideoStream>
using itk::VideoSource< TOutputVideoStream >::OutputFrameSpacingType = typename OutputVideoStreamType::SpacingType

Definition at line 64 of file itkVideoSource.h.

◆ OutputFrameSpatialRegionType

template<typename TOutputVideoStream>
using itk::VideoSource< TOutputVideoStream >::OutputFrameSpatialRegionType = typename OutputVideoStreamType::SpatialRegionType

Definition at line 60 of file itkVideoSource.h.

◆ OutputFrameType

template<typename TOutputVideoStream>
using itk::VideoSource< TOutputVideoStream >::OutputFrameType = typename OutputVideoStreamType::FrameType

Definition at line 59 of file itkVideoSource.h.

◆ OutputVideoStreamType

template<typename TOutputVideoStream>
using itk::VideoSource< TOutputVideoStream >::OutputVideoStreamType = TOutputVideoStream

Definition at line 57 of file itkVideoSource.h.

◆ Pointer

template<typename TOutputVideoStream>
using itk::VideoSource< TOutputVideoStream >::Pointer = SmartPointer<Self>

Definition at line 54 of file itkVideoSource.h.

◆ Self

template<typename TOutputVideoStream>
using itk::VideoSource< TOutputVideoStream >::Self = VideoSource

Standard class type aliases

Definition at line 52 of file itkVideoSource.h.

◆ Superclass

template<typename TOutputVideoStream>
using itk::VideoSource< TOutputVideoStream >::Superclass = TemporalProcessObject

Definition at line 53 of file itkVideoSource.h.

Constructor & Destructor Documentation

◆ VideoSource()

template<typename TOutputVideoStream>
itk::VideoSource< TOutputVideoStream >::VideoSource ( )
protected

◆ ~VideoSource()

template<typename TOutputVideoStream>
itk::VideoSource< TOutputVideoStream >::~VideoSource ( )
overrideprotecteddefault

Member Function Documentation

◆ AfterThreadedGenerateData()

template<typename TOutputVideoStream>
virtual void itk::VideoSource< TOutputVideoStream >::AfterThreadedGenerateData ( )
inlineprotectedvirtual

Method that gets called after all threads finish in TemporalStreamingGenerateData

Definition at line 166 of file itkVideoSource.h.

◆ AllocateOutputs()

template<typename TOutputVideoStream>
virtual void itk::VideoSource< TOutputVideoStream >::AllocateOutputs ( )
protectedvirtual

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.

◆ BeforeThreadedGenerateData()

template<typename TOutputVideoStream>
virtual void itk::VideoSource< TOutputVideoStream >::BeforeThreadedGenerateData ( )
inlineprotectedvirtual

Method that gets called before threads are dispatched from TemporalStreamingGeneratData

Definition at line 160 of file itkVideoSource.h.

◆ CreateAnother()

template<typename TOutputVideoStream>
virtual::itk::LightObject::Pointer itk::VideoSource< TOutputVideoStream >::CreateAnother ( ) 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::VideoFileReader< TOutputVideoStream >, itk::VideoToVideoFilter< itk::VideoStream< TImageToImageFilter::InputImageType >, itk::VideoStream< TImageToImageFilter::OutputImageType > >, itk::VideoToVideoFilter< TVideoStream, TVideoStream >, itk::FrameDifferenceVideoFilter< TInputVideoStream, TOutputVideoStream >, and itk::FrameAverageVideoFilter< TInputVideoStream, TOutputVideoStream >.

◆ GenerateOutputRequestedTemporalRegion()

template<typename TOutputVideoStream>
void itk::VideoSource< TOutputVideoStream >::GenerateOutputRequestedTemporalRegion ( TemporalDataObject output)
overrideprotectedvirtual

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.

◆ GetNameOfClass()

template<typename TOutputVideoStream>
virtual const char* itk::VideoSource< TOutputVideoStream >::GetNameOfClass ( ) const
virtual

◆ GetOutput() [1/2]

template<typename TOutputVideoStream>
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)

◆ GetOutput() [2/2]

template<typename TOutputVideoStream>
OutputVideoStreamType* itk::VideoSource< TOutputVideoStream >::GetOutput ( unsigned int  idx)

◆ GetOutputFrameDimension()

template<typename TOutputVideoStream>
static unsigned int itk::VideoSource< TOutputVideoStream >::GetOutputFrameDimension ( )
inlinestatic

Definition at line 78 of file itkVideoSource.h.

◆ GraftNthOutput()

template<typename TOutputVideoStream>
virtual void itk::VideoSource< TOutputVideoStream >::GraftNthOutput ( unsigned int  idx,
OutputVideoStreamType graft 
)
virtual

Graft the provided VideoStream onto the TemporalProcessObject's idx'th output using VideoStream's Graft implementation

◆ GraftOutput()

template<typename TOutputVideoStream>
virtual void itk::VideoSource< TOutputVideoStream >::GraftOutput ( OutputVideoStreamType graft)
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.

◆ MakeOutput()

template<typename TOutputVideoStream>
DataObjectPointer itk::VideoSource< TOutputVideoStream >::MakeOutput ( DataObjectPointerArraySizeType  idx)
overridevirtual

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.

◆ New()

template<typename TOutputVideoStream>
static Pointer itk::VideoSource< TOutputVideoStream >::New ( )
static

◆ PrintSelf()

template<typename TOutputVideoStream>
void itk::VideoSource< TOutputVideoStream >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual

◆ SplitRequestedSpatialRegion()

template<typename TOutputVideoStream>
virtual int itk::VideoSource< TOutputVideoStream >::SplitRequestedSpatialRegion ( int  i,
int  num,
OutputFrameSpatialRegionType splitRegion 
)
protectedvirtual

This method functions like SplitRequestedRegion in ImageSource and is used by the implementation of TemporalStreamingGenerateData to dispatch threads that call ThreadedGenerateData.

◆ TemporalStreamingGenerateData()

template<typename TOutputVideoStream>
void itk::VideoSource< TOutputVideoStream >::TemporalStreamingGenerateData ( )
overrideprotectedvirtual

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 >.

◆ ThreadedGenerateData()

template<typename TOutputVideoStream>
virtual void itk::VideoSource< TOutputVideoStream >::ThreadedGenerateData ( const OutputFrameSpatialRegionType outputRegionForThread,
int  threadId 
)
protectedvirtual

ThreadedGenerateData here serves the same semantic 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 >.

◆ ThreaderCallback()

template<typename TOutputVideoStream>
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION itk::VideoSource< TOutputVideoStream >::ThreaderCallback ( void *  arg)
staticprotected

Static thread callback function for the MultiThreaderBase. This gives control to ThreadedGenerateData().

Member Data Documentation

◆ OutputFrameDimension

template<typename TOutputVideoStream>
constexpr unsigned int itk::VideoSource< TOutputVideoStream >::OutputFrameDimension = OutputFrameType::ImageDimension
staticconstexpr

Access the spacial dimensionality of the frames

Definition at line 76 of file itkVideoSource.h.


The documentation for this class was generated from the following file: