ITK  5.0.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
itk::VideoFileWriter< TInputVideoStream > Class Template Reference

#include <itkVideoFileWriter.h>

+ Inheritance diagram for itk::VideoFileWriter< TInputVideoStream >:
+ Collaboration diagram for itk::VideoFileWriter< TInputVideoStream >:

Detailed Description

template<typename TInputVideoStream>
class itk::VideoFileWriter< TInputVideoStream >

Writer that takes in a VideoStream and writes the frames to a file.

This class is a subclass of TemporalProcessObject which specifically takes a single VideoStream as input and writes the frames out to a file in sequence. A call to Update() will write the entire requested temporal region to the file. If no temporal region is requested, the largest possible will be used.

Definition at line 39 of file itkVideoFileWriter.h.

Public Types

using FrameType = typename VideoStreamType::FrameType
 
using IOBasePointer = typename VideoIOBase::Pointer
 
using IOBaseType = VideoIOBase
 
using PixelType = typename FrameType::PixelType
 
using Pointer = SmartPointer< Self >
 
using Self = VideoFileWriter< TInputVideoStream >
 
using SizeValueType = typename IOBaseType::SizeValueType
 
using Superclass = TemporalProcessObject
 
using TemporalRatioType = typename IOBaseType::TemporalRatioType
 
using VideoStreamPointer = typename VideoStreamType::Pointer
 
using VideoStreamType = TInputVideoStream
 
- 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
 
void FinishWriting ()
 
virtual const char * GetNameOfClass () const
 
void SetVideoIO (IOBasePointer videoIO)
 
void Update () override
 
void UpdateLargestPossibleRegion () override
 
void Write ()
 
virtual void SetFileName (const char *_arg)
 
virtual const char * GetFileName () const
 
virtual void SetFramesPerSecond (TemporalRatioType _arg)
 
virtual TemporalRatioType GetFramesPerSecond ()
 
virtual void SetFourCC (const char *_arg)
 
virtual const char * GetFourCC () const
 
virtual void SetOutputTemporalRegion (TemporalRegion _arg)
 
virtual TemporalRegion GetOutputTemporalRegion ()
 
void SetInput (const VideoStreamType *input)
 
const VideoStreamTypeGetInput ()
 
- 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 ()
 
MultiThreaderTypeGetMultiThreader () const
 
DataObjectPointerArraySizeType GetNumberOfIndexedInputs () const
 
DataObjectPointerArraySizeType GetNumberOfIndexedOutputs () const
 
DataObjectPointerArraySizeType GetNumberOfInputs () const
 
DataObjectPointerArraySizeType GetNumberOfOutputs () const
 
virtual
DataObjectPointerArraySizeType 
GetNumberOfValidRequiredInputs () const
 
NameArray GetOutputNames () const
 
DataObjectPointerArray GetOutputs ()
 
virtual const float & GetProgress () const
 
NameArray GetRequiredInputNames () const
 
bool HasInput (const DataObjectIdentifierType &key) const
 
bool HasOutput (const DataObjectIdentifierType &key) const
 
virtual DataObjectPointer MakeOutput (DataObjectPointerArraySizeType idx)
 
virtual DataObjectPointer MakeOutput (const DataObjectIdentifierType &)
 
virtual void PrepareOutputs ()
 
virtual void PropagateRequestedRegion (DataObject *output)
 
virtual void ResetPipeline ()
 
virtual void SetAbortGenerateData (bool _arg)
 
void SetMultiThreader (MultiThreaderType *threader)
 
void UpdateProgress (float progress)
 
virtual void SetReleaseDataFlag (bool flag)
 
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
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) 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 noexceptoverride
 
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
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

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 flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Protected Member Functions

bool InitializeOutputParameters ()
 
bool InitializeVideoIO ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void TemporalStreamingGenerateData () override
 
 VideoFileWriter ()
 
 ~VideoFileWriter () override
 
- 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 void GenerateOutputRequestedTemporalRegion (TemporalDataObject *output)
 
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
< TemporalRegion
SplitRequestedTemporalRegion ()
 
 TemporalProcessObject ()
 
 ~TemporalProcessObject () override=default
 
- Protected Member Functions inherited from itk::ProcessObject
virtual void AddInput (DataObject *input)
 
void AddOptionalInputName (const DataObjectIdentifierType &)
 
void AddOptionalInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx)
 
virtual void AddOutput (DataObject *output)
 
bool AddRequiredInputName (const DataObjectIdentifierType &)
 
bool AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx)
 
virtual void CacheInputReleaseDataFlags ()
 
virtual void GenerateOutputInformation ()
 
DataObjectGetInput (const DataObjectIdentifierType &key)
 
const DataObjectGetInput (const DataObjectIdentifierType &key) const
 
virtual const
DataObjectPointerArraySizeType
GetNumberOfRequiredInputs () const
 
virtual const
DataObjectPointerArraySizeType
GetNumberOfRequiredOutputs () const
 
bool IsIndexedInputName (const DataObjectIdentifierType &) const
 
bool IsIndexedOutputName (const DataObjectIdentifierType &) const
 
bool IsRequiredInputName (const DataObjectIdentifierType &) const
 
DataObjectPointerArraySizeType MakeIndexFromInputName (const DataObjectIdentifierType &name) const
 
DataObjectPointerArraySizeType MakeIndexFromOutputName (const DataObjectIdentifierType &name) const
 
DataObjectIdentifierType MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const
 
DataObjectIdentifierType MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const
 
virtual void PopBackInput ()
 
virtual void PopFrontInput ()
 
 ProcessObject ()
 
virtual void PropagateResetPipeline ()
 
virtual void PushBackInput (const DataObject *input)
 
virtual void PushFrontInput (const DataObject *input)
 
virtual void ReleaseInputs ()
 
virtual void RemoveInput (const DataObjectIdentifierType &key)
 
virtual void RemoveInput (DataObjectPointerArraySizeType)
 
virtual void RemoveOutput (const DataObjectIdentifierType &key)
 
virtual void RemoveOutput (DataObjectPointerArraySizeType idx)
 
bool RemoveRequiredInputName (const DataObjectIdentifierType &)
 
virtual void RestoreInputReleaseDataFlags ()
 
virtual void SetInput (const DataObjectIdentifierType &key, DataObject *input)
 
virtual void SetNthInput (DataObjectPointerArraySizeType num, DataObject *input)
 
virtual void SetNthOutput (DataObjectPointerArraySizeType num, DataObject *output)
 
void SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num)
 
void SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num)
 
virtual void SetNumberOfRequiredInputs (DataObjectPointerArraySizeType)
 
virtual void SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg)
 
virtual void SetOutput (const DataObjectIdentifierType &key, DataObject *output)
 
virtual void SetPrimaryInput (DataObject *input)
 
virtual void SetPrimaryOutput (DataObject *output)
 
void SetRequiredInputNames (const NameArray &)
 
virtual void VerifyInputInformation () ITKv5_CONST
 
virtual void VerifyPreconditions () ITKv5_CONST
 
 ~ProcessObject () override
 
DataObjectGetInput (DataObjectPointerArraySizeType idx)
 
const DataObjectGetInput (DataObjectPointerArraySizeType idx) const
 
DataObjectGetPrimaryInput ()
 
const DataObjectGetPrimaryInput () const
 
virtual void SetPrimaryInputName (const DataObjectIdentifierType &key)
 
virtual const char * GetPrimaryInputName () const
 
DataObjectGetOutput (const DataObjectIdentifierType &key)
 
const DataObjectGetOutput (const DataObjectIdentifierType &key) const
 
virtual void SetPrimaryOutputName (const DataObjectIdentifierType &key)
 
virtual const char * GetPrimaryOutputName () const
 
DataObjectGetOutput (DataObjectPointerArraySizeType idx)
 
const DataObjectGetOutput (DataObjectPointerArraySizeType idx) const
 
DataObjectGetPrimaryOutput ()
 
const DataObjectGetPrimaryOutput () const
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
 ~Object () override
 
- 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 ()
 

Private Attributes

ImageIOBase::IOComponentType m_ComponentType
 
std::vector< SizeValueTypem_Dimensions
 
std::string m_FileName
 
std::string m_FourCC
 
TemporalRatioType m_FramesPerSecond {24}
 
SizeValueType m_NumberOfComponents {0}
 
TemporalRegion m_OutputTemporalRegion
 
IOBasePointer m_VideoIO
 

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
TimeStamp m_OutputInformationMTime
 
bool m_Updating
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Member Typedef Documentation

template<typename TInputVideoStream >
using itk::VideoFileWriter< TInputVideoStream >::FrameType = typename VideoStreamType::FrameType

Definition at line 56 of file itkVideoFileWriter.h.

template<typename TInputVideoStream >
using itk::VideoFileWriter< TInputVideoStream >::IOBasePointer = typename VideoIOBase::Pointer

Definition at line 50 of file itkVideoFileWriter.h.

template<typename TInputVideoStream >
using itk::VideoFileWriter< TInputVideoStream >::IOBaseType = VideoIOBase

Definition at line 49 of file itkVideoFileWriter.h.

template<typename TInputVideoStream >
using itk::VideoFileWriter< TInputVideoStream >::PixelType = typename FrameType::PixelType

Definition at line 57 of file itkVideoFileWriter.h.

template<typename TInputVideoStream >
using itk::VideoFileWriter< TInputVideoStream >::Pointer = SmartPointer<Self>

Definition at line 47 of file itkVideoFileWriter.h.

template<typename TInputVideoStream >
using itk::VideoFileWriter< TInputVideoStream >::Self = VideoFileWriter< TInputVideoStream>

Standard class type aliases.

Definition at line 45 of file itkVideoFileWriter.h.

template<typename TInputVideoStream >
using itk::VideoFileWriter< TInputVideoStream >::SizeValueType = typename IOBaseType::SizeValueType

Definition at line 51 of file itkVideoFileWriter.h.

template<typename TInputVideoStream >
using itk::VideoFileWriter< TInputVideoStream >::Superclass = TemporalProcessObject

Definition at line 46 of file itkVideoFileWriter.h.

template<typename TInputVideoStream >
using itk::VideoFileWriter< TInputVideoStream >::TemporalRatioType = typename IOBaseType::TemporalRatioType

Definition at line 52 of file itkVideoFileWriter.h.

template<typename TInputVideoStream >
using itk::VideoFileWriter< TInputVideoStream >::VideoStreamPointer = typename VideoStreamType::Pointer

Definition at line 55 of file itkVideoFileWriter.h.

template<typename TInputVideoStream >
using itk::VideoFileWriter< TInputVideoStream >::VideoStreamType = TInputVideoStream

Definition at line 54 of file itkVideoFileWriter.h.

Constructor & Destructor Documentation

template<typename TInputVideoStream >
itk::VideoFileWriter< TInputVideoStream >::VideoFileWriter ( )
protected
template<typename TInputVideoStream >
itk::VideoFileWriter< TInputVideoStream >::~VideoFileWriter ( )
overrideprotected

Member Function Documentation

template<typename TInputVideoStream >
virtual::itk::LightObject::Pointer itk::VideoFileWriter< TInputVideoStream >::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.

template<typename TInputVideoStream >
void itk::VideoFileWriter< TInputVideoStream >::FinishWriting ( )

Finish writing the video and close the file

template<typename TInputVideoStream >
virtual const char* itk::VideoFileWriter< TInputVideoStream >::GetFileName ( ) const
virtual

Specify the file to read. This is forwarded to the IO instance.

template<typename TInputVideoStream >
virtual const char* itk::VideoFileWriter< TInputVideoStream >::GetFourCC ( ) const
virtual

Specify the FourCC to use for video encoding. FourCC, or four character code, is commonly used to denote the codec to be used to encode video by many libraries. See http://en.wikipedia.org/wiki/FourCC for more information.

template<typename TInputVideoStream >
virtual TemporalRatioType itk::VideoFileWriter< TInputVideoStream >::GetFramesPerSecond ( )
virtual

Specify the output FpS.

template<typename TInputVideoStream >
const VideoStreamType* itk::VideoFileWriter< TInputVideoStream >::GetInput ( )
template<typename TInputVideoStream >
virtual const char* itk::VideoFileWriter< TInputVideoStream >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::TemporalProcessObject.

template<typename TInputVideoStream >
virtual TemporalRegion itk::VideoFileWriter< TInputVideoStream >::GetOutputTemporalRegion ( )
virtual

Get/Set the OutputTemporalRegion

template<typename TInputVideoStream >
bool itk::VideoFileWriter< TInputVideoStream >::InitializeOutputParameters ( )
protected

Initialize output parameters.

template<typename TInputVideoStream >
bool itk::VideoFileWriter< TInputVideoStream >::InitializeVideoIO ( )
protected

Set up the VideoIO using VideoIOFactory. Returns true if successful, false otherwise. Warning: this will overwrite any currently set VideoIO

template<typename TInputVideoStream >
static Pointer itk::VideoFileWriter< TInputVideoStream >::New ( )
static

Method for creation through the object factory.

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

ITK print mechanism

Reimplemented from itk::TemporalProcessObject.

template<typename TInputVideoStream >
virtual void itk::VideoFileWriter< TInputVideoStream >::SetFileName ( const char *  _arg)
virtual

Specify the file to read. This is forwarded to the IO instance.

template<typename TInputVideoStream >
virtual void itk::VideoFileWriter< TInputVideoStream >::SetFourCC ( const char *  _arg)
virtual

Specify the FourCC to use for video encoding. FourCC, or four character code, is commonly used to denote the codec to be used to encode video by many libraries. See http://en.wikipedia.org/wiki/FourCC for more information.

template<typename TInputVideoStream >
virtual void itk::VideoFileWriter< TInputVideoStream >::SetFramesPerSecond ( TemporalRatioType  _arg)
virtual

Specify the output FpS.

template<typename TInputVideoStream >
void itk::VideoFileWriter< TInputVideoStream >::SetInput ( const VideoStreamType input)
template<typename TInputVideoStream >
virtual void itk::VideoFileWriter< TInputVideoStream >::SetOutputTemporalRegion ( TemporalRegion  _arg)
virtual

Get/Set the OutputTemporalRegion

template<typename TInputVideoStream >
void itk::VideoFileWriter< TInputVideoStream >::SetVideoIO ( IOBasePointer  videoIO)

Manually set the VideoIO to use

template<typename TInputVideoStream >
void itk::VideoFileWriter< TInputVideoStream >::TemporalStreamingGenerateData ( )
overrideprotectedvirtual

Override TemporalStreamingGenerateData to do the actual writing.

Reimplemented from itk::TemporalProcessObject.

template<typename TInputVideoStream >
void itk::VideoFileWriter< TInputVideoStream >::Update ( )
overridevirtual

Aliased to the Write() method to be consistent with the rest of the pipeline.

Reimplemented from itk::ProcessObject.

template<typename TInputVideoStream >
void itk::VideoFileWriter< TInputVideoStream >::UpdateLargestPossibleRegion ( )
overridevirtual

Write the entire video to a file, if possible. This is the same as calling write or update without setting an output temporal region.

Reimplemented from itk::ProcessObject.

template<typename TInputVideoStream >
void itk::VideoFileWriter< TInputVideoStream >::Write ( )

Write the requested temporal region to a file. If no OutputTemporalRegion has been set, the largest possible temporal region of the input will be used.

Member Data Documentation

template<typename TInputVideoStream >
ImageIOBase::IOComponentType itk::VideoFileWriter< TInputVideoStream >::m_ComponentType
private

Definition at line 146 of file itkVideoFileWriter.h.

template<typename TInputVideoStream >
std::vector<SizeValueType> itk::VideoFileWriter< TInputVideoStream >::m_Dimensions
private

Definition at line 144 of file itkVideoFileWriter.h.

template<typename TInputVideoStream >
std::string itk::VideoFileWriter< TInputVideoStream >::m_FileName
private

The file to write.

Definition at line 133 of file itkVideoFileWriter.h.

template<typename TInputVideoStream >
std::string itk::VideoFileWriter< TInputVideoStream >::m_FourCC
private

Definition at line 143 of file itkVideoFileWriter.h.

template<typename TInputVideoStream >
TemporalRatioType itk::VideoFileWriter< TInputVideoStream >::m_FramesPerSecond {24}
private

Parameters for writing.

Definition at line 142 of file itkVideoFileWriter.h.

template<typename TInputVideoStream >
SizeValueType itk::VideoFileWriter< TInputVideoStream >::m_NumberOfComponents {0}
private

Definition at line 145 of file itkVideoFileWriter.h.

template<typename TInputVideoStream >
TemporalRegion itk::VideoFileWriter< TInputVideoStream >::m_OutputTemporalRegion
private

TemporalRegion to write out.

Definition at line 139 of file itkVideoFileWriter.h.

template<typename TInputVideoStream >
IOBasePointer itk::VideoFileWriter< TInputVideoStream >::m_VideoIO
private

The VideoIO used for writing.

Definition at line 136 of file itkVideoFileWriter.h.


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