VES/KiwiViewer Scene File: Difference between revisions

From KitwarePublic
< VES
Jump to navigationJump to search
No edit summary
No edit summary
Line 15: Line 15:
<pre>
<pre>
filename
filename
foo.obj
foo.vtk
bar.obj
bar.vtk
</pre>
</pre>


Line 22: Line 22:
<pre>
<pre>
filename,url
filename,url
foo.obj,http://example.com/foo.obj
foo.vtk,http://example.com/foo.vtk
bar.obj,
bar.vtk,
</pre>
</pre>


Line 29: Line 29:
<pre>
<pre>
filename,r,g,b,a
filename,r,g,b,a
foo.obj,0,1,0,0.5
foo.vtk,0,1,0,0.5
</pre>
</pre>


Line 38: Line 38:
===Specifying a filename===
===Specifying a filename===


The filename specified is relative to the <b>.kiwi</b> scene file.  For examaple, loading the scene file <i>/sdcard/Documents/test.kiwi</i> that specifies a filename <i>models/foo.obj</i> will open the file <i>/sdcard/Documents/models/foo.obj</i>
The filename specified is relative to the <b>.kiwi</b> scene file.  For examaple, 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>

Revision as of 20:26, 13 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. The 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 first dataset will be downloaded from a URL, the second will not be.

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

Thils 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 examaple, loading the scene file /sdcard/Documents/test.kiwi that specifies a filename models/foo.vtk will open the file /sdcard/Documents/models/foo.vtk