iRoCS Toolbox  1.1.0
Static Public Member Functions
Blitz2Ddraw Class Reference

Basic drawing routines for blitz arrays. More...

#include <Blitz2Ddraw.hh>

Collaboration diagram for Blitz2Ddraw:

Static Public Member Functions

template<typename Type >
static void drawCircle (blitz::Array< Type, 3 > &image, int yCenter, int xCenter, int radius, const blitz::TinyVector< Type, 3 > &color)
 Draw a simple, non-aliased circle. More...
 
template<typename Type >
static void drawCircle (blitz::Array< Type, 2 > &image, int yCenter, int xCenter, int radius, const Type &color)
 Draw a simple, non-aliased circle. More...
 
template<typename Type >
static void drawLine (blitz::Array< Type, 3 > &image, int y0, int x0, int y1, int x1, const blitz::TinyVector< Type, 3 > &color)
 Draw a simple, non-aliased line. More...
 
template<typename Type >
static void drawLine (blitz::Array< Type, 2 > &image, int y0, int x0, int y1, int x1, const Type &color)
 Draw a simple, non-aliased line. More...
 
template<typename Type >
static void drawRect (blitz::Array< Type, 3 > &image, int y0, int x0, int y1, int x1, const blitz::TinyVector< Type, 3 > &color)
 Draw a rectangle into an blitz array the upper right corner and the lower left corner must be given. More...
 
template<typename Type >
static void drawRect (blitz::Array< Type, 2 > &image, int y0, int x0, int y1, int x1, const Type &color)
 Draw a rectangle into an blitz array the upper right corner and the lower left corner must be given. More...
 
template<typename T >
static void setPixel (blitz::Array< T, 3 > &image, int y, int x, const blitz::TinyVector< T, 3 > &color)
 Sets a single pixel in a image. More...
 
template<typename T >
static void setPixel (blitz::Array< T, 2 > &image, int y, int x, const T &color)
 Sets a single pixel in a gray image. More...
 

Detailed Description

Basic drawing routines for blitz arrays.

Definition at line 45 of file Blitz2Ddraw.hh.

Member Function Documentation

◆ setPixel() [1/2]

template<typename T >
static void Blitz2Ddraw::setPixel ( blitz::Array< T, 3 > &  image,
int  y,
int  x,
const blitz::TinyVector< T, 3 > &  color 
)
static

Sets a single pixel in a image.

Parameters
imageBlitz array that represents the image
yy-coordinate in the image (first dim in image)
xx-coordinate in the image (second dim in image)
colorTinyVector that contais the color of the pixel to be set

◆ setPixel() [2/2]

template<typename T >
static void Blitz2Ddraw::setPixel ( blitz::Array< T, 2 > &  image,
int  y,
int  x,
const T &  color 
)
static

Sets a single pixel in a gray image.

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

Parameters
imageBlitz array that represents the image
yy-coordinate in the image (first dim in image)
xx-coordinate in the image (second dim in image)
colorcontains the intensity of the pixel to be set

◆ drawLine() [1/2]

template<typename Type >
static void Blitz2Ddraw::drawLine ( blitz::Array< Type, 3 > &  image,
int  y0,
int  x0,
int  y1,
int  x1,
const blitz::TinyVector< Type, 3 > &  color 
)
static

Draw a simple, non-aliased line.

Parameters
imageBlitz array that represents the image
y0y-coordinate of the start point
x0x-coordinate of the start point
y1y-coordinate of the end point
x1x-coordinate of the end point
colorTinyVector that contains the color of the line
Note
(Code adapted from http://www.cs.unc.edu/~mcmillan/comp136/Lecture6/Lines.html)

◆ drawLine() [2/2]

template<typename Type >
static void Blitz2Ddraw::drawLine ( blitz::Array< Type, 2 > &  image,
int  y0,
int  x0,
int  y1,
int  x1,
const Type &  color 
)
static

Draw a simple, non-aliased line.

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

Parameters
imageBlitz array that represents the image
y0y-coordinate of the start point
x0x-coordinate of the start point
y1y-coordinate of the end point
x1x-coordinate of the end point
colorcontains the intensity of the line
Note
(Code adapted from http://www.cs.unc.edu/~mcmillan/comp136/Lecture6/Lines.html)

◆ drawCircle() [1/2]

template<typename Type >
static void Blitz2Ddraw::drawCircle ( blitz::Array< Type, 3 > &  image,
int  yCenter,
int  xCenter,
int  radius,
const blitz::TinyVector< Type, 3 > &  color 
)
static

Draw a simple, non-aliased circle.

Parameters
imageBlitz array that represents the image
yCentery-coordinate of the center point
xCenterx-coordinate of the center point
radiusradius of the circle
colorTinyVector that contains the color of the line

◆ drawCircle() [2/2]

template<typename Type >
static void Blitz2Ddraw::drawCircle ( blitz::Array< Type, 2 > &  image,
int  yCenter,
int  xCenter,
int  radius,
const Type &  color 
)
static

Draw a simple, non-aliased circle.

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

Parameters
imageBlitz array that represents the image
yCentery-coordinate of the center point
xCenterx-coordinate of the center point
radiusradius of the circle
colorTinyVector that contains the color of the line

◆ drawRect() [1/2]

template<typename Type >
static void Blitz2Ddraw::drawRect ( blitz::Array< Type, 3 > &  image,
int  y0,
int  x0,
int  y1,
int  x1,
const blitz::TinyVector< Type, 3 > &  color 
)
static

Draw a rectangle into an blitz array the upper right corner and the lower left corner must be given.

Parameters
imageBlitz array that represents the image
y0y-coordinate of the upper left point
x0x-coordinate of the upper left point
y1y-coordinate of the lower right point
x1x-coordinate of the lower right point
colorcontains the intensity of the line

◆ drawRect() [2/2]

template<typename Type >
static void Blitz2Ddraw::drawRect ( blitz::Array< Type, 2 > &  image,
int  y0,
int  x0,
int  y1,
int  x1,
const Type &  color 
)
static

Draw a rectangle into an blitz array the upper right corner and the lower left corner must be given.

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

Parameters
imageBlitz array that represents the image
y0y-coordinate of the upper left point
x0x-coordinate of the upper left point
y1y-coordinate of the lower right point
x1x-coordinate of the lower right point
colorcontains the intensity of the line

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