class ObjectViewer



ObjectViewer acts as a wrapper around the CTN DCM facility. It provides methods of retrieving data stored within a DCM_OBJECT without having to know the specifics of the DCM facility. Thus, it is much simpler and easier to access data. This class is used by class MINDUI to show information to the user.



Constructors

ObjectViewer()
Creates an instance of ObjectViewer with no open object.
ObjectViewer( char* )
Opens the specified file as a DCM_OBJECT.
ObjectViewer( DCM_OBJECT* )
Takes a pointer to an already opened DCM_OBJECT and allows one to use the facilities provided by this class to access it's data.

Functionality

public open( char* )
Takes a filename as a parameter and opens it as a DCM_OBJECT. If an object was already opened, it closes it first.
public open( DCM_OBJECT* )
Takes a pointer to an already opened DCM_OBJECT and uses it. If an object was already opened, it closes it first.
public close()
Closes the DCM_OBJECT.
public int getElement( DCM_ELEMENT*, DCM_TAG )
DCM_ELEMENT is a pointer to an allocated DCM_ELEMENT. This element will be filled with data retrieved from the specfied DCM_TAG in the opened object.
public void getElementString( DCM_ELEMENT*, char* )
Takes data stored wtihin the specified DCM_ELEMENT, converts it to a printable format and stores it in the passed string.

Private Members

unsigned long options
Used for passing to DCM functions that require options. It will be set to DCM_ORDERLITTLEENDIAN by default in the constructor and will not be used further in this class at this time.
DCM_OBJECT* dcmObject
Pointer to the currently open DCM_OBJECT, or NULL if nothing is open.