18#ifndef itkVideoStream_h
19#define itkVideoStream_h
41template <
typename TFrameType>
57 using typename Superclass::BufferType;
76 static constexpr unsigned int FrameDimension = FrameType::ImageDimension;
80 return FrameType::ImageDimension;
105 return reinterpret_cast<BufferType *
>(m_DataObjectBuffer.GetPointer());
110 return reinterpret_cast<BufferType *
>(m_DataObjectBuffer.GetPointer());
122 return m_LargestPossibleSpatialRegionCache;
127 m_LargestPossibleSpatialRegionCache = map;
131 const SpatialRegionMapType &
134 return m_RequestedSpatialRegionCache;
139 m_RequestedSpatialRegionCache = map;
142 const SpatialRegionMapType &
145 return m_BufferedSpatialRegionCache;
150 m_BufferedSpatialRegionCache = map;
153 const SpacingMapType &
156 return m_SpacingCache;
161 m_SpacingCache = map;
167 return m_OriginCache;
175 const DirectionMapType &
178 return m_DirectionCache;
183 m_DirectionCache = map;
186 const NumberOfComponentsPerPixelMapType &
189 return m_NumberOfComponentsPerPixelCache;
194 m_NumberOfComponentsPerPixelCache = map;
318 video->InitializeEmptyFrames();
327 bufferedSpatialRegion.SetSize( size );
328 bufferedSpatialRegion.SetIndex( start );
329 video->SetAllBufferedSpatialRegions( bufferedSpatialRegion );
352 Superclass::Print(os, indent);
373#ifndef ITK_MANUAL_INSTANTIATION
374# include "itkVideoStream.hxx"
Base class for all data objects in ITK.
Control indentation during Print() invocation.
Base class for most ITK classes.
Templated ring buffer for holding anything.
DataObject subclass with knowledge of temporal region.
A DataObject that holds a buffered portion of a video.
const SpacingMapType & GetSpacingCache() const
void GetNumberOfComponentsPerPixelCache(NumberOfComponentsPerPixelMapType map)
BufferType * GetFrameBuffer()
void PrintSelf(std::ostream &os, Indent indent) const override
void SetFrameLargestPossibleSpatialRegion(SizeValueType frameNumber, SpatialRegionType region)
void SetAllBufferedSpatialRegions(SpatialRegionType region)
const DirectionType & GetFrameDirection(SizeValueType frameNumber) const
void SetAllRequestedSpatialRegions(SpatialRegionType region)
void SetFrameRequestedSpatialRegion(SizeValueType frameNumber, SpatialRegionType region)
typename FrameType::RegionType SpatialRegionType
typename std::map< SizeValueType, NumberOfComponentsPerPixelType > NumberOfComponentsPerPixelMapType
void SetSpacingCache(SpacingMapType map)
~VideoStream() override=default
typename FrameType::Pointer FramePointer
const BufferType * GetFrameBuffer() const
void SetAllFramesDirection(DirectionType direction)
void SetAllLargestPossibleSpatialRegions(SpatialRegionType region)
const SpatialRegionType & GetFrameRequestedSpatialRegion(SizeValueType frameNumber) const
typename std::map< SizeValueType, DirectionType > DirectionMapType
typename std::map< SizeValueType, SpacingType > SpacingMapType
typename FrameType::PixelType PixelType
void InitializeEmptyFrames()
const SpatialRegionType & GetFrameBufferedSpatialRegion(SizeValueType frameNumber) const
const DirectionMapType & GetDirectionCache() const
void SetMinimumBufferSize(SizeValueType minimumNumberOfFrames)
const NumberOfComponentsPerPixelMapType & GetNumberOfComponentsPerPixelCache() const
void SetBufferedSpatialRegionCache(SpatialRegionMapType map)
const SpatialRegionType & GetFrameLargestPossibleSpatialRegion(SizeValueType frameNumber) const
const PointType & GetFrameOrigin(SizeValueType frameNumber) const
void SetDirectionCache(DirectionMapType map)
FrameType * GetFrame(SizeValueType frameNumber)
void SetFrameBufferedSpatialRegion(SizeValueType frameNumber, SpatialRegionType region)
typename FrameType::IndexType IndexType
typename FrameType::DirectionType DirectionType
void SetFrameBuffer(BufferType *buffer)
const FrameType * GetFrame(SizeValueType frameNumber) const
typename FrameType::SpacingType SpacingType
typename FrameType::PointType PointType
void SetOriginCache(PointMapType map)
void Graft(const DataObject *data) override
const PointMapType & GetOriginCache() const
typename std::map< SizeValueType, PointType > PointMapType
const NumberOfComponentsPerPixelType & GetFrameNumberOfComponentsPerPixel(SizeValueType frameNumber) const
unsigned int NumberOfComponentsPerPixelType
void SetAllFramesSpacing(SpacingType spacing)
typename std::map< SizeValueType, SpatialRegionType > SpatialRegionMapType
void SetLargestPossibleSpatialRegionCache(SpatialRegionMapType map)
void SetFrameOrigin(SizeValueType frameNumber, PointType origin)
const SpatialRegionMapType & GetRequestedSpatialRegionCache() const
void SetAllFramesNumberOfComponentsPerPixel(NumberOfComponentsPerPixelType n)
typename FrameType::ConstPointer FrameConstPointer
void SetAllFramesOrigin(PointType origin)
void SetRequestedSpatialRegionCache(SpatialRegionMapType map)
typename FrameType::SizeType SizeType
static unsigned int GetFrameDimension()
void SetFrame(SizeValueType frameNumber, FramePointer frame)
const SpatialRegionMapType & GetBufferedSpatialRegionCache() const
void SetFrameSpacing(SizeValueType frameNumber, SpacingType spacing)
const SpatialRegionMapType & GetLargestPossibleSpatialRegionCache() const
const SpacingType & GetFrameSpacing(SizeValueType frameNumber) const
void SetFrameDirection(SizeValueType frameNumber, DirectionType direction)
void SetFrameNumberOfComponentsPerPixel(SizeValueType frameNumber, unsigned int n)
Implements a weak reference to an object.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
ImageBaseType::DirectionType DirectionType
ImageBaseType::RegionType RegionType
ImageBaseType::IndexType IndexType
ImageBaseType::PointType PointType
ImageBaseType::SizeType SizeType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
class ITK_FORWARD_EXPORT TemporalDataObject
unsigned long SizeValueType
void Fill(IndexValueType value)