class DfcAxis : public DfcAxisInterface


Inheritance:


Public Methods

DfcAxis ( const RWString &id, int pixelLength, double refPoint = 0.0, double start = 0.0, double step = 1.0 )
DfcAxis::DfcAxis (const DfcAxis &other)
DfcAxis::DfcAxis (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 )
DfcAxis& operator= (const DfcAxis &other)
DfcAxis& operator= (const DfcAxisInterface &other)
void proxyIsDead (void)
void removeBounds (void)
void removeLowerBound (void)
void removeUpperBound (void)
void setBounds (double lower, double upper)
void setBounds (int lower, int upper)
void setLowerBound (int whichPixel)
void setLowerBound (double whichPixel)
void setName ( const RWString &newName )
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 ~DfcAxis (void)

Public


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

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

Purpose
Constructor

Purpose
makes a copy of the axis object we have received and wraps it up in a DfcAxis proxy object

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
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

Purpose
Places a bound on the axis in terms of pixels

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

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

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

Private Fields


pointer to the object where the actual data is stored

Documentation

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

DESCRIPTION
This class provides a proxy to the DfcAxisInfo class which actually contains the axis information. Essentially what we are doing is providing a safe-reference so that the user cannot accidentally delete important internal objects.

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 DfcAxis.

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

Purpose
Constructor.

Arguments

DfcAxis::DfcAxis(DfcAxisInterface &other)

Purpose
makes a copy of the axis object we have received and wraps it up in a DfcAxis proxy object

DfcAxis::DfcAxis(const DfcAxis &other)

Purpose
Copy Constructor

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.

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

DfcAxis& operator=(const DfcAxisInterface &other)

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

DfcAxis& operator=(const DfcAxis &other)

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

virtual ~DfcAxis(void)

pointer to the object where the actual data is stored. All method invocations on this object are forwardedd to the realOne. This is mutable because I have so many methods where I get the axis, just to inspect it which causes problems because DfcImage::getAxis() cannot be constant because it has modifier methods in it.


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