Skip to content.
SHIVA > DOC > FileFormats > UCFFormat

UCF Format

Universal Contour Files (UCF) is a format devised at LONI. It is an ascii based file in the following format:

Header

<width=>
384
<height=>
256
<xrange=>
-200.000000 200.000000
<yrange=>
-200.000000 200.000000
<zrange=>
-200.000000 200.000000
<levels>
255

  • <width=> Number of horizontal pixels in the image on which the Ucf was drawn. Occasionally there may be two integer values specified. deprecated
  • <height=> Number of vertical pixels in the image on which the Ucf was drawn. Occasionally there may be two integer values specified. deprecated
  • <xrange=> the relaxed range of contour points, normally in microns.
  • <yrange=> the relaxed range of contour points, normally in microns.
  • <zrange=> the relaxed range of contour points, normally in microns.
  • <levels> indicates the number of contour planes present in the file. Each contour plane may contain several contours.

Immediately following the header are contours planes

Contour

<level number=>
0.000000
<point_num=>
256
<contour_data=>
-28.192158 0.121569 -43.811764 6.325370
   ...
   ...
   ...
<end of level>

  • <level number=> a value that is used to sort this contour plane, often representing the z-coordinate of the plane, but it is not required.
  • <point_num=> starts a new contour within the plane with the number of expected points.
  • <contour_data=> contains the 3D or 4D data values. The 4-th dimension data is ignored by SHIVA.

End

Finally, a UCF file is ended with

<end>

There should be no empty lines as it may break some parsers, including SHIVA.