VES/KiwiViewer Scene File: Difference between revisions

From KitwarePublic
< VES
Jump to navigationJump to search
Line 42: Line 42:
===Specifying a filename===
===Specifying a filename===


The filename specified is relative to the <b>.kiwi</b> scene file.  For example, loading the scene file <i>/sdcard/Documents/test.kiwi</i> that specifies a filename <i>models/foo.vtk</i> will open the file <i>/sdcard/Documents/models/foo.vtk</i>  When downloading datasets from URL and saving them to local storage, subdirectories will be created if they are specified in the filename.
The filename specified is relative to the <b>.kiwi</b> scene file.  For example, loading the scene file <i>/sdcard/Documents/test.kiwi</i> that specifies a filename <i>models/foo.vtk</i> will open the file <i>/sdcard/Documents/models/foo.vtk</i>. When downloading datasets from URL and saving them to local storage, subdirectories will be created if they are specified in the filename.

Revision as of 15:06, 14 February 2012

Introduction

KiwiViewer can load scenes consisting of multiple datasets by reading a scene description file. The file has a simple comma-separated-value format.

File extension

The scene description file extension should be .kiwi.

Separators

Each field should be separated by a comma without leading or trailing spaces. Fields are not quoted.

Headers

The first row of the file contains text column headers, separated by comma. The order of the columns does not matter. The file may contain extra columns, they will be ignored. The only required header is filename. The available headers are: filename, url, r, g, b, a. The r, g, b columns specify the dataset color. The a column specifies alpha (transparency). Color and alpha are specified using decimal numbers between 0.0 and 1.0. If color is not specified, it will default to white. If alpha is not specified, it defaults to 1.

Example Files

This file specifies two datasets:

filename
foo.vtk
bar.vtk

This file specifies two datasets. The datasets will be downloaded from URLs and saved to local storage.

filename,url
foo.vtk,http://example.com/foo.vtk
bar.vtk,http://example.com/bar.vtk

This file specifies one dataset that will be green and translucent.

filename,r,g,b,a
foo.vtk,0,1,0,0.5

Specifying a URL

You can specify a url column to download datasets. The file must still have the filename column. The dataset will be downloaded from the URL and saved to local storage using the value specified in the filename column. If the scene file is loaded again in the future, and the file still exists on local storage, it will not be downloaded again.

Specifying a filename

The filename specified is relative to the .kiwi scene file. For example, loading the scene file /sdcard/Documents/test.kiwi that specifies a filename models/foo.vtk will open the file /sdcard/Documents/models/foo.vtk. When downloading datasets from URL and saving them to local storage, subdirectories will be created if they are specified in the filename.