Defines | Functions

libi4d/ofTimelapseImage.cc File Reference

#include <math.h>
#include <i3d/image3d.h>
#include "ofTimelapseImage.h"

Defines

#define DEBUG

Functions

template<class VOXEL >
int Move2DFrames (Image3d< VOXEL > &seq, const int from, const int offset)
template<class VOXEL >
int Insert2DFrame (Image3d< VOXEL > const &frame, Image3d< VOXEL > &seq, const int time, const char action, const int count)
template<class VOXEL >
int Copy2DFrame (Image3d< VOXEL > const &seq, Image3d< VOXEL > &frame, const int time)
template<class VOXEL >
int Remove2DFrame (Image3d< VOXEL > &seq, const int time, const int count)
template<class VOXEL >
int ReadSequence (i3d::Image3d< VOXEL > &seq, const char *NamePrefix, const int Width, const char *NameSuffix, const int StartIndex, const int StopIndex)
template<class VOXEL >
int SaveSequence (i3d::Image3d< VOXEL > const &seq, const char *NamePrefix, const int Width, const char *NameSuffix, const int StartIndex, const int StopIndex)
template<class VIN , class VOUT >
void FloatToGray (const Image4d< VIN > &fimg, Image4d< VOUT > &gimg)
template<class VIN , class VOUT >
void FloatToGrayNoWeight (const Image4d< VIN > &fimg, Image4d< VOUT > &gimg)
template<class VIN , class VOUT >
void GrayToFloat (const Image4d< VIN > &gimg, Image4d< VOUT > &fimg)
template<class VOXEL >
int Insert3DFrame (Image3d< VOXEL > const &frame, Image4d< VOXEL > &seq, const int time, const char action, const int count)
template<class VOXEL >
int Copy3DFrame (Image4d< VOXEL > const &seq, Image3d< VOXEL > &frame, const int time)
template<class VOXEL >
int Remove3DFrame (Image4d< VOXEL > &seq, const int time, const int count)
template<class VOXEL >
void PutPixel (Image3d< VOXEL > &img, const float x, const float y, const float z, const VOXEL voxel, const char overwrite=0)
template<class VOXEL >
void PutPixelNN (Image3d< VOXEL > &img, const float x, const float y, const float z, const VOXEL voxel, const char overwrite=0)
template<class VOXEL >
int InsertGroupOfLines (Image3d< VOXEL > &seq, const float vx, const float vy, const int delta_t, const float gx, const float gy, const int gt, const float lx, const float ly, const float spacing, const int number, const VOXEL color)
template int Insert2DFrame (Image3d< GRAY8 > const &, Image3d< GRAY8 > &, const int, const char, const int)
template int Insert2DFrame (Image3d< GRAY16 > const &, Image3d< GRAY16 > &, const int, const char, const int)
template int Insert2DFrame (Image3d< float > const &, Image3d< float > &, const int, const char, const int)
template int Insert2DFrame (Image3d< double > const &, Image3d< double > &, const int, const char, const int)
template int Copy2DFrame (Image3d< GRAY8 > const &, Image3d< GRAY8 > &, const int)
template int Copy2DFrame (Image3d< GRAY16 > const &, Image3d< GRAY16 > &, const int)
template int Copy2DFrame (Image3d< float > const &, Image3d< float > &, const int)
template int Copy2DFrame (Image3d< double > const &, Image3d< double > &, const int)
template int Remove2DFrame (Image3d< GRAY8 > &, const int, const int)
template int Remove2DFrame (Image3d< GRAY16 > &, const int, const int)
template int Remove2DFrame (Image3d< float > &, const int, const int)
template int Remove2DFrame (Image3d< double > &, const int, const int)
template int ReadSequence (Image3d< GRAY8 > &, const char *, const int, const char *, const int, const int)
template int ReadSequence (Image3d< GRAY16 > &, const char *, const int, const char *, const int, const int)
template int ReadSequence (Image3d< float > &, const char *, const int, const char *, const int, const int)
template int ReadSequence (Image3d< double > &, const char *, const int, const char *, const int, const int)
template int SaveSequence (Image3d< GRAY8 > const &, const char *, const int, const char *, const int, const int)
template int SaveSequence (Image3d< GRAY16 > const &, const char *, const int, const char *, const int, const int)
template int SaveSequence (Image3d< float > const &, const char *, const int, const char *, const int, const int)
template int SaveSequence (Image3d< double > const &, const char *, const int, const char *, const int, const int)
template int Insert3DFrame (Image3d< GRAY8 > const &, Image4d< GRAY8 > &, const int, const char, const int)
template int Insert3DFrame (Image3d< GRAY16 > const &, Image4d< GRAY16 > &, const int, const char, const int)
template int Insert3DFrame (Image3d< float > const &, Image4d< float > &, const int, const char, const int)
template int Insert3DFrame (Image3d< double > const &, Image4d< double > &, const int, const char, const int)
template int Copy3DFrame (Image4d< GRAY8 > const &, Image3d< GRAY8 > &, const int)
template int Copy3DFrame (Image4d< GRAY16 > const &, Image3d< GRAY16 > &, const int)
template int Copy3DFrame (Image4d< float > const &, Image3d< float > &, const int)
template int Copy3DFrame (Image4d< double > const &, Image3d< double > &, const int)
template int Remove3DFrame (Image4d< GRAY8 > &, const int, const int)
template int Remove3DFrame (Image4d< GRAY16 > &, const int, const int)
template int Remove3DFrame (Image4d< float > &, const int, const int)
template int Remove3DFrame (Image4d< double > &, const int, const int)
template void FloatToGray (const Image4d< float > &fimg, Image4d< GRAY8 > &gimg)
template void FloatToGray (const Image4d< float > &fimg, Image4d< GRAY16 > &gimg)
template void FloatToGray (const Image4d< double > &fimg, Image4d< GRAY8 > &gimg)
template void FloatToGray (const Image4d< double > &fimg, Image4d< GRAY16 > &gimg)
template void FloatToGrayNoWeight (const Image4d< float > &fimg, Image4d< GRAY8 > &gimg)
template void FloatToGrayNoWeight (const Image4d< float > &fimg, Image4d< GRAY16 > &gimg)
template void FloatToGrayNoWeight (const Image4d< double > &fimg, Image4d< GRAY8 > &gimg)
template void FloatToGrayNoWeight (const Image4d< double > &fimg, Image4d< GRAY16 > &gimg)
template void GrayToFloat (const Image4d< GRAY8 > &gimg, Image4d< float > &fimg)
template void GrayToFloat (const Image4d< GRAY16 > &gimg, Image4d< float > &fimg)
template void GrayToFloat (const Image4d< GRAY8 > &gimg, Image4d< double > &fimg)
template void GrayToFloat (const Image4d< GRAY16 > &gimg, Image4d< double > &fimg)
template int InsertGroupOfLines (Image3d< GRAY8 > &seq, const float vx, const float vy, const int delta_t, const float gx, const float gy, const int gt, const float lx, const float ly, const float spacing, const int number, const GRAY8 color)
template int InsertGroupOfLines (Image3d< float > &seq, const float vx, const float vy, const int delta_t, const float gx, const float gy, const int gt, const float lx, const float ly, const float spacing, const int number, const float color)

Define Documentation

#define DEBUG

Function Documentation

template<class VOXEL >
int Move2DFrames ( Image3d< VOXEL > &  seq,
const int  from,
const int  offset 
)

Helper function which requires an "sequence" image seq and its splitting point from.

According to the sign of the last parameter offset, either new frames, initialized to zero, are inserted into the splitting point or a number of existing frames starting at the splitting point onward is removed. The part of the sequence image before the splitting point always remains untouched.

If the value of offset is positive, offset number of xy zeroed slices (frames) are inserted at the frame number from and the seq image is correspondingly enlarged by shifting the portion behind the splitting point. If offset is negative, -offset number of frames starting at from parameter are removed from the seq image which is, consequently, shortened appropriately.

Parameters:
[in,out] seq "sequence image" to be modified
[in] from splitting point
[in] offset number of frames to add or remove

Errors or unacceptable inputs are indicated by non-zero returned value. Zero is returned in the case when everything went well.

Note: The value of from should be from zero up to seg.GetSizeZ()-1. Positive values of parameter offset are not limited whereas there shouldn't be more values to delete than there is actually remaining, i.e. seq.GetSizeZ()-from -1 (at least one frame must always remain in the resulting sequence image).

template int Insert2DFrame ( Image3d< GRAY8 > const &  ,
Image3d< GRAY8 > &  ,
const   int,
const   char,
const   int 
)
template int Insert2DFrame ( Image3d< GRAY16 > const &  ,
Image3d< GRAY16 > &  ,
const   int,
const   char,
const   int 
)
template int Insert2DFrame ( Image3d< float > const &  ,
Image3d< float > &  ,
const   int,
const   char,
const   int 
)
template int Insert2DFrame ( Image3d< double > const &  ,
Image3d< double > &  ,
const   int,
const   char,
const   int 
)
template int Copy2DFrame ( Image3d< GRAY8 > const &  ,
Image3d< GRAY8 > &  ,
const   int 
)
template int Copy2DFrame ( Image3d< GRAY16 > const &  ,
Image3d< GRAY16 > &  ,
const   int 
)
template int Copy2DFrame ( Image3d< float > const &  ,
Image3d< float > &  ,
const   int 
)
template int Copy2DFrame ( Image3d< double > const &  ,
Image3d< double > &  ,
const   int 
)
template int Remove2DFrame ( Image3d< GRAY8 > &  ,
const   int,
const   int 
)
template int Remove2DFrame ( Image3d< GRAY16 > &  ,
const   int,
const   int 
)
template int Remove2DFrame ( Image3d< float > &  ,
const   int,
const   int 
)
template int Remove2DFrame ( Image3d< double > &  ,
const   int,
const   int 
)
template int ReadSequence ( Image3d< GRAY8 > &  ,
const char *  ,
const   int,
const char *  ,
const   int,
const   int 
)
template int ReadSequence ( Image3d< GRAY16 > &  ,
const char *  ,
const   int,
const char *  ,
const   int,
const   int 
)
template int ReadSequence ( Image3d< float > &  ,
const char *  ,
const   int,
const char *  ,
const   int,
const   int 
)
template int ReadSequence ( Image3d< double > &  ,
const char *  ,
const   int,
const char *  ,
const   int,
const   int 
)
template int SaveSequence ( Image3d< GRAY8 > const &  ,
const char *  ,
const   int,
const char *  ,
const   int,
const   int 
)
template int SaveSequence ( Image3d< GRAY16 > const &  ,
const char *  ,
const   int,
const char *  ,
const   int,
const   int 
)
template int SaveSequence ( Image3d< float > const &  ,
const char *  ,
const   int,
const char *  ,
const   int,
const   int 
)
template int SaveSequence ( Image3d< double > const &  ,
const char *  ,
const   int,
const char *  ,
const   int,
const   int 
)
template int Insert3DFrame ( Image3d< GRAY8 > const &  ,
Image4d< GRAY8 > &  ,
const   int,
const   char,
const   int 
)
template int Insert3DFrame ( Image3d< GRAY16 > const &  ,
Image4d< GRAY16 > &  ,
const   int,
const   char,
const   int 
)
template int Insert3DFrame ( Image3d< float > const &  ,
Image4d< float > &  ,
const   int,
const   char,
const   int 
)
template int Insert3DFrame ( Image3d< double > const &  ,
Image4d< double > &  ,
const   int,
const   char,
const   int 
)
template int Copy3DFrame ( Image4d< GRAY8 > const &  ,
Image3d< GRAY8 > &  ,
const   int 
)
template int Copy3DFrame ( Image4d< GRAY16 > const &  ,
Image3d< GRAY16 > &  ,
const   int 
)
template int Copy3DFrame ( Image4d< float > const &  ,
Image3d< float > &  ,
const   int 
)
template int Copy3DFrame ( Image4d< double > const &  ,
Image3d< double > &  ,
const   int 
)
template int Remove3DFrame ( Image4d< GRAY8 > &  ,
const   int,
const   int 
)
template int Remove3DFrame ( Image4d< GRAY16 > &  ,
const   int,
const   int 
)
template int Remove3DFrame ( Image4d< float > &  ,
const   int,
const   int 
)
template int Remove3DFrame ( Image4d< double > &  ,
const   int,
const   int 
)
template void FloatToGray ( const Image4d< float > &  fimg,
Image4d< GRAY8 > &  gimg 
)
template void FloatToGray ( const Image4d< float > &  fimg,
Image4d< GRAY16 > &  gimg 
)
template void FloatToGray ( const Image4d< double > &  fimg,
Image4d< GRAY8 > &  gimg 
)
template void FloatToGray ( const Image4d< double > &  fimg,
Image4d< GRAY16 > &  gimg 
)
template void FloatToGrayNoWeight ( const Image4d< float > &  fimg,
Image4d< GRAY8 > &  gimg 
)
template void FloatToGrayNoWeight ( const Image4d< float > &  fimg,
Image4d< GRAY16 > &  gimg 
)
template void FloatToGrayNoWeight ( const Image4d< double > &  fimg,
Image4d< GRAY8 > &  gimg 
)
template void FloatToGrayNoWeight ( const Image4d< double > &  fimg,
Image4d< GRAY16 > &  gimg 
)
template void GrayToFloat ( const Image4d< GRAY8 > &  gimg,
Image4d< float > &  fimg 
)
template void GrayToFloat ( const Image4d< GRAY16 > &  gimg,
Image4d< float > &  fimg 
)
template void GrayToFloat ( const Image4d< GRAY8 > &  gimg,
Image4d< double > &  fimg 
)
template void GrayToFloat ( const Image4d< GRAY16 > &  gimg,
Image4d< double > &  fimg 
)
template int InsertGroupOfLines ( Image3d< GRAY8 > &  seq,
const float  vx,
const float  vy,
const int  delta_t,
const float  gx,
const float  gy,
const int  gt,
const float  lx,
const float  ly,
const float  spacing,
const int  number,
const GRAY8  color 
)
template int InsertGroupOfLines ( Image3d< float > &  seq,
const float  vx,
const float  vy,
const int  delta_t,
const float  gx,
const float  gy,
const int  gt,
const float  lx,
const float  ly,
const float  spacing,
const int  number,
const float  color 
)