class DfcActualImageInfo : public DfcImageInfoInterface | | numPlanes Pointer to the actual data |
| | addAxis (DfcAxisInfo *newAxis) |
| | clone (void) |
| | copy ( const DfcActualImageInfo &other ) |
| | DfcActualImageInfo ( const DfcActualImageInfo &other ) |
| | DfcActualImageInfo ( const RWString &name, const RWTValSlist<DfcAxis> &axes, int numPlanes, DfcImageInfoInterface::TYPE storageRep = DfcImageInfoInterface::DOUBLE, const RWString &unitType = "" ) |
| | DfcActualImageInfo ( const DfcImageInfoInterface &other ) |
| | getAxis ( const RWString &whichAxis ) |
| | getAxis ( int whichAxis ) |
| | getDataUnit (void) |
| | getKeywords (void) |
| | getName (void) |
| | getNumAxes (void) |
| | getNumPlanes (void) |
| | getStoredType (void) |
| | getType (void) |
| | openForRead ( const DfcIO_Strategy &strategy ) |
| | openForUpdate ( const DfcIO_Strategy &strategy ) |
| | operator= (const DfcImageInfoInterface &other) |
| | operator= (const DfcActualImageInfo &other) |
| | proxyIsDead (void) |
| | setDataUnit ( const RWString &newUnit ) |
| | setStoredType (DfcImageInfoInterface::TYPE type) |
| | write ( const DfcIO_Strategy &strategy ) |
| | ~DfcActualImageInfo (void) |
| | getSafeInterface (void) |
| | Purpose Obtain a proxy object for this object |
| | Pointer to the Keywords associated with this ImageInfo object |
DESCRIPTION
This class implements the interface presented in DfcImageInfoInterface.h
ImageInfo contains all the information about an Image EXCEPT the actual image data itself. It presents a good way of allowing objects, such as a Frame, to accesss only relevant information about an Image.
The user shouldn't be concerned with creating istances of this class, just obtaining and using them.
To find out how to obtain the data part of the Image, see the Image class.
EXAMPLES
for (int image = 0; image < myFrame.getNumImages(); image++)
{
DfcImageInfo currentImage = myFrame.getImageInfo(image);
cout << currentImage.getName() << endl;
}
try
{
DfcImageInfo myInfoObj = myFrame.getImageInfo("someName");
}
catch(DfcDoesntExistExc exc)
{
cerr << "Frame doesn't contain an ImageInfo object of that name\n";
}
DESIGN NOTES
Previously the ImageInfo class was the base class for an Image hierarchy so that downcasting from the ImageInfo class to, say DfcImage<float> would then yield the methods necessary to access the image data. ImageInfo has been seperated for three reasons:
1 - As pointed out in the first design review the semantics of such a hierarchy are questionable.
2 - It is desired that, regardless of whatever format the data is stored in, it should be possible to load the data into memory as any type. This means delaying the actual creation of an Image instance until the user specifies what type each pixel is to be represented as. This necessitates splitting the ImageInfo class from the Image hierarchy.
3 - The requirement for fast access to Image headers only.
The class "ActualImageInfo" is the actual object that is stored in both DfcFrame and associated with DfcImageBase. The derived class "DfcImageInfo" is a proxy object which manipualtes one of these objects. The proxy is provided to prevent the user from deleting the ActualImageInfo object.
Arguments
Arguments
Arguments
Returns
Returns
Returns
Preconditions Returns Exceptions Arguments
Returns Exceptions Arguments
Returns Exceptions Arguments
Returns Exceptions Arguments
Returns Exceptions Arguments
Returns
Arguments
Returns Exceptions
Returns Exceptions Arguments
Returns Exceptions Arguments
DfcActualImageInfo( const RWString &name, const RWTValSlist<DfcAxis> &axes, int numPlanes, DfcImageInfoInterface::TYPE storageRep = DfcImageInfoInterface::DOUBLE, const RWString &unitType = "" )
Constructor.
DfcActualImageInfo( const DfcActualImageInfo &other )
Copy Constructor. A shallow copy is performed (see operator=()).
DfcActualImageInfo( const DfcImageInfoInterface &other )
Copy Constructor. A shallow copy is performed (see operator=()).
RWString getName(void)
Obtain the name of the image
DfcImageInfoInterface::TYPE getType(void)
Query the imageInfo about the storage type of the data. If a local copy of the image exists then the result will be the storage type on the local machine, otherwise it will be the storage type in the image repository.
An indication of the type of data the image is composed of. This may be vectors, or it may be scalar pixels.
DfcImageInfoInterface::TYPE getStoredType(void)
void setStoredType(DfcImageInfoInterface::TYPE type)
int getNumPlanes(void)
Returns the number of planes in the image. The number of planes is the number of elements that each pixel in the image consists of. For example, in an image where each pixel represents a single value, the number of planes will be 1. In an image where each pixel is a vector that contains 3 elements the number of p[lanes will be 3 etc.
int getNumAxes(void)
Query the Image about its dimensionality.
The number of axes in the Image, will be 1, 2, 3 or 4.
DfcKeyword* getKeywords(void)
Obtain a reference to the Keywords that are associated with the Image.
A reference to a DfcKeywordStructure instance.
This is the top level structure associated with this Image. An iterator can be obtained from this Structure.
DfcAxis* getAxis( int whichAxis )
Returns information about one of the axes in the Image.
0 <= whichAxis < getNumAxes();
A reference to the requested axis. Note that it is a reference - do NOT delete it.
DfcAxis* getAxis( const RWString &whichAxis )
Returns information about one of the axes in the Image.
A reference to the requested axis.
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.
const RWString& getDataUnit(void)
Accesses the unit that is associated with the values stored in each pixel in this Image. This is merely a string for maximum flexibility.
Reference (constant) to a RWString.
void setDataUnit( const RWString &newUnit )
Sets the data unit for this axis. The data unit is not a unique type, merely a string for information purposes.
DfcActualImageInfo* clone(void)
Perform a deep copy of this object.
A pointer to the copy of this object. Responsibility for memory management transfers to the invoker of the method.
DfcActualImageInfo& operator=(const DfcActualImageInfo &other)
Perform a shallow copy of this object from another.
Reference to this object to allow chaining together of assignment statements.
DfcActualImageInfo& operator=(const DfcImageInfoInterface &other)
Perform a shallow copy of this object from another.
Reference to this object to allow chaining together of assignment statements.
void copy( const DfcActualImageInfo &other )
void addAxis(DfcAxisInfo *newAxis)
Adds another axis to the image information. This method only exists in this particular class. This prevents anyone who obtains the DfcImageInfo class from addign extra axes on, but allows the DfcImage classes to do it.
This method gives responsibility of the memory management of the axis to this object. The invoking method MUST not delete the axis or chaos will ensue and there will be much wailing and nashing of teeth.
virtual ~DfcActualImageInfo(void)
DfcImageInfo* getSafeInterface(void)
Obtain a proxy object for this object.
void proxyIsDead(void)
RWString name
Informs this object that its proxy object has been deleted. This allows it to make sure there are no dangling pointers.
This method cannot be legitimately called as the proxy has no proxies. Therefore it does nothing but is provided to make this class concrete.
DfcImageInfoInterface::TYPE type
DfcKeywordStructure keywords
int numPlanes
DfcImageInfo* proxy
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de