iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nrt::FrameRange Struct Reference

#include <nrt/Core/Image/FrameRange.H>

A simple struct to hold a range of frames indicating the bounds of a movie.

Definition at line 46 of file FrameRange.H.

Public Types

enum  RangeBound { Max }
 

Public Member Functions

 FrameRange ()
 Create a FrameRange with first=0, step=1, last=max of size_t.
 
 FrameRange (size_t first, size_t last)
 
 FrameRange (size_t first, size_t step, size_t last)
 
 FrameRange (size_t first, RangeBound last)
 
 FrameRange (size_t first, size_t step, RangeBound last)
 
bool const contains (size_t framenumber) const
 Determine whether this framerange contains the given frame number.
 
FrameRange const intersection (FrameRange const &other) const
 Returns the intersection of this FrameRange and another. More...
 

Public Attributes

size_t first
 The first frame number.
 
size_t step
 The number of frames to skip.
 
size_t last
 The last frame number.
 

Friends

class cereal::access
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &out, nrt::FrameRange const &range)
 Output a FrameRange to stream. More...
 
std::istream & operator>> (std::istream &stream, nrt::FrameRange &range)
 Input a FrameRange from stream. More...
 

Member Function Documentation

FrameRange const nrt::FrameRange::intersection ( FrameRange const &  other) const

Returns the intersection of this FrameRange and another.

The returned FrameRange will have a step that is the maximum of this step and other's step.

Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  out,
nrt::FrameRange const &  range 
)
related

Output a FrameRange to stream.

std::istream & operator>> ( std::istream &  stream,
nrt::FrameRange range 
)
related

Input a FrameRange from stream.


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