From SCIRun Documentation Wiki
Jump to navigation Jump to search

As of release 1.10.0 the Seg3D session file is now a gzipped tar file containing the session files needed to reload a session state. The session file contains a session.xml entry which is an xml file describing which volumes are present and some of the Seg3D state. It also contains several nrrd files. The data nrrds are the floating point data volumes that are present in the volume panel and there is one per volume. The label nrrds are the labels present in the volume. Each label is a bitplane in a label nrrd, and the label nrrds are unsigned characters. There can be be up to 8 different labels per label nrrd.

The session.xml file contains two sections. The first is the volumes section. The volumes are listed in the order in which they appear in the volume panel. Each one has a name and filename associated with it. The name is the same as that in the volume panel. The filename is the data or label nrrd in the archive that matches that volume. For label volumes there is also a label value in the session.xml file. This indicates which bitplane the label occupies within the label nrrd. There are also a couple of other settings per volume such as whether or not it is visible, it's opacity, color, etc.

The second section of the session.xml file contains the appearance variables. There are only a few available right now, such as which volume is active and whether or not to turn on volume rendering.

Session files prior to 1.10.0

Prior to 1.10.0 the file was not an archive. It just contained what is now the session.xml contents from the new archive. That is, it was just the xml description of the volumes and the appearance. All of the volumes associated with a session were saved into the same directory as the file. Upon loading the session Seg3D would read the xml .ses file and then read in all of the filenames as the volumes. If any were missing the read would fail.

Archive nrrd files:

The session reader for 1.10.0 contains a small embedded nrrd reader that cannot handle general nrrd files. At this time it expects all data nrrds to be typed as float and all label nrrds to be typed as unsigned character. Also the only data encoding it can read at this time is RAW. It cannot support any file formats besides this limited subset of nrrd within the session archive.

However, the session files are still backwards compatible with the format prior to 1.10.0 and you can use whatever file formats you want to outside of the session archive if you construct one by hand. For example you can make your own .ses file that just contains the session.xml content and points the filenames to whatever data files you want. They do not have to be nrrd or any particular format. Keep in mind that the data files will still be converted to float on reading and the label files will be read as unsigned characters.