SMIL  0.8
 All Classes Functions Variables Groups Pages
Draw
+ Collaboration diagram for Draw:

Functions

template<class T >
RES_T drawBox (Image< T > &imOut, size_t x0, size_t y0, size_t z0, size_t width, size_t height, size_t depth, T value=ImDtTypes< T >::max(), bool fill=false)
 Draw a box (3D) More...
 
template<class T >
RES_T drawCircle (Image< T > &imOut, int x0, int y0, int radius, T value=ImDtTypes< T >::max(), size_t zSlice=0)
 Draw a circle. More...
 
template<class T >
RES_T drawDisc (Image< T > &imOut, int x0, int y0, int radius, T value=ImDtTypes< T >::max(), int zSlice=0)
 Draw a disc. More...
 
template<class T >
RES_T drawLine (Image< T > &im, int x0, int y0, int x1, int y1, T value=ImDtTypes< T >::max())
 Draws a line between two points P0(x0,y0) and P1(x1,y1). More...
 
template<class T >
RES_T drawLine (Image< T > &imOut, vector< UINT > coords, T value=ImDtTypes< T >::max())
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
template<class T >
RES_T drawRectangle (Image< T > &imOut, int x0, int y0, size_t width, size_t height, T value=ImDtTypes< T >::max(), bool fill=false, size_t zSlice=0)
 Draw a rectangle. More...
 
template<class T >
RES_T drawRectangles (Image< T > &imOut, const map< UINT, Vector_UINT > &coordsVect, T value=0, bool fill=false)
 Draw a list of rectangles. More...
 
template<class T >
RES_T drawSphere (Image< T > &imOut, int x0, int y0, int z0, int radius, T value=ImDtTypes< T >::max())
 Draw a sphere. More...
 
template<class T >
RES_T drawText (Image< T > &imOut, size_t x, size_t y, size_t z, string txt, string font, UINT size=20, T value=ImDtTypes< T >::max())
 Draw text on image. More...
 

Detailed Description

Function Documentation

RES_T smil::drawBox ( Image< T > &  imOut,
size_t  x0,
size_t  y0,
size_t  z0,
size_t  width,
size_t  height,
size_t  depth,
value = ImDtTypes<T>::max(),
bool  fill = false 
)

Draw a box (3D)

Parameters
imOutOutput image.
RES_T smil::drawCircle ( Image< T > &  imOut,
int  x0,
int  y0,
int  radius,
value = ImDtTypes<T>::max(),
size_t  zSlice = 0 
)

Draw a circle.

Bressenham's Midpoint Circle algoritm

See Also
drawDisc
Parameters
imOutOutput image.
RES_T smil::drawDisc ( Image< T > &  imOut,
int  x0,
int  y0,
int  radius,
value = ImDtTypes<T>::max(),
int  zSlice = 0 
)

Draw a disc.

See Also
drawCircle
Parameters
imOutOutput image.
RES_T smil::drawLine ( Image< T > &  im,
int  x0,
int  y0,
int  x1,
int  y1,
value = ImDtTypes<T>::max() 
)

Draws a line between two points P0(x0,y0) and P1(x1,y1).

This function is based on the Bresenham's line algorithm. (works only on 2D images)

Parameters
x0,y0Coordinates of the first point
x1,y1Coordinates of the second point
RES_T smil::drawLine ( Image< T > &  imOut,
vector< UINT >  coords,
value = ImDtTypes<T>::max() 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Draw line from vector

Parameters
coordsVector containing the coordiantes of the two end points (x0, y0, x1, y1)
RES_T smil::drawRectangle ( Image< T > &  imOut,
int  x0,
int  y0,
size_t  width,
size_t  height,
value = ImDtTypes<T>::max(),
bool  fill = false,
size_t  zSlice = 0 
)

Draw a rectangle.

Parameters
imOutOutput image.
RES_T smil::drawRectangles ( Image< T > &  imOut,
const map< UINT, Vector_UINT > &  coordsVect,
value = 0,
bool  fill = false 
)

Draw a list of rectangles.

RES_T smil::drawSphere ( Image< T > &  imOut,
int  x0,
int  y0,
int  z0,
int  radius,
value = ImDtTypes<T>::max() 
)

Draw a sphere.

Parameters
imOutOutput image.
RES_T smil::drawText ( Image< T > &  imOut,
size_t  x,
size_t  y,
size_t  z,
string  txt,
string  font,
UINT  size = 20,
value = ImDtTypes<T>::max() 
)

Draw text on image.

Requires the FreeType library