class DfcAxis : public DfcAxisInterface | | 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) |
| | getLowerBound (void) |
| | getName (void) |
| | getNumPixels (void) |
| | getRealWorldStart (void) |
| | getRealWorldStep (void) |
| | getReferencePoint (void) |
| | getSafeInterface (void) |
| | getUpperBound (void) |
| | getWorldCoordUnit (void) |
| | openForRead ( const DfcIO_Strategy &strategy ) |
| | openForUpdate ( const DfcIO_Strategy &strategy ) |
| | operator= (const DfcAxis &other) |
| | operator= (const DfcAxisInterface &other) |
| | proxyIsDead (void) |
| | removeBounds (void) |
| | removeLowerBound (void) |
| | removeUpperBound (void) |
| | setBounds (double lower, double upper) |
| | setBounds (int lower, int upper) |
| | setLowerBound (int whichPixel) |
| | setLowerBound (double whichPixel) |
| | setName ( const RWString &newName ) |
| | setRealWorldStart ( double newStart ) |
| | setRealWorldStep ( double newStep ) |
| | setReferencePoint (double whichPixel) |
| | setUpperBound (int whichPixel) |
| | setUpperBound (double whichPixel) |
| | setWorldCoordUnit (const RWString &newUnit) |
| | stripProxiesAndClone (void) |
| | write ( const DfcIO_Strategy &strategy ) |
| | ~DfcAxis (void) |
| | pointer to the object where the actual data is stored |
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.
Arguments
Arguments
Returns
Arguments
Arguments
Returns
Returns
Exceptions
Exceptions
Exceptions
Exceptions
Exceptions
Exceptions
Returns
Returns
Returns
Returns Exceptions Arguments
Returns Exceptions Arguments
Returns Exceptions Arguments
DfcAxis( const RWString &id, int pixelLength, double refPoint = 0.0, double start = 0.0, double step = 1.0 )
Constructor.
DfcAxis::DfcAxis(DfcAxisInterface &other)
makes a copy of the axis object we have received and wraps it up in a DfcAxis proxy object
DfcAxis::DfcAxis(const DfcAxis &other)
Copy Constructor
void setName( const RWString &newName )
const RWString& getName(void)
Returns the name of this axis.
reference to a string object that holds the name of the axis.
void setRealWorldStart( double newStart )
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;
double getRealWorldStart(void)
The value of the start position for the world coordinate representation of this axis
void setRealWorldStep( double newStep )
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;
double getRealWorldStep(void)
The value of the start position for the world coordinate representation of this axis
int getNumPixels(void)
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.
The number of pixels along the axis.
double getReferencePoint(void)
Returns the reference point (in terms of pixels) associated with this axis.
the reference pixel.
void setReferencePoint(double whichPixel)
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)
Returns the lower Bound on this axis (only in whole pixel positions)
int getUpperBound(void)
Returns the upper Bound on this axis (only in whole pixel positions)
void removeLowerBound(void)
Removes the lower bound that has been placed on the axis. The lowest pixel value becomes 0 again.
void setLowerBound(int whichPixel)
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.
void setLowerBound(double whichPixel)
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.
void removeUpperBound(void)
Remove any upper bound that has been placed on the axis (either in Pixel or real world coordinates)
void setUpperBound(int whichPixel)
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.
void setUpperBound(double whichPixel)
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.
void removeBounds(void)
Remove any bounds on the axis, either upper or lower, that were previously placed on it.
void setBounds(int lower, int upper)
Place a lower and upper bound on the axis, in terms of pixel coordinates.
void setBounds(double lower, double upper)
Place a lower and upper bound on the axis, in terms of real world coordinates.
const RWString& getWorldCoordUnit(void)
Query the type of unit associated with the real world axis measurements.
A constant reference to a string which holds a textual description of the unit associated with the axis.
void setWorldCoordUnit(const RWString &newUnit)
Set the type of unit associated with the real world axis measurements.
A constant reference to a string which holds a textual description of the unit associated with the axis.
DfcAxisInterface* stripProxiesAndClone(void)
Create a copy of this object (a deep copy) not that it's relevant here at the moment
DfcAxis* getSafeInterface(void)
Return a pointer to the actual object that this object refers to, if it is a proxy.
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)
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 )
Makes the object write itself. The object writes itself in terms of calls to the methods in the DfcIO_Strategy instance.
Boolean indication of whether the saving of the data was succesful or not.
DFC_BOOL openForUpdate( const DfcIO_Strategy &strategy )
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.
Boolean indicating whether the data was succesfully read or not.
DFC_BOOL openForRead( const DfcIO_Strategy &strategy )
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.
Boolean indicating whether the data was succesfully read or not.
DfcAxis& operator=(const DfcAxisInterface &other)
Perform a shallow copy, same as clone for this class at the moment.
DfcAxis& operator=(const DfcAxis &other)
Perform a shallow copy, same as clone for this class at the moment.
virtual ~DfcAxis(void)
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de