<<<<<<<<<<<<<<<<<

crdidbm(crdidbm) Crd Image Database crdidbm(crdidbm)

NAME

crdidbm - Crd Image Database Access

DESCRIPTION

Crdidbm accesses images in the CRD Image Database. This class communicates with a CRDIDBM server that must be running on a system accessible by the system that is running LYMB. Images in the database are accessed by setting a hospital patient id, a modality, a system, a patient, a study, a series and an image. Messages are provided to list available items at any level in this hierarchy. To run the database server, set the environment variable IDBNAME to the full path of the database root, then run the program crdidbm. After a short time, the program will announce that it is complete. To use the crdidbm class in LYMB, you must: 1) Create an instance of this class. 2) Specify a host with the host= message. If the host is local, a crdidbm server must be running on the local host. 3) Specify a database withe the database= message. If database=default, the connection will be made to the database that the IDBNAME enevironment variable pointed to at startup of the server. Connection to the server is done by specifying the host and database. 4) Send an initialize! to the instance. This will connect the instance to the server.

SUPERCLASS

object

INSTANCE VARIABLES

database specifies the pathname of the database root. If "default" is specified, the instance will connect (once an initialize! is sent) to the default database of the given host. If another host has this database locked, the instance will attempt to connect to the database server that has the database locked. If this is successful, the host instance variable will be set to the new host.

host specifies the name of the host running the database manager. If "local" is specified, a server on the local host will be connected to when an "initialize!" message is received.

hospital_pid is the current hospital patient id.

modality is the current modality.

system is the current system.

patient is the current patient.

study is the current study.

series is the current series.

image is the current image.

MESSAGES

initialize! connects to the the crdidbm server on host and database database . If the instance is already connected to a database, that connection will be terminated and a new one made.

terminate! breaks the connection with the database server.

pixel_size? returns the pixel width (x, y) of the current image in millimeters.

prefix? returns the file prefix of the current image.

resolution? returns the x, y, resolution of the current image.

hospital_pid_start! sets the current hospital_pid to the first one, and sends a modality_start!.

hospital_pid_next! moves to the next hospital_pid to the first one, and sends a modality_start!. Sends a hospital_pid=", and returns a descriptive line for the hospital_pid.

hospital_pid_goto:number goes to the hospital_pid number number .

all_hospital_pids? returns a list of all the hospital_pids.

Similar messages are available for modality, system, patient, study, series and image. Each level can only be accessed once the previous level is set. However, each higher level sets the next lower level to the first item in the level.

EXAMPLE

/* Illustrate the CRD Image Database Class */

/* In: scripts/crdidbm/crdidbm.scr */

/* Connect to a server on the local host */ crdidbm new: anidbm host=local database=default initialize! print: database ;

/* List the available hospital pids */ anidbm print: all_hospital_pids;

/* List the available modalities for the first hospital pid */ anidbm hospital_pid_goto: 1 print: all_modalities;

/* Print the file prefix and resolution of the first image */ anidbm print: prefix print: resolution;

SEE ALSO

mio_crdidbm


Please send comments and suggestions to
consult@rpi.edu