RTOG Data Exchange Sample Program Source Files


    Source Code Samples and Description     

Code samples are provided for both writing Specification compliant patient data exchange file sets and for reading compliant exchange file sets. There are some caveats which go with this code and with anyone's implementation of this specification which must be understood to be able to make use of these code samples.

The most important item is the fact that it requires an expert on the 3D RTP system file structures to be able to quickly and correctly implement either of these programs. This is because it is extremely important to understand the RTP system file formats, the interaction of these files and the location of the files. If the 3D RTP system is adequately documented, the implementation may be done by an individual with a lesser knowledge of the system, but the time required will probably increase.

Various individuals who have developed write capable software for university based systems estimate that the time to implement this software (from scratch) is on the order of one to three months of full time effort by one individual.

To be best of our knowledge, no institution or 3D RTP system vendor, except the 3D QA Center, has ever done a complete implementation of the read software. As the diagnostic capability of the software in use at the 3D QA Center is continually being upgraded, it is difficult to estimate the amount of time which would be required to implement the read software from beginning to end. However, using the code samples provided herein, an implementation effort for reading is probably on the same order as that required for write software.


   ABOUT THIS DISTRIBUTION    

The files in this distribution comprise the set required to make six executable files. Three of these executables are (make read):
read_x_tape Reads RTOG patient exchange data files in a generic form which excludes saving the files read.
ident_x_tape Reads an RTOG patient exchange data file set directory file, parses it and reports on the data contained in the file set. The Individual data files (other than the directory file) are not parsed, just checked for existence.
read_tape Reads a magnetic tape written according to the RTOG format with given buffer size (2048 bytes is the default) and writes the files to disk using file names of aapm0000, aapm0001, etc., based on their order on the tape. Reading concludes when the maximum number of files have been read or a double file mark is encountered.

While these programs may be built from the accompanying "Makefile", they do not provide a complete diagostic tool for evaluating RTOG formatted file sets. In order to do a complete evaluation, the content (not evaluated by these programs) must be evaluated separately from the syntax used (mostly evaluated by these routines). This requires that the modules in the source file save_gen_files.c' must be written. This is a complex task and is best done by someone with intimate knowledge of the target (host) RTP systems file formats and interconnection.

The other three executables are (make write):
write_genx_tape Would generate RTOG exchange format files if the internal data structures were filled in by someone familiar with the underlying RTP system.
write_tape Will put RTOG format files onto a tape medium. Comparable to "read_tape".
block_text_file This program will take a text file and put it into RTOG exchange format including blocking.

See the Makefile and individual source files for more documentation.


NOTE WELL
The Makefile requires the symbol "OSNAME" to be set in the environment.



   IMPLEMENTER RESPONSIBILITIES

Write Code


Read Code


   DOWNLOAD SAMPLE SOURCE CODE

The software provided is available in three forms. For those with UNIX systems, there is a compressed 'tar' file which contains all of the individual source files. Source files are also available as a self-extracting 'zip' file for Windows systems. If neither of these options works for you, you may download the source files individually.


In order to download these files, it is necessary to understand how your browser can be instructed to download a file. In Netscape it is identified as Save Link As.... In Internet Explorer it is identified as Save Target As.... You will then be prompted by your browser software to specify a location and name for the individual file. If you click on the links in the standard way, the file will be displayed (excepting the 'tar.Z' files which will display giberish on your screen).


   PREVIOUS VERSIONS OF THE SAMPLE SOURCE CODE

An earlier version of sample 'C' language source code for reading and writing Specification compliant patient data exchange file sets is available here. Please be aware that while many of the filenames in the current sample code distribution are the same as those in the earlier distribution, there are significant difference between data structures defined in these versions. Thus, files from the two distributions are not compatible and should not be used together.


Document maintained by John Matthews

Send email to: jwm@castor.wustl.edu
Phone: 314-747-5413
FAX: 314-747-5423

Last software update: 21 March 2000 (JWM).
Page last modified: