Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkStreamingVolumeCodec Class Referenceabstract

VTK object for representing a volume compression codec (normally a video compression codec) More...

#include <Libs/vtkAddon/vtkStreamingVolumeCodec.h>

Inheritance diagram for vtkStreamingVolumeCodec:
Inheritance graph
[legend]
Collaboration diagram for vtkStreamingVolumeCodec:
Collaboration graph
[legend]

Classes

struct  ParameterPreset
 

Public Types

enum  { ParameterModifiedEvent = 18003 }
 
typedef vtkObject Superclass
 

Public Member Functions

virtual vtkStreamingVolumeCodecCreateCodecInstance ()=0
 Creates an instance of the codec. More...
 
virtual bool DecodeFrame (vtkStreamingVolumeFrame *frame, vtkImageData *outputImageData)
 
virtual bool EncodeImageData (vtkImageData *inputImageData, vtkStreamingVolumeFrame *outputStreamingFrame, bool forceKeyFrame=false)
 
virtual const char * GetClassName ()
 
virtual std::string GetDefaultParameterPresetValue ()
 
virtual std::string GetFourCC ()=0
 
int GetNumberOfParameterPresets () const
 Get the number of parameter presets. More...
 
virtual bool GetParameter (std::string parameterName, std::string &parameterValue)
 
virtual std::string GetParameterDescription (std::string parameterName)=0
 
std::string GetParameterPresetName (const std::string &presetValue) const
 
std::vector< std::string > GetParameterPresetNames () const
 Returns a list of the human readable names of the supported parameter presets. More...
 
std::string GetParameterPresetValue (const std::string &presetName) const
 
virtual std::string GetParametersAsString ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
virtual bool SetParameter (std::string parameterName, std::string parameterValue)
 
virtual void SetParameters (std::map< std::string, std::string > parameters)
 
virtual bool SetParametersFromPresetValue (const std::string &presetValue)
 
virtual void SetParametersFromString (std::string parameterString)
 
 vtkGetStdVectorMacro (AvailiableParameterNames, std::vector< std::string >)
 Returns a list of availiable parameter names for the codec. More...
 
 vtkGetStdVectorMacro (ParameterPresets, const std::vector< ParameterPreset >)
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkStreamingVolumeCodecSafeDownCast (vtkObject *o)
 

Protected Member Functions

virtual bool DecodeFrameInternal (vtkStreamingVolumeFrame *inputFrame, vtkImageData *outputImageData, bool saveDecodedImage=true)=0
 
virtual bool EncodeImageDataInternal (vtkImageData *inputImageData, vtkStreamingVolumeFrame *outputFrame, bool forceKeyFrame)=0
 
virtual bool UpdateParameterInternal (std::string parameterName, std::string parameterValue)=0
 
 vtkStreamingVolumeCodec ()
 
 ~vtkStreamingVolumeCodec () override
 

Protected Attributes

std::vector< std::string > AvailiableParameterNames
 
std::string DefaultParameterPresetValue
 
vtkSmartPointer< vtkStreamingVolumeFrameLastDecodedFrame
 
std::vector< ParameterPresetParameterPresets
 
std::map< std::string, std::string > Parameters
 

Detailed Description

VTK object for representing a volume compression codec (normally a video compression codec)

Definition at line 47 of file vtkStreamingVolumeCodec.h.

Member Typedef Documentation

◆ Superclass

Definition at line 50 of file vtkStreamingVolumeCodec.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ParameterModifiedEvent 

Event invoked when a codec parameter is changed.

Definition at line 85 of file vtkStreamingVolumeCodec.h.

Constructor & Destructor Documentation

◆ vtkStreamingVolumeCodec()

vtkStreamingVolumeCodec::vtkStreamingVolumeCodec ( )
protected

◆ ~vtkStreamingVolumeCodec()

vtkStreamingVolumeCodec::~vtkStreamingVolumeCodec ( )
overrideprotected

Member Function Documentation

◆ CreateCodecInstance()

virtual vtkStreamingVolumeCodec* vtkStreamingVolumeCodec::CreateCodecInstance ( )
pure virtual

Creates an instance of the codec.

Implemented in vtkRawRGBVolumeCodec.

◆ DecodeFrame()

virtual bool vtkStreamingVolumeCodec::DecodeFrame ( vtkStreamingVolumeFrame frame,
vtkImageData *  outputImageData 
)
virtual

Decode compressed frame data and stores it in the imagedata Handles the decoding of additional previous frames if required

Parameters
frameInput frame containing the compressed frame data
outputImageDataOutput image which will store the uncompressed image Returns true if the frame is decoded successfully

◆ DecodeFrameInternal()

virtual bool vtkStreamingVolumeCodec::DecodeFrameInternal ( vtkStreamingVolumeFrame inputFrame,
vtkImageData *  outputImageData,
bool  saveDecodedImage = true 
)
protectedpure virtual

Decode a frame and store its contents in a vtkImageData This function performs the actual decoding for a single frame and should be implemented in all non abstract subclasses

Parameters
inputFameFrame object containing the compressed data to be decoded
outputImageDataImage data object that will be used to store the output image
saveDecodedImageIf true, writes the decoded image to the frame. If false, the decoded results are discarded Returns true if the frame is decoded successfully

Implemented in vtkRawRGBVolumeCodec.

◆ EncodeImageData()

virtual bool vtkStreamingVolumeCodec::EncodeImageData ( vtkImageData *  inputImageData,
vtkStreamingVolumeFrame outputStreamingFrame,
bool  forceKeyFrame = false 
)
virtual

Encode the image data and store it in the frame

Parameters
inputImageDataInput image containing the uncompressed image
outputStreamingFrameOutput frame that will be used to store the compressed frame
forceKeyFrameIf the codec supports it, attempt to encode the image as a keyframe Returns true if the image is encoded successfully

◆ EncodeImageDataInternal()

virtual bool vtkStreamingVolumeCodec::EncodeImageDataInternal ( vtkImageData *  inputImageData,
vtkStreamingVolumeFrame outputFrame,
bool  forceKeyFrame 
)
protectedpure virtual

Decode a vtkImageData and store its contents in a frame This function performs the actual encoding for a single frame and should be implemented in all non abstract subclasses

Parameters
inputImageDataImage data object containing the uncompressed data to be encoded
outputFrameFrame object that will be used to store the compressed data
forceKeyFrameWhen true, attempt to encode the image as a keyframe if the codec supports it Returns true if the image is encoded successfully

Implemented in vtkRawRGBVolumeCodec.

◆ GetClassName()

virtual const char* vtkStreamingVolumeCodec::GetClassName ( )
virtual

Reimplemented in vtkRawRGBVolumeCodec.

◆ GetDefaultParameterPresetValue()

virtual std::string vtkStreamingVolumeCodec::GetDefaultParameterPresetValue ( )
virtual

Get the default preset parameter value The human readable name of the parameter can be retreived using GetParameterPresetName()

See also
GetParameterPresetName()

◆ GetFourCC()

virtual std::string vtkStreamingVolumeCodec::GetFourCC ( )
pure virtual

Returns the FourCC code representing the codec See https://www.fourcc.org/codecs.php for an incomplete list

Implemented in vtkRawRGBVolumeCodec.

◆ GetNumberOfParameterPresets()

int vtkStreamingVolumeCodec::GetNumberOfParameterPresets ( ) const
inline

Get the number of parameter presets.

Definition at line 128 of file vtkStreamingVolumeCodec.h.

◆ GetParameter()

virtual bool vtkStreamingVolumeCodec::GetParameter ( std::string  parameterName,
std::string &  parameterValue 
)
virtual

Get a parameter for the codec

Parameters
parameterNameString containing the name of the parameter
parameterValueValue of the specified parameter Returns true if the parameter was found

◆ GetParameterDescription()

virtual std::string vtkStreamingVolumeCodec::GetParameterDescription ( std::string  parameterName)
pure virtual

Get parameter description as a string

Parameters
parameterNameString containing the name of the parameter Returns the description of the parameter as a string, and returns an empty string if the parameter name is invalid

◆ GetParameterPresetName()

std::string vtkStreamingVolumeCodec::GetParameterPresetName ( const std::string &  presetValue) const

Get the human readable preset name given the parameter value string

Parameters
presetValueString representing the preset value Returns the human readable name of the preset value

◆ GetParameterPresetNames()

std::vector<std::string> vtkStreamingVolumeCodec::GetParameterPresetNames ( ) const

Returns a list of the human readable names of the supported parameter presets.

◆ GetParameterPresetValue()

std::string vtkStreamingVolumeCodec::GetParameterPresetValue ( const std::string &  presetName) const

Get the string representing the preset value given the name of the parameter

Parameters
presetNameString containing the name of the preset Returns a string representing the preset value

◆ GetParametersAsString()

virtual std::string vtkStreamingVolumeCodec::GetParametersAsString ( )
virtual

Write this codec's information to a string representation Format is "ParameterName1:ParameterValue1;ParameterName2;ParameterValue2;ParameterNameN:ParameterValueN"

See also
SetParametersFromString()

◆ IsA()

virtual int vtkStreamingVolumeCodec::IsA ( const char *  type)
virtual

Reimplemented in vtkRawRGBVolumeCodec.

◆ IsTypeOf()

static int vtkStreamingVolumeCodec::IsTypeOf ( const char *  type)
static

◆ PrintSelf()

void vtkStreamingVolumeCodec::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
override

◆ SafeDownCast()

static vtkStreamingVolumeCodec* vtkStreamingVolumeCodec::SafeDownCast ( vtkObject *  o)
static

◆ SetParameter()

virtual bool vtkStreamingVolumeCodec::SetParameter ( std::string  parameterName,
std::string  parameterValue 
)
virtual

Set a parameter for the codec

Parameters
parameterNameString containing the name of the parameter
parameterValueValue of the specified parameter Returns true if the parameter is successfully set

◆ SetParameters()

virtual void vtkStreamingVolumeCodec::SetParameters ( std::map< std::string, std::string >  parameters)
virtual

Sets all of the specified parameters in the codec

Parameters
parametersMap containing the parameters and values to be set

◆ SetParametersFromPresetValue()

virtual bool vtkStreamingVolumeCodec::SetParametersFromPresetValue ( const std::string &  presetValue)
virtual

Set the current parameters of the codec based on the specified preset value. The method must be overridden in child classes that support presets.

Parameters
presetValueString representing the preset value Returns true on success.

◆ SetParametersFromString()

virtual void vtkStreamingVolumeCodec::SetParametersFromString ( std::string  parameterString)
virtual

Read this codec's information from a string representation Format is "ParameterName1:ParameterValue1;ParameterName2;ParameterValue2;ParameterNameN:ParameterValueN"

See also
GetParametersAsString()

◆ UpdateParameterInternal()

virtual bool vtkStreamingVolumeCodec::UpdateParameterInternal ( std::string  parameterName,
std::string  parameterValue 
)
protectedpure virtual

Updates parameter values for the codec

Parameters
parameterNameString containing the name of the parameter
parameterValueValue of the specified parameter Returns true if the parameter was found and updated successfully

◆ vtkGetStdVectorMacro() [1/2]

vtkStreamingVolumeCodec::vtkGetStdVectorMacro ( AvailiableParameterNames  ,
std::vector< std::string >   
)

Returns a list of availiable parameter names for the codec.

◆ vtkGetStdVectorMacro() [2/2]

vtkStreamingVolumeCodec::vtkGetStdVectorMacro ( ParameterPresets  ,
const std::vector< ParameterPreset  
)

Member Data Documentation

◆ AvailiableParameterNames

std::vector<std::string> vtkStreamingVolumeCodec::AvailiableParameterNames
protected

Definition at line 186 of file vtkStreamingVolumeCodec.h.

◆ DefaultParameterPresetValue

std::string vtkStreamingVolumeCodec::DefaultParameterPresetValue
protected

Definition at line 190 of file vtkStreamingVolumeCodec.h.

◆ LastDecodedFrame

vtkSmartPointer<vtkStreamingVolumeFrame> vtkStreamingVolumeCodec::LastDecodedFrame
protected

Definition at line 187 of file vtkStreamingVolumeCodec.h.

◆ ParameterPresets

std::vector<ParameterPreset> vtkStreamingVolumeCodec::ParameterPresets
protected

Definition at line 189 of file vtkStreamingVolumeCodec.h.

◆ Parameters

std::map<std::string, std::string> vtkStreamingVolumeCodec::Parameters
protected

Definition at line 188 of file vtkStreamingVolumeCodec.h.


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