How-to: Import and export data in Stradview

Importing data and the Stradview format

Stradview can read most types of DICOM data, but it can also load images (and sequences of images), and many other types of data, for instance Mindways, ITK MetaImage, Analyze, NIfTI and NRRD data. It can also import surfaces in VRML and PLY formats and object structures in DICOM RTSTRUCT and SEG format, and from NIfTI label data. This data is never altered: Stradview does not write to any of these data files. When you save a Stradview file, a new (text) ".sw" file is created which contains all the additional information which Stradview needs, and references to the original data files. Next time you access the data, open the ".sw" file, and this will load the original data as well as everything else associated with it.

For DICOM or image sequences, selecting one file in the (numerical) sequence will automatically load all files in that sequence. Alternatively, the 'open directory' option can be used to show what DICOM or image sequences exist in a directory and its sub-directories.

All data is converted to 8-bit (integer values from 0 to 255) for display. If the original data is 16-bit (for instance DICOM CT data and some TIFF images), then this is dynamically converted to 8-bit according to the current 'windowing' values. Hence 16-bit data needs more memory to load than might otherwise be expected, to allow for storage of an 8-bit version as well. This makes visualisation faster in most cases, but you may see a slight delay when changing the 'windowing' while the 8-bit version of the data is updated.

Stradview also has a native 8-bit ".sxi" format for the actual data, but this is only likely to be used when exporting data re-oriented data to a new resliced regular array.

Importing surfaces is a little different: this can only be done over an already open data set, and only if the location of the surface at least partially coincides with the location of the data. Surfaces can be imported to any object using the 'import' button on the draw task. It is also possible to transform the location of a surface as it is imported. When a surface is imported, cross-sections of this object are also created in the original images (possibly skipping some image frames in the process). A surface can be re-created from these cross-sections at a different resolution.

When importing object structures from DICOM RTSTRUCT files, the contours are only read in if the 3D positions align with the data which is currently loaded. Importing either NIfTI label data or DICOM SEG files is a bit different: these are stored as volumetric masks (labels) per object, but are turned into contours which border these images on loading into Stradview. This allows for SEG files with overlapping objects. If you then create surfaces from these objects and save these as a NIfTI or NRRD mask, you will re-create a set of labelled data, but this format does not allow objects to overlap.

Exporting data to other formats

Some data sets contain more images than are really necessary, perhaps because there are quite a few images at each end of the data which are blank. Other data sets may be very high resolution and contain a very large number of images, and it is easier to work with this data if the images are 'thinned out' a bit. Stradview's 'export specific frames' option can be used to create a new ".sw" file which will only load in a sub-set of the available images. The original images are neither moved nor deleted: the Stradview file simply contains a reference telling it only to load in certain images next time.

The 'export specific frames' option can also be used to convert the current data into a numerical sequence of images, either for individual images, ranges of images, or the whole data set. If the original data is 16-bit, it will be converted to 8-bit according to the current 'windowing' before saving as an image.

If the loaded data is a regular array, then it can also be exported to another data format (NIfTI or NRRD, compressed or raw) using the 'export image data' option. This means Stradview can be used as a tool to convert between any of the data formats it can read and either of these data formats. This is also true for non-regular data: in that case you just need to re-interpolate it first, as below.

If you want to create a re-interpolated data set with images aligned in an alternative direction, then the 'export resliced data' option allows you to do this, so long as the reslice or ortho visualisations are currently visible. This will create a new data set, in native stradview ".sxi" format, aligned with (and the same size as) the current visualisation. If any surfaces have been created, then new outlines will also be saved, representing the intersection of each of these surfaces with the new images. You can save this new data as an image sequence or as a data set in another format by loading it back into Stradview, then using another 'export' option as above.

Stradview can also export surfaces to VRML and PLY formats, create binary mask NIfTI or NRRD files from surfaces, and export textual data in ".txt" or ".csv" files from either landmark or surface measurements.