Difference between revisions of "ViSUS configuration file"

From
Jump to: navigation, search
(Access)
(More settings)
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Configuration File Location ==
+
A ViSUS configuration file contains a set of application configuration parameters and a list of datasets that also represent your bookmarks in [[ViSUS Viewer]].
  
The software's current strategy is to search the following locations in this order:
+
'''Configuration File Location'''
 +
 
 +
Every ViSUS application, on load, uses the following strategy to find the configuration file:
 
# location specified by --visus-config command line parameter
 
# location specified by --visus-config command line parameter
 
# current working directory
 
# current working directory
Line 9: Line 11:
 
# executable directory (very unusual deployment, but it doesn't hurt anything)
 
# executable directory (very unusual deployment, but it doesn't hurt anything)
  
== Configuration Options ==
+
== Bookmarks, datasets and scenes ==
  
A simple ViSUS configuration file would look like the following:
+
The bookmarks can refer to datasets on disk, remote or also to custom scenes that you saved from [[ViSUS Viewer]].
  
 +
Here is an example of a visus.config file of these three kind of datasets.
 
<pre>
 
<pre>
 
<visus>
 
<visus>
Line 22: Line 25:
  
 
     <!-- Saved scene -->
 
     <!-- Saved scene -->
     <scene url="file:///Users/username/data/my_scene.xml" permissions="public"/>
+
     <scene name="my_scene" url="file:///Users/username/data/my_scene.xml" permissions="public"/>
 
</visus>
 
</visus>
 
</pre>
 
</pre>
  
=== Access ===
+
Note: the visus.config file for a server should have always the attribute <code>permissions="public"</code> in the declaration of all the datasets that you want to expose.
 +
 
 +
=== Network Access and Caching ===
  
 
ViSUS can access the same data from both the network or a local cache on your disk. The cache allows faster (and offline) access to the data that already navigated using the viewer. Please notice that ViSUS only saves the timesteps and fields that you explored, not the entire dataset.
 
ViSUS can access the same data from both the network or a local cache on your disk. The cache allows faster (and offline) access to the data that already navigated using the viewer. Please notice that ViSUS only saves the timesteps and fields that you explored, not the entire dataset.
  
 
An important feature of the ViSUS framework is the ''caching''. Data streamed from the server can be cached on disk for later faster access.
 
An important feature of the ViSUS framework is the ''caching''. Data streamed from the server can be cached on disk for later faster access.
To enable this feature for a specific dataset we can define a dataset in the configuration file as following:
+
To enable this feature for a specific dataset we can define a multiple layer access as following:
  
 
<pre>
 
<pre>
Line 46: Line 51:
 
At the same time any data requested to the network layer will be cached on disk (at the specified URL).
 
At the same time any data requested to the network layer will be cached on disk (at the specified URL).
  
'''Note''': when frequent and fast access is required for specific dataset, enabling the ''caching'' is highly recommended.
+
'''Note''': when frequent and fast access is strictly required, enabling the ''caching'' is highly recommended.
  
 
'''Faster network access'''
 
'''Faster network access'''
 +
 
In order to speed up your network performance it is possible to use some special options in your access configurations:
 
In order to speed up your network performance it is possible to use some special options in your access configurations:
* nconnections
+
* ''nconnections'': enable parallel requests
* num_queries_per_request
+
* ''num_queries_per_request'': gather multiple block requests in a single query
 
+
* ''compression'': compress the data for transfer
This will enable parallel requests and gather multiple block requests in a single query.
 
  
 
Here is an example:
 
Here is an example:
Line 59: Line 64:
 
<access name="source" type="network" chmod="r" compression="zip" nconnections="4" num_queries_per_request="32"/>  
 
<access name="source" type="network" chmod="r" compression="zip" nconnections="4" num_queries_per_request="32"/>  
 
</pre>
 
</pre>
 +
 +
=== Memory usage ===
 +
 +
In the configuration we can set limits to the memory allocated by the viewer, defining the size of
 +
the memory we want to allocate, and the maximum usage.
 +
 +
<pre>
 +
<Configuration>
 +
      <GLMemory total="2gb" maximum_memory_allocation_factor="0.8"/>
 +
</Configuration>
 +
</pre>
 +
 +
=== Use a default scene for a dataset ===
 +
The scene that you save from the [[ViSUS Viewer]] can be used as default scene of a certain dataset. This way every time you open it all the saved selection and palette settings will be applied.
 +
 +
This can be done both locally and remotely setting the field ''(scene)'' in the .idx file of your dataset, as following:
 +
 +
(scene)
 +
file:///path/to/my/local/scene.scn
 +
 +
Or using a remote scene
 +
 +
(scene)
 +
http://yourserver.org/mod_visus?scene=dataset_scene_name
 +
 +
 +
=== More settings ===
 +
 +
You can configure more settings in the _Configuration_ section of your visus.config file, for example the background color, logo or the network requests configuration.
 +
 +
<syntaxhighlight lang="xml">
 +
  <Configuration>
 +
 
 +
  <VisusViewer background_color="255 255 255 255">
 +
  <Logo>
 +
      <BottomLeft alpha='0.8' filename='resources/cat_rgb.tga' />
 +
  </Logo>
 +
  </VisusViewer>
 +
   
 +
  <ModVisusAccess nconnections="8" num_queries_per_request="4"/>
 +
 +
</Configuration>
 +
</syntaxhighlight>

Latest revision as of 20:55, 6 December 2019

A ViSUS configuration file contains a set of application configuration parameters and a list of datasets that also represent your bookmarks in ViSUS Viewer.

Configuration File Location

Every ViSUS application, on load, uses the following strategy to find the configuration file:

  1. location specified by --visus-config command line parameter
  2. current working directory
  3. visus user directory (note: itunes-accessible documents directory on ios)
  4. resources directory (e.g. osx/ios bundle, same as cwd on other platforms)
  5. hardcoded path provided at compile time (e.g. for mod_visus default)
  6. executable directory (very unusual deployment, but it doesn't hurt anything)

Bookmarks, datasets and scenes

The bookmarks can refer to datasets on disk, remote or also to custom scenes that you saved from ViSUS Viewer.

Here is an example of a visus.config file of these three kind of datasets.

<visus>
    <!-- Local dataset --> 
    <dataset name="my_dataset" url="file:///Users/username/data/my_dataset.idx" permissions="public"/>

    <!-- Remote dataset -->
    <dataset name="2kbit1" url="http://atlantis.sci.utah.edu/mod_visus?dataset=2kbit1" permissions="public">

    <!-- Saved scene -->
    <scene name="my_scene" url="file:///Users/username/data/my_scene.xml" permissions="public"/>
</visus>

Note: the visus.config file for a server should have always the attribute permissions="public" in the declaration of all the datasets that you want to expose.

Network Access and Caching

ViSUS can access the same data from both the network or a local cache on your disk. The cache allows faster (and offline) access to the data that already navigated using the viewer. Please notice that ViSUS only saves the timesteps and fields that you explored, not the entire dataset.

An important feature of the ViSUS framework is the caching. Data streamed from the server can be cached on disk for later faster access. To enable this feature for a specific dataset we can define a multiple layer access as following:

  <dataset name="2kbit1" url="http://atlantis.sci.utah.edu/mod_visus?dataset=2kbit1" permissions="public">
     <access name="Multiplex" type="multiplex">
       <access name="cache"  type="disk" chmod="rw" url="$(VisusCacheDirectory)/2kbit1/visus.idx" />
       <access name="source" type="network" chmod="r" compression="zip" />
     </access> 
  </dataset> 

With these lines of code we created two layers of data access the first from the disk (e.g. the cache) and the other from the network. This will allow the application to search first on the disk for the requested data and in case of miss the request will be forwarded to the network. At the same time any data requested to the network layer will be cached on disk (at the specified URL).

Note: when frequent and fast access is strictly required, enabling the caching is highly recommended.

Faster network access

In order to speed up your network performance it is possible to use some special options in your access configurations:

  • nconnections: enable parallel requests
  • num_queries_per_request: gather multiple block requests in a single query
  • compression: compress the data for transfer

Here is an example:

<access name="source" type="network" chmod="r" compression="zip" nconnections="4" num_queries_per_request="32"/> 

Memory usage

In the configuration we can set limits to the memory allocated by the viewer, defining the size of the memory we want to allocate, and the maximum usage.

<Configuration>
      <GLMemory total="2gb" maximum_memory_allocation_factor="0.8"/>
</Configuration> 

Use a default scene for a dataset

The scene that you save from the ViSUS Viewer can be used as default scene of a certain dataset. This way every time you open it all the saved selection and palette settings will be applied.

This can be done both locally and remotely setting the field (scene) in the .idx file of your dataset, as following:

(scene)
file:///path/to/my/local/scene.scn

Or using a remote scene

(scene)
http://yourserver.org/mod_visus?scene=dataset_scene_name


More settings

You can configure more settings in the _Configuration_ section of your visus.config file, for example the background color, logo or the network requests configuration.

<Configuration>
  
  <VisusViewer background_color="255 255 255 255">
   <Logo>
      <BottomLeft alpha='0.8' filename='resources/cat_rgb.tga' />
   </Logo> 
  </VisusViewer>
     
  <ModVisusAccess nconnections="8" num_queries_per_request="4"/>

</Configuration>