class DfcAxisInfo : public DfcAxisInterface


Inheritance:


Public Fields

int lengthInPixels
int lowerPixelBound
double lowerRwBound
double referencePoint
int upperPixelBound
double upperRwBound
double worldCoordStart
double worldCoordStep
RWString worldCoordUnit

Public Methods

DfcAxisInfo (const DfcAxisInfo &other)
DfcAxisInfo ( const RWString &id, int pixelLength, double refPoint = 0.0, double start = 0.0, double step = 1.0 )
DfcAxisInfo (const DfcAxisInterface &other)
int getLowerBound (void)
const RWString& getName (void)
int getNumPixels (void)
double getRealWorldStart (void)
double getRealWorldStep (void)
double getReferencePoint (void)
DfcAxis* getSafeInterface (void)
int getUpperBound (void)
const RWString& getWorldCoordUnit (void)
DFC_BOOL openForRead ( const DfcIO_Strategy &strategy )
DFC_BOOL openForUpdate ( const DfcIO_Strategy &strategy )
DfcAxisInfo& operator= (const DfcAxisInterface &other)
DfcAxisInfo& operator= (const DfcAxisInfo &other)
void proxyIsDead (void)
void removeBounds (void)
void removeLowerBound (void)
void removeUpperBound (void)
void setBounds (int lower, int upper)
void setBounds (double lower, double upper)
void setLowerBound (double whichPixel)
void setLowerBound (int whichPixel)
void setName ( const RWString &newName )
DFC_BOOL setNumPixels (int newNum)
void setRealWorldStart ( double newStart )
void setRealWorldStep ( double newStep )
void setReferencePoint (double whichPixel)
void setUpperBound (int whichPixel)
void setUpperBound (double whichPixel)
void setWorldCoordUnit (const RWString &newUnit)
DfcAxisInterface* stripProxiesAndClone (void)
DFC_BOOL write ( const DfcIO_Strategy &strategy )
virtual ~DfcAxisInfo (void)

Public


Purpose
Places a bound on the axis in terms of pixels

Purpose
Perform a shallow copy, same as clone for this class at the moment

Purpose
Constructor

Purpose Copy constructor

Purpose Copy constructor

Purpose Sets the name of the Axis

Purpose
Returns the name of this axis

Purpose
Sets the start value for the real world coordinates for this axis

Returns
The value of the start position for the world coordinate representation of this axis

Purpose
Sets the step value for the real world coordinates for this axis

Returns
The value of the start position for the world coordinate representation of this axis

Purpose
Query the number of pixels along this axis

Purpose
Sets the number of pixels along an axis

Purpose
Returns the reference point (in terms of pixels) associated with this axis

Purpose
Defines a pixel poistion in the Image that is used for a reference position

Purpose
Returns the lower Bound on this axis (only in whole pixel positions)

Purpose
Returns the upper Bound on this axis (only in whole pixel positions)

Purpose
Removes the lower bound that has been placed on the axis

VLT On-line Data Flow, Subsystem: df-core
$Id: DfcAxisInfo

Purpose
Places a bound on the axis in terms of real world coordinates

Purpose
Remove any upper bound that has been placed on the axis (either in Pixel or real world coordinates)

Purpose
Places a bound on the axis in terms of pixel coordinates

Purpose
Places a bound on the axis in terms of real world coordinates

Purpose
Remove any bounds on the axis, either upper or lower, that were previously placed on it

Purpose
Place a lower and upper bound on the axis, in terms of pixel coordinates

Purpose
Place a lower and upper bound on the axis, in terms of real world coordinates

Purpose
Query the type of unit associated with the real world axis measurements

Purpose
Set the type of unit associated with the real world axis measurements

Purpose
Create a copy of this object (a deep copy) not that it's relevant here at the moment

Purpose
Return a pointer to the actual object that this object refers to, if it is a proxy

Purpose
To improve the memory management strategy proxies are stored in the objects which they reference

Purpose
Makes the object write itself

Purpose
Makes the ImageInfo instance read itself from file / server / whatever

Purpose
Makes the ImageInfo instance read itself from file / server / whatever

Private Fields


Keep a copy of the proxy object to protect data and to reduce the likelihood of dangling pointers and / or memory leaks
RWString name
DfcAxis* proxy
Position along this axis where the reference pixel is located

Private


The unit associated with the real world coordinates on this axis

Upper bound on the axis in terms of real world coordinates

The length of the axis in pixels

Value for the start position of the axis in terms of real world coordinates - corresponds to pixel 0

Value for the step size between pixels in terms of real world coordinates

A name for the Axis

Lower bound on the axis in terms of pixel positions

Upper bound on the axis in terms of pixel positions

lower bound on the axis in terms of real world coordinates

Documentation

VLT On-line Data Flow, Subsystem: df-core
$Id: DfcAxisInfo.h,v 1.1 1997/05/15 07:45:30 dataflow Exp $

DESCRIPTION
This class contains all the relevant information and services that are associated with a single axis in an Image.
An instance of this object must exist for every dimension in an Image.

The user should only manipulate DfcAxis instances.

EXAMPLES

  
    DfcAxis myAxis = myImage.getAxis(1); 
  cout << myAxis.getName() << endl;   
    myAxis.setName("frequency"); 
  myAxis.setUnit("herz"); 
  
    myAxis.setLowerBound(20.0); 
  myAxis.setUpperBound(22000.0); 
  
  

DESIGN DECISIONS
The user should only manipulate DfcAxis instances. These are proxy classes which forward all method invocations to an instance of this class. By using a proxy it allows a user to use an AxisInfo object interface directly without any danger of the user inadvertantly deleting an AxisInfo object which is an important aggregate of DfcImageInfo. It also prevents us having to clutter up the interface of DfcImageInfo with all the operations of DfcAxisInfo.

DfcAxisInfo( const RWString &id, int pixelLength, double refPoint = 0.0, double start = 0.0, double step = 1.0 )

Purpose
Constructor.

Arguments

DfcAxisInfo(const DfcAxisInterface &other)

Purpose Copy constructor. The copy will share nothing at all with the original.

DfcAxisInfo(const DfcAxisInfo &other)

Purpose Copy constructor. The copy will share nothing at all with the original.

void setName( const RWString &newName )

Purpose Sets the name of the Axis.

Arguments

const RWString& getName(void)

Purpose
Returns the name of this axis.

Returns
reference to a string object that holds the name of the axis.

void setRealWorldStart( double newStart )

Purpose
Sets the start value for the real world coordinates for this axis. There is a linear mapping between world coordinates and pixel coordinates:
worldCoordinate = worldCoordStart + pixelValue * worldCoordStep;

Arguments

double getRealWorldStart(void)

Returns
The value of the start position for the world coordinate representation of this axis

void setRealWorldStep( double newStep )

Purpose
Sets the step value for the real world coordinates for this axis. There is a linear mapping between world coordinates and pixel coordinates:
worldCoordinate = worldCoordStart + pixelValue * worldCoordStep;

Arguments

double getRealWorldStep(void)

Returns
The value of the start position for the world coordinate representation of this axis

int getNumPixels(void)

Purpose
Query the number of pixels along this axis. Pixels run from 0 up to some limit. Note that this value is not the discrete number of pixels along the axis, but the range ie if the Image is irregularly sampled between 0 and 200 then the value returned by this method will be 200 and not the number of samples along the axis.

Returns
The number of pixels along the axis.

DFC_BOOL setNumPixels(int newNum)

Purpose
Sets the number of pixels along an axis. Note that this is meant only to be used by Images. It may therefore be made private later and the Images may obtain friend status to this class.

RETURNS
Boolean indicator of whether the set succeded or not.

double getReferencePoint(void)

Purpose
Returns the reference point (in terms of pixels) associated with this axis.

Returns
the reference pixel.

void setReferencePoint(double whichPixel)

Purpose
Defines a pixel poistion in the Image that is used for a reference position. This method defines a single position along this axis where the reference pixel is located.

int getLowerBound(void)

Purpose
Returns the lower Bound on this axis (only in whole pixel positions)

int getUpperBound(void)

Purpose
Returns the upper Bound on this axis (only in whole pixel positions)

void removeLowerBound(void)

Purpose
Removes the lower bound that has been placed on the axis. The lowest pixel value becomes 0 again.

void setLowerBound(int whichPixel)

Purpose
Places a bound on the axis in terms of pixels. It does not matter if the lower pixel bound is placed above the upper pixel bound, this just yields no region in between.

Exceptions

  • DfcBoundsExc - the bound is outside the range of the axis.

void setLowerBound(double whichPixel)

Purpose
Places a bound on the axis in terms of real world coordinates. It does not matter if the lower pixel bound is placed above the upper pixel bound, this just yields no region in between. The bound is converted to pixel positions internally.

Exceptions

  • DfcBoundsExc - the bound is outside the range of the axis.

void removeUpperBound(void)

Purpose
Remove any upper bound that has been placed on the axis (either in Pixel or real world coordinates)

void setUpperBound(int whichPixel)

Purpose
Places a bound on the axis in terms of pixel coordinates. It does not matter if the lower pixel bound is placed above the upper pixel bound, this just yields no region in between.

Exceptions

  • DfcBoundsExc - the bound is outside the range of the axis.

void setUpperBound(double whichPixel)

Purpose
Places a bound on the axis in terms of real world coordinates. It does not matter if the lower pixel bound is placed above the upper pixel bound, this just yields no region in between. The bound is converted to pixel positions internally.

Exceptions

  • DfcBoundsExc - the bound is outside the range of the axis.

void removeBounds(void)

Purpose
Remove any bounds on the axis, either upper or lower, that were previously placed on it.

void setBounds(int lower, int upper)

Purpose
Place a lower and upper bound on the axis, in terms of pixel coordinates.

Exceptions

  • DfcBoundsExc - one of the bounds (or maybe even both of them) exceeds the limits of the axis.

void setBounds(double lower, double upper)

Purpose
Place a lower and upper bound on the axis, in terms of real world coordinates.

Exceptions

  • DfcBoundsExc - one of the bounds (or maybe even both of them) exceeds the limits of the axis.

const RWString& getWorldCoordUnit(void)

Purpose
Query the type of unit associated with the real world axis measurements.

Returns
A constant reference to a string which holds a textual description of the unit associated with the axis.

void setWorldCoordUnit(const RWString &newUnit)

Purpose
Set the type of unit associated with the real world axis measurements.

Returns
A constant reference to a string which holds a textual description of the unit associated with the axis.

DfcAxisInterface* stripProxiesAndClone(void)

Purpose
Create a copy of this object (a deep copy) not that it's relevant here at the moment

DfcAxis* getSafeInterface(void)

Purpose
Return a pointer to the actual object that this object refers to, if it is a proxy.

Returns
A pointer to a DfcKeyword object. Responsibility for deleting the dereferenced object does not passs to the method invoker although deleting it will not cause any damage.

void proxyIsDead(void)

Purpose
To improve the memory management strategy proxies are stored in the objects which they reference. One of the ways in which this improves memory is that the real object can delete its proxy when it itself vanishes, meaning the user does not have to worry about disposing of the proxy. However, should the user decide to delete the proxy it is important that the real object does not atrempt to delete the memory again when it itself is deleted. Therefore the proxy must inform the real object if it is being deleted.

DFC_BOOL write( const DfcIO_Strategy &strategy )

Purpose
Makes the object write itself. The object writes itself in terms of calls to the methods in the DfcIO_Strategy instance.

Returns
Boolean indication of whether the saving of the data was succesful or not.

Exceptions

  • DfcReadOnlyExc - the class cannot be read back because it has been opened as a read only class.

Arguments

DFC_BOOL openForUpdate( const DfcIO_Strategy &strategy )

Purpose
Makes the ImageInfo instance read itself from file / server / whatever. The ImageInfo object only needs to make invocations of the methods in the supplied IO_Strategy object to obtain its data. In this way the source and format of the data is completely transparent to it.

Returns
Boolean indicating whether the data was succesfully read or not.

Exceptions

  • DfcMemoryExc - while trying to create the sub-objects to hold the data locally, not enough memory was available.
  • DfcAlreadyOpenExc - the object is already opened somewhere else.

Arguments

DFC_BOOL openForRead( const DfcIO_Strategy &strategy )

Purpose
Makes the ImageInfo instance read itself from file / server / whatever. The ImageInfo object only needs to make invocations of the methods in the supplied IO_Strategy object to obtain its data. In this way the source and format of the data is completely transparent to it.

Returns
Boolean indicating whether the data was succesfully read or not.

Exceptions

  • DfcMemoryExc - while trying to create the sub-objects to hold the data locally, not enough memory was available.
  • DfcAlreadyOpenExc - the object is already open for update somewhere else.

Arguments

DfcAxisInfo& operator=(const DfcAxisInterface &other)

Purpose
Perform a shallow copy, same as clone for this class at the moment.

DfcAxisInfo& operator=(const DfcAxisInfo &other)

virtual ~DfcAxisInfo(void)

RWString name

A name for the Axis. Should be unique amongst all axis attached to a single Image.

int lengthInPixels

The length of the axis in pixels. This is the number of discrete pixel values.

double worldCoordStart

Value for the start position of the axis in terms of real world coordinates - corresponds to pixel 0

double worldCoordStep

Value for the step size between pixels in terms of real world coordinates. The realtionship between pixels and real world coordinates is a linear one, given by: realRodlsCoord = realWorldStart + pixelPosition * realWorldStep;

RWString worldCoordUnit

The unit associated with the real world coordinates on this axis.

int lowerPixelBound

Lower bound on the axis in terms of pixel positions

int upperPixelBound

Upper bound on the axis in terms of pixel positions

double lowerRwBound

lower bound on the axis in terms of real world coordinates

double upperRwBound

Upper bound on the axis in terms of real world coordinates

double referencePoint

DfcAxis* proxy
Position along this axis where the reference pixel is located

Keep a copy of the proxy object to protect data and to reduce the likelihood of dangling pointers and / or memory leaks


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de