read_papyrus

Synopsis

The read_papyrus user macro reads a Papyrus format file and outputs a uniform AVS field and a structure containing the data present in the Image Header. It also allows access to the Image Header data through a User Interface.

Parameters

Name Type Description UI Control

filename String Name of Papyrus file to read. File Dialog

Output Ports

Name Type Description

busy int Indicates activity of module.
out_header Image_Header Image header data.
out_fld Image_Data Read 3D volume data.
out_obj DataObject Directly Renderable Output Object.

Description

The read_papyrus macro reads a Papyrus file and outputs an uniform field containing the image data and a data structure containing the information stored in the image header. The uniform field output is output as a Image_Data object. This object is derived from the Field_Unif module and and can hence be used in the exactly the same way. It can be directly connected to all the standard visualization modules. The information in the image header is output as an Image_Header object. This object simply contains references to 5 further objects which actually contain the primitive data values. See below for further information.

The read_papyrus macro also provides a user interface through which the file to be read can be specified. The user interface also allows the information in the image header to be examined.

The read_papyrus macro uses the Papyrus 3.5 toolkit to read Papyrus files. This toolkit was developed by the Digital Imaging Unit of the University Hospital of Geneva. More information can be found at the Papyrus website. Full instructions for compiling and installing the Papyrus library can be found in the ReadPapyrusFile documentation.

Parameters

filename

The name of the file that should be read from. This parameter is of type string. The read_papyrus user macro checks that the supplied filename is valid and displays errors as appropriate. The filename string can contain either the full or relative path name of the file and can contain any of the AVS/Express environment variables (e.g. $XP_PATH<1>)

Output Ports

busy

This parameter indicates whether the read_papyrus macro is currently busy processing data. The parameter is of type int. The parameter is set as appropriate by the internal ReadPapyrusFile module. It can be used by the user interface to indicate the current state of the module.

out_header

This object contains the header information contained within the Papyrus file. The object is of type Image_Header. This object contains references to 5 further objects. These objects actually contain the information read from the Papyrus file. Each of these sub-objects corresponds to the appropriate DICOM module. These modules are Patient, General_Study, General_Series, General_Equipment & Image_Series. Further information on the data each of these sub-objects contains can be found in the ReadPapyrusFile documentation and in the Papyrus 3.5 user manual. This can be found at the Papyrus website.

out_fld

This object contains the image data contained within the Papyrus file. The object is of type Image_Data. This object is derived from Field_Unif and can be used in the exactly the same way as a standard uniform field. The output data can have either 2 or 3 dimensions. If the specified Papyrus file only contains a single slice a 2D field will be created. If the file contains several slices than a 3D volume field will be created.

out_obj

This object contains a directly renderable version of the image data contained within the Papyrus file. The object is of type DataObject. This object can be directly connected to a viewer. However normally it will not be used as further processing will normally have to be done on the read image data.

Utility Macros

The Functional Macro ReadPapyrusFunc uses the low-level module ReadPapyrusFile. The User macro read_papyrus uses this functional macro, the UI macro ReadPapyrusUI, and the parameter blocks Image_Header and Image_Data.

Example

Two example applications are provided. They both read in a Papyrus format file. The TilePapyrusEg example uses the tile_volume module to visualize the data whilst the IsosurfacePapyrusEg example uses the isosurface module. The IsosurfacePapyrusEg also uses a downsize module to reduce the amount of data to be visualized. A sample Papyrus file mipettra.pap is provided with the ReadPapyrus project.

Files

iac_proj/rd_papy/rdpymods.v contains the V definitions of the ReadPapyrusFile module and the Image_Data, Image_Header, Patient, General_Study, General_Series, General_Equipment and Image_Series parameter blocks.

iac_proj/rd_papy/rdpymacs.v contains the V definitions of the ReadPapyrusUI UI macro, the ReadPapyrusFunc functional macro and the read_papyrus user macro.

iac_proj/rd_papy/rdpyapps.v contains the V definitions of the TilePapyrusEg and IsosurfacePapyrusEg example applications.

Other Notes

The ReadPapyrusMacs library inherits its process. As this library contains no procedural code, the process is not important.

Authors

Fernand Alcatrao

Modifications

Andrew Dodd, International AVS Centre
James Perrin, Manchester Visualization Centre

Contact

International AVS Centre
Manchester Visualization Centre
Manchester Computing
University of Manchester
Oxford Road
Manchester
United Kingdom
M13 9PL

See Also