Developer Documentation
Centre for Vision, Speech & Signal Processing
USER IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
PSImageC::PSImageC(void)
PSImageC::PSImageC(const FilenameC &,const ImageRectangleC &,UIntT,UIntT)
PSImageC::PSImageC(OStreamC &,const ImageRectangleC &,UIntT,UIntT)
PSImageC::SetSizeMm(RealT)
PSImageC::SetFont(const StringC &,IntT)
PSImageC::Title(const StringC &)
PSImageC::Normalize(void)
PSImageC::PrintArrows(const NumImageC &,const RealT)
PSImageC::PrintEllipses(const NumImageC &,const RealT)
PSImageC::PrintCircles(const ImageC &,const RealT)
PSImageC::PrintImage(const ImageC &)
PSImageC::PrintImage(const ImageC &)
PSImageC::DrawLine(const Point2dC &,const Point2dC &)
PSImageC::DrawArrow(const Point2dC &,const Vector2dC &)
PSImageC::DrawEllipse(const Point2dC &,const Matrix2d2C &)
PSImageC::DrawText(const Point2dC &,const StringC &)
PSImageC::DrawBorder(void)
PSImageC::SetPenColour(RealT,RealT,RealT)
PSImageC::NewPage(void)
RCHandleC::IsValid(void) const
RCHandleC::IsValidObject(void) const
RCHandleC::operator=(const RCHandleC &)
RCHandleC::operator==(const RCHandleC &) const
RCHandleC::operator!=(const RCHandleC &) const
RCHandleC::Hash(void) const
RCHandleC::IsConst(void) const
RCHandleC::IsNotConst(void) const
RCHandleC::SetConst(void) const
RCHandleC::Invalidate(void)
RCHandleC::Body(void)
RCHandleC::Body(void) const
PSImageC
 
This class creates Postscript files that illustrate fields of 2D vectors and/or covariance matrices
 
include "amma/PSImage.hh"
User Level:Default
Library:Ccompimg
Example:exPsIm.ccexPSDraw.cc
Section:Geometry.2-D Image.Image Processing
In Scope:std

Comments:
The data types currently handled are 2D vectors and 2x2 symmetric matrices, as well as greyscale & RGB images. The vector or matrix field can be subsampled to reduce the density of the displayed features. An example of using the class can be seen in file exPsIm.cc. The Postscript output files generated by this example are vecs.ps or covs.ps.

Although the original concept of this class was to illustrate fields of features, it has been extended to inlude other functions that draw individual vectors, matrices etc. at specific points. This usge is illustrated in file exPsDraw.cc. The Postscript output file generated by this example is test.ps

Notes:

Parent Classes: Methods:
PSImageC()
Default constructor.

PSImageC(const FilenameC & output,const ImageRectangleC & rect,UIntT subsample = 1,UIntT subs_offset = 0)
Constructor, creates encapsulated Postscript file "output"
where:
  • bounding box is determined on the basis of "rect",
  • symbols are only written every "subsample" rows and colums,
  • the symbols are offset by "subs_offset" rows and colums from top left-hand corner of the cell created by subsampling.


PSImageC(OStreamC & output,const ImageRectangleC & rect,UIntT subsample = 1,UIntT subs_offset = 0)
Constructor, creates encapsulated Postscript file "output"
where:
  • bounding box is determined on the basis of "rect",
  • symbols are only written every "subsample" rows and colums,
  • the symbols are offset by "subs_offset" rows and colums from top left-hand corner of the cell created by subsampling.


void SetSizeMm(RealT size)
Set Postscript window width in mm;
default = rect.Cnum() * (25.4/72) mm (roughly)
This function must be called before any drawing is done

void SetFont(const StringC & name,IntT size)
Set the font to use.
Default is helvetica 12 point.

void Title(const StringC & title)
Set the title that will appear on the ghostview title bar

void Normalize()
Normalise the size of all fields of symbols that are printed subsequently
Size of largest symbol will be "subsample" pixels (unless subsequently rescaled).

RealT PrintArrows(const NumImageC<Vector2dC> & vecs,const RealT scale = 1.0)
Print grid of 2D vectors as arrows rescaled by factor of "scale"
The normalisation factor (if computed) is returned.

RealT PrintEllipses(const NumImageC<Matrix2d2C> & covs,const RealT scale = 1.0)
Print grid of 2x2 symmetric matrices as "covariance" ellipses rescaled by factor of "scale"
The normalisation factor (if computed) is returned.

void PrintCircles(const ImageC<RealT> & value,const RealT scale = 1.0)
Print grid of circles of diameter given by "value"
rescaled by factor of "scale"

void PrintImage(const ImageC<ByteT> & im)
Print background greyscale image

void PrintImage(const ImageC<ByteRGBValueC> & im)
Print background colour image

void DrawLine(const Point2dC & from,const Point2dC & to)
Draw a line.

void DrawArrow(const Point2dC & at,const Vector2dC & vec)
Draw a vector "vec" as an arrow, starting from "at".

void DrawEllipse(const Point2dC & at,const Matrix2d2C & mat)
Draw a covariance matrix as an ellipse, centered on "at".

void DrawText(const Point2dC & at,const StringC & text)
Print some text at a given location.
Use SetFont(...), to control the size and font used for text.

void DrawBorder()
Draw a border round the bounding box

void SetPenColour(RealT r,RealT g,RealT b)
Set pen colour.
r,g and b can take values between 0 and 1 where 1,1,1 is white and 0,0,0 is black. Values outside the range will be cliped to the nearest legal value.

void NewPage()
Start a new page.

#include "amma/RCHandle.hh"
BooleanT IsValid() const
Check its a valid handle.

BooleanT IsValidObject() const
Check its a valid handle, and that the object is pointed to is also valid.

RCHandleC<PSImageBodyC> & operator=(const RCHandleC<PSImageBodyC> & oth)
Assignment.

BooleanT operator==(const RCHandleC<PSImageBodyC> & oth) const
Comparison operator.

BooleanT operator!=(const RCHandleC<PSImageBodyC> & oth) const
Comparison operator.

UIntT Hash() const
Hash function.x

BooleanT IsConst() const
Is object constant ?

BooleanT IsNotConst() const
Is object not constant ?

void SetConst(void) const
Lock the object.
This is const as a convience though it actual modified the object, often object you wish to ensure are constant already have const set. protected:

void Invalidate()
Turn this into an invalid handle.

PSImageBodyC & Body()
Direct access to body.

const PSImageBodyC & Body() const
Constant access to body.


Programmer:Bill Christmas, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001