#################### The VikingXML format #################### Viking is capable of displaying any correct formatted image data. To use Viking for different images you need to make a VikingXML file available on a web server which you can then pass to Viking's splash screen. Nornir contains scripts which VikingXML files automatically. Link to the `XML Schema Definition for VikingXML`_ Viking has not been tested against a lot of different input and does not yet have robust error reporting. We recommend testing after adding each element and not deviating too much from the sample below at first. Please let Dr. James Anderson know if you encounter trouble (james.r.anderson at utah.edu). Sample VikingXML ================ Below is an example `snippet of VikingXML`_ which loads one section of our RC1 volume::
VikingXML Element Documentation =============================== Volume ------ Required element which contains all information about the volume and optionally points to the VikigXML schema definition. :: :Name: The name of the volume. :num_stos: Optional, the number of stos tags in the volume. Only used for loading progress bar and will eventually be removed. :num_sections: Optional, the number of section tags in the volume. Only used for loading progress bar and will eventually be removed. :path: Required, the URL of the root path of the volume. Only used when VikingXML is loaded from local disk. stos ---- Optional element which defines a slice-to-slice transform (stos). These are used to tell Viking how to warp from section space to volume space. All attributes are required. :: :mappedSection: The section being transformed :controlSection: The section not being transformed :pixelSpacing: stos files are rarely generated against the full-resolution data. This value tells viking how much the coordinates should be scaled by to match the actual image dimensions. :type: The type of transform to use, currently always use "grid". :path: Relative path from Volume path to the stos file containing transformation data. Section ------- The section tag describes a slice in the volume at a specific z depth. If there are no section tags there are no images in the volume. ::
:name: Friendly name of the section. Defaults to section number. I recommend using section number because I haven't tested anything else. :number: Integer, numbers should be sequential according to the order in which sections were cut. It is OK to skip numbers for lost sections. :path: Relative path from Volume path to the Section directory. Pyramid ------- Image pyramids are generated from the original images captured by an imaging platform. :: We use these image pyramids with the NCRToolset to generate transforms that describe where each tile in the pyramid is positioned in section space. In the pyramid each tile size is variable according to its source pyramid level. This makes for poor performance over the internet but is very useful for debugging the output of the NCRToolset over an intranet. :name: Name of the channel displayed in the Viking UI. :path: Relative path from the section path. Transform --------- Transforms are only applied to Pyramids. They are generated by the NCRToolset, using the ITK string formatting for transforms, and describe how each tile in a mosaic is positioned in the section. :: :Name: Name of the transform in the Viking UI :path: Relative path from the section path. :UseForVolume: Boolean, specifies that this transform is used to position tiles in the section before the are warped into the volume. Only the highest quality transform should have this set. :FilePrefix: String to prepend to all file names, if needed. A period is added after the file prefix. Traditionally we prepend the section number to tile names. Tiles are expected to be numbered with three digits. i.e. Section 1 Tile 243 = 0001.243.png :FilePostfix: Extension to add to file names, must be supported by XNA library. .png format recommended. Tileset ------- In a tileset all the images have a fixed size regardless of the level of the pyramid. We typically use 256x256 pixel tiles laid out on a grid with no overlap. This optimizes bandwidth use. Tile names include the grid position, i.e. X001_Y001.png :: :Name: Name of the channel displayed in the Viking UI :path: Relative path from the section path. :UseForVolume: Boolean, specifies that this transform is used to position tiles in the section before the are warped into the volume. Only the highest quality transform should have this set. :FilePrefix: String to prepend to all file names, if needed. A period is added after the file prefix. Traditionally we prepend the section number to tile names. Tiles are expected to be numbered with three digits. i.e. Section 1 Tile 243 = 0001.243.png :FilePostfix: Extension to add to file names, must be supported by XNA library. .png format recommended. :TileXDim: Pixel X dimensions of each tile :TileYDim: Pixel Y dimensions of each tile Level ----- Describes a level in a "tileset" or "pyramid" image pyramid. A level is a directory containing all of the original tiles downsampled by a common factor. :: :Level: A number defining what level of the pyramid this is. Must currently be a power of two. :path: Relative path from the tileset or pyramid path. :GridDimX: Tilesets only, Integer defining the dimensions of the grid in X :GridDimY: Tilesets only, Integer defining the dimensions of the grid in Y ChannelInfo ----------- Channel info is an optional element allowing volumes to define a default mix of channels for a section. This element can also be placed under the volume element to define a global default channel setup. Section channel configurations override volume channel configurations. :: Channel ------- Specifies a channel to display by default. :: :Section: The section to load the channel from, must be one of these values: Defines which section to load a channel from * **Selected**: Load images from the users currently selected section * **Fixed**: Load images from the specified section * **Above**: Load images from the reference section above the users selected section * *Below**: Load images from the reference section below the users selected section :Channel: The name of the channel, either a pyramid or tileset, to load, or "Selected" for user selected channel :Color: Color to use when displaying channel, specify as a web color i.e. #00ff00 .. _snippet of VikingXML: http://connectomes.utah.edu/Rabbit/Volume.VikingXML .. _XML Schema Definition for VikingXML:https://github.com/jamesra/Viking/VikingXML.xsd