Difference between revisions of "MIDX examples"

From
Jump to: navigation, search
(Created page with "### Two overlapping 2kbit1 ``` <dataset typename='IdxMultipleDataset'> <dataset url='file://$(CurrentFileDirectory)/../2kbit1/zip/rowmajor/visus.idx' name='first'> <M>...")
 
(Affine transformation of a dataset)
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
### Two overlapping 2kbit1
+
MIDX is an XML metadata file which defines how multiple IDX files are combined in on single dataset. This, for example, allows dynamic blending of the content of different volumes or also to perform operations (e.g., scripting) using different fields from different data sources.
  
```
+
=== Affine transformation of a dataset ===
<dataset typename='IdxMultipleDataset'>
 
  
  <dataset url='file://$(CurrentFileDirectory)/../2kbit1/zip/rowmajor/visus.idx' name='first'>
+
<pre>
    <M><translate x='0' y='0' z='0'/></M>
+
&lt;dataset typename='IdxMultipleDataset'&gt;
  </dataset>
 
  
   <dataset url='file://$(CurrentFileDirectory)/../2kbit1/zip/rowmajor/visus.idx' name='second'>
+
   &lt;dataset url='file://$(CurrentFileDirectory)/datasets/visus.idx' name='first'&gt;
     <M><translate x='0' y='0' z='0'/></M>
+
     <M value="2.5 0.0 0.0 0.0 0.0 1.875 0.0 0.0 0.0 0.0 1 0.0 0.0 0.0 0.0 1.0"/>
   </dataset>
+
   &lt;/dataset&gt;
 
    
 
    
</dataset>
+
&lt;/dataset&gt;</pre>
```
 
  
### Two visible males side by side:
+
=== Two overlapping datasets ===
  
```
+
<pre>&lt;dataset typename='IdxMultipleDataset'&gt;
<dataset typename='IdxMultipleDataset'>
 
  
   <dataset url='file://$(CurrentFileDirectory)/../male/visus.idx' name='first'>
+
   &lt;dataset url='file://$(CurrentFileDirectory)/../2kbit1/zip/rowmajor/visus.idx' name='first'&gt;
     <M>
+
     &lt;M&gt;&lt;translate x='0' y='0' z='0'/&gt;&lt;/M&gt;
      <translate x='0' y='0' z='0'/>
+
   &lt;/dataset&gt;
      <scale    x='1' y='1' z='3'/>
 
    </M>
 
   </dataset>
 
  
   <dataset url='file://$(CurrentFileDirectory)/../male/visus.idx' name='second'>
+
   &lt;dataset url='file://$(CurrentFileDirectory)/../2kbit1/zip/rowmajor/visus.idx' name='second'&gt;
     <M>
+
     &lt;M&gt;&lt;translate x='0' y='0' z='0'/&gt;&lt;/M&gt;
      <translate x='2048' y='0' z='0'/>
+
   &lt;/dataset&gt;
      <scale    x='1'    y='1' z='3'/>
 
    </M>
 
   </dataset>
 
 
    
 
    
</dataset>
+
&lt;/dataset&gt;</pre>
  
```
+
=== Two datasets side by side: ===
  
### 2kbit1 overlapping Borg?time=13
+
<pre>&lt;dataset typename='IdxMultipleDataset'&gt;
  
```
+
  &lt;dataset url='file://$(CurrentFileDirectory)/../male/visus.idx' name='first'&gt;
<dataset typename='IdxMultipleDataset'>
+
    &lt;M&gt;
 +
      &lt;translate x='0' y='0' z='0'/&gt;
 +
      &lt;scale    x='1' y='1' z='3'/&gt;
 +
    &lt;/M&gt;
 +
  &lt;/dataset&gt;
  
   <dataset url='file://$(CurrentFileDirectory)/../2kbit1/zip/rowmajor/visus.idx' name='first'>
+
   &lt;dataset url='file://$(CurrentFileDirectory)/../male/visus.idx' name='second'&gt;
     <M><translate x='0' y='0' z='0'/></M>
+
     &lt;M&gt;
  </dataset>
+
      &lt;translate x='2048' y='0' z='0'/&gt;
 
+
      &lt;scale     x='1'   y='1' z='3'/&gt;
  <dataset url='file://$(CurrentFileDirectory)/../borg/visus.idx?time=13' name='second'>
+
    &lt;/M&gt;
     <M><translate x='0' y='0' z='0'/></M>
+
   &lt;/dataset&gt;
   </dataset>
 
 
    
 
    
</dataset>
+
&lt;/dataset&gt;
```
+
</pre>
  
### Blend David timesteps
+
=== Datasets overlapping with time query ===
  
 +
<pre>&lt;dataset typename='IdxMultipleDataset'&gt;
  
```
+
   &lt;dataset url='file://$(CurrentFileDirectory)/../2kbit1/zip/rowmajor/visus.idx' name='first'&gt;
<dataset typename='IdxMultipleDataset'>
+
    &lt;M&gt;&lt;translate x='0' y='0' z='0'/&gt;&lt;/M&gt;
   <dataset url='file://$(CurrentFileDirectory)/../david_subsampled/visus.idx?time=0' name='0' />
+
  &lt;/dataset&gt;
  <dataset url='file://$(CurrentFileDirectory)/../david_subsampled/visus.idx?time=1' name='1' />
 
  <dataset url='file://$(CurrentFileDirectory)/../david_subsampled/visus.idx?time=2' name='2' />
 
  <dataset url='file://$(CurrentFileDirectory)/../david_subsampled/visus.idx?time=3' name='3' />
 
</dataset>
 
```
 
  
### Local MIDX. No caching
+
  &lt;dataset url='file://$(CurrentFileDirectory)/../borg/visus.idx?time=13' name='second'&gt;
 +
    &lt;M&gt;&lt;translate x='0' y='0' z='0'/&gt;&lt;/M&gt;
 +
  &lt;/dataset&gt;
 
    
 
    
```
+
&lt;/dataset&gt;</pre>
<dataset name="Example" url="file://./docs/examples/midx/visus.midx">
+
 
  <access name="MultipleAccess" type="MultipleAccess">
+
=== Blending multiple timesteps ===
    <A type='disk' chmod='r' url='file://./docs/examples/midx/A/visus.idx' />
+
 
    <B type='disk' chmod='r' url='file://./docs/examples/midx/B/visus.idx' />
+
<pre>&lt;dataset typename='IdxMultipleDataset'&gt;
    <C type='disk' chmod='r' url='file://./docs/examples/midx/C/visus.idx' />
+
  &lt;dataset url='file://$(CurrentFileDirectory)/../david_subsampled/visus.idx?time=0' name='0' /&gt;
    <D type='disk' chmod='r' url='file://./docs/examples/midx/D/visus.idx' />
+
  &lt;dataset url='file://$(CurrentFileDirectory)/../david_subsampled/visus.idx?time=1' name='1' /&gt;
  </access> 
+
  &lt;dataset url='file://$(CurrentFileDirectory)/../david_subsampled/visus.idx?time=2' name='2' /&gt;
</dataset>
+
  &lt;dataset url='file://$(CurrentFileDirectory)/../david_subsampled/visus.idx?time=3' name='3' /&gt;
```
+
&lt;/dataset&gt;</pre>
###  Local MIDX. Local IDX block caching
 
  
Note that is useless to create two local copies of child datasets.
+
=== Local MIDX. No caching ===
It would make more sense if you had remote datasets.
 
  
``` 
+
<pre>&lt;dataset name=&quot;Example&quot; url=&quot;file://./docs/examples/midx/visus.midx&quot;&gt;
<dataset name="Example" url="file://./docs/examples/midx/visus.midx">
+
   &lt;access name=&quot;MultipleAccess&quot; type=&quot;MultipleAccess&quot;&gt;
   <access name="MultipleAccess" type="MultipleAccess">
+
     &lt;A type='disk' chmod='r' url='file://./docs/examples/midx/A/visus.idx' /&gt;
     <A type='multiplex'>
+
     &lt;B type='disk' chmod='r' url='file://./docs/examples/midx/B/visus.idx' /&gt;
      <access type='disk' chmod='rw' url="file://$(VisusCacheDirectory)/A/visus.idx" />
+
     &lt;C type='disk' chmod='r' url='file://./docs/examples/midx/C/visus.idx' /&gt;
      <access type='disk' chmod='r' url='file://./docs/examples/midx/A/visus.idx' />
+
     &lt;D type='disk' chmod='r' url='file://./docs/examples/midx/D/visus.idx' /&gt;
    </A>
+
   &lt;/access&gt; 
     <B type='multiplex'>
+
&lt;/dataset&gt;  </pre>
      <access type='disk' chmod='rw' url="file://$(VisusCacheDirectory)/B/visus.idx" />
+
=== Local MIDX. Local IDX block caching ===
      <access type='disk' chmod='r' url='file://./docs/examples/midx/B/visus.idx' />
 
    </B>
 
     <C type='multiplex'>
 
      <access type='disk' chmod='rw' url="file://$(VisusCacheDirectory)/C/visus.idx" />
 
      <access type='disk' chmod='r' url='file://./docs/examples/midx/C/visus.idx' />
 
    </C>
 
     <D type='multiplex'>
 
      <access type='disk' chmod='rw' url="file://$(VisusCacheDirectory)/D/visus.idx" />
 
      <access type='disk' chmod='r' url='file://./docs/examples/midx/D/visus.idx' />
 
    </D>
 
   </access>
 
</dataset>
 
```
 
  
### Local MIDX. Local MIDX block caching
+
Note that is useless to create two local copies of child datasets. It would make more sense if you had remote datasets.
 +
 
 +
<pre>&lt;dataset name=&quot;Example&quot; url=&quot;file://./docs/examples/midx/visus.midx&quot;&gt;
 +
  &lt;access name=&quot;MultipleAccess&quot; type=&quot;MultipleAccess&quot;&gt;
 +
    &lt;A type='multiplex'&gt;
 +
      &lt;access type='disk' chmod='rw' url=&quot;file://$(VisusCacheDirectory)/A/visus.idx&quot; /&gt;
 +
      &lt;access type='disk' chmod='r' url='file://./docs/examples/midx/A/visus.idx' /&gt;
 +
    &lt;/A&gt;
 +
    &lt;B type='multiplex'&gt;
 +
      &lt;access type='disk' chmod='rw' url=&quot;file://$(VisusCacheDirectory)/B/visus.idx&quot; /&gt;
 +
      &lt;access type='disk' chmod='r'  url='file://./docs/examples/midx/B/visus.idx' /&gt;
 +
    &lt;/B&gt;
 +
    &lt;C type='multiplex'&gt;
 +
      &lt;access type='disk' chmod='rw' url=&quot;file://$(VisusCacheDirectory)/C/visus.idx&quot; /&gt;
 +
      &lt;access type='disk' chmod='r'  url='file://./docs/examples/midx/C/visus.idx' /&gt;
 +
    &lt;/C&gt;
 +
    &lt;D type='multiplex'&gt;
 +
      &lt;access type='disk' chmod='rw' url=&quot;file://$(VisusCacheDirectory)/D/visus.idx&quot; /&gt;
 +
      &lt;access type='disk' chmod='r'  url='file://./docs/examples/midx/D/visus.idx' /&gt;
 +
    &lt;/D&gt;
 +
  &lt;/access&gt;
 +
&lt;/dataset&gt;  </pre>
 +
=== Local MIDX. Local MIDX block caching ===
  
 
All datasets must have the same IDX bitmask. Otherwise it won't work.
 
All datasets must have the same IDX bitmask. Otherwise it won't work.
  
```
+
<pre>&lt;dataset name=&quot;Example&quot; url=&quot;file://./docs/examples/midx/visus.midx&quot;&gt;
<dataset name="Example" url="file://./docs/examples/midx/visus.midx">
 
 
      
 
      
   <access name="DefaultAccess" type="multiplex" >
+
   &lt;access name=&quot;DefaultAccess&quot; type=&quot;multiplex&quot; &gt;
 
          
 
          
     <!-- here I do the up-midx caching -->
+
     &lt;!-- here I do the up-midx caching --&gt;
       <access type="DiskAccess" chmod='rw'  dir="./cached" compression="zip" />
+
       &lt;access type=&quot;DiskAccess&quot; chmod='rw'  dir=&quot;./cached&quot; compression=&quot;zip&quot; /&gt;
 
          
 
          
     <!-- child access -->
+
     &lt;!-- child access --&gt;
     <access name="MultipleAccess" type="MultipleAccess">
+
     &lt;access name=&quot;MultipleAccess&quot; type=&quot;MultipleAccess&quot;&gt;
       <A type='disk' chmod='r' url='file://./docs/examples/midx/A/visus.idx' />
+
       &lt;A type='disk' chmod='r' url='file://./docs/examples/midx/A/visus.idx' /&gt;
       <B type='disk' chmod='r' url='file://./docs/examples/midx/B/visus.idx' />
+
       &lt;B type='disk' chmod='r' url='file://./docs/examples/midx/B/visus.idx' /&gt;
       <C type='disk' chmod='r' url='file://./docs/examples/midx/C/visus.idx' />
+
       &lt;C type='disk' chmod='r' url='file://./docs/examples/midx/C/visus.idx' /&gt;
       <D type='disk' chmod='r' url='file://./docs/examples/midx/D/visus.idx' />
+
       &lt;D type='disk' chmod='r' url='file://./docs/examples/midx/D/visus.idx' /&gt;
     </access>
+
     &lt;/access&gt;
   </access>
+
   &lt;/access&gt;
</dataset>
+
&lt;/dataset&gt;</pre>
```
+
=== Remote MIDX. Local MIDX block caching ===
### Remote MIDX. Local MIDX block caching
 
  
 
Example for remote MIDX pin2d on atlantis:
 
Example for remote MIDX pin2d on atlantis:
  
```
+
<pre>&lt;dataset typename=&quot;IdxMultipleDataset&quot; url=&quot;file:///usr/sci/cedmav/LDAV/midx/pin2d.midx&quot;&gt;
<dataset typename="IdxMultipleDataset" url="file:///usr/sci/cedmav/LDAV/midx/pin2d.midx">
+
   &lt;dataset name=&quot;A&quot; url=&quot;$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;amp;dataset=pin2d/A&quot; /&gt;
   <dataset name="A" url="$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;dataset=pin2d/A" />
+
   &lt;dataset name=&quot;B&quot; url=&quot;$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;amp;dataset=pin2d/B&quot; /&gt;
   <dataset name="B" url="$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;dataset=pin2d/B" />
+
   &lt;dataset name=&quot;C&quot; url=&quot;$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;amp;dataset=pin2d/C&quot; /&gt;
   <dataset name="C" url="$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;dataset=pin2d/C" />
+
   &lt;dataset name=&quot;D&quot; url=&quot;$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;amp;dataset=pin2d/D&quot; /&gt;
   <dataset name="D" url="$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;dataset=pin2d/D" />
+
   &lt;dataset name=&quot;E&quot; url=&quot;$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;amp;dataset=pin2d/E&quot; /&gt;
   <dataset name="E" url="$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;dataset=pin2d/E" />
+
&lt;/dataset&gt;</pre>
</dataset>
+
The MIDX processing is done server side (example: fieldname is 'avg'). The client caches the MIDX blocks got from server.
```
 
  
The MIDX processing is done server side (example: fieldname is 'avg').
+
<pre>&lt;dataset name=&quot;Example&quot; url=&quot;http://atlantis.sci.utah.edu/mod_visus?dataset=pin2d&quot;&gt;
The client caches the MIDX blocks got from server. 
+
   &lt;access name=&quot;DiskAccess&quot; type='multiplex'&gt;
 
+
     &lt;access name=&quot;Example&quot; type=&quot;DiskAccess&quot; dir=&quot;./cached&quot; compression=&quot;zip&quot; /&gt;
```
+
     &lt;access type='network' chmod='r' compression='zip' url=&quot;http://atlantis.sci.utah.edu/mod_visus?dataset=pin2d&quot; /&gt;
<dataset name="Example" url="http://atlantis.sci.utah.edu/mod_visus?dataset=pin2d">
+
   &lt;/access&gt;
   <access name="DiskAccess" type='multiplex'>
+
&lt;/dataset&gt;  </pre>
     <access name="Example" type="DiskAccess" dir="./cached" compression="zip" />
+
=== Remote MIDX. Local IDX block caching ===
     <access type='network' chmod='r' compression='zip' url="http://atlantis.sci.utah.edu/mod_visus?dataset=pin2d" />
 
   </access>
 
</dataset>  
 
```
 
 
 
### Remote MIDX. Local IDX block caching
 
  
 
Example for remote MIDX pin2d on atlantis:
 
Example for remote MIDX pin2d on atlantis:
  
```
+
<pre>&lt;dataset typename=&quot;IdxMultipleDataset&quot; url=&quot;file:///usr/sci/cedmav/LDAV/midx/pin2d.midx&quot;&gt;
<dataset typename="IdxMultipleDataset" url="file:///usr/sci/cedmav/LDAV/midx/pin2d.midx">
+
   &lt;dataset name=&quot;A&quot; url=&quot;$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;amp;dataset=pin2d/A&quot; /&gt;
   <dataset name="A" url="$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;dataset=pin2d/A" />
+
   &lt;dataset name=&quot;B&quot; url=&quot;$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;amp;dataset=pin2d/B&quot; /&gt;
   <dataset name="B" url="$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;dataset=pin2d/B" />
+
   &lt;dataset name=&quot;C&quot; url=&quot;$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;amp;dataset=pin2d/C&quot; /&gt;
   <dataset name="C" url="$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;dataset=pin2d/C" />
+
   &lt;dataset name=&quot;D&quot; url=&quot;$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;amp;dataset=pin2d/D&quot; /&gt;
   <dataset name="D" url="$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;dataset=pin2d/D" />
+
   &lt;dataset name=&quot;E&quot; url=&quot;$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;amp;dataset=pin2d/E&quot; /&gt;
   <dataset name="E" url="$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;dataset=pin2d/E" />
+
&lt;/dataset&gt;</pre>
</dataset>
+
The server serves child IDX datasets. The child caches the child IDX datasets. The MIDX processing is done client side.
```
 
 
 
The server serves child IDX datasets.
 
The child caches the child IDX datasets.
 
The MIDX processing is done client side.
 
  
```
+
<pre>&lt;dataset name=&quot;Example&quot; url=&quot;http://atlantis.sci.utah.edu/mod_visus?dataset=pin2d&quot; &gt;
<dataset name="Example" url="http://atlantis.sci.utah.edu/mod_visus?dataset=pin2d" >
+
  &lt;access name=&quot;MultipleAccess&quot; type=&quot;MultipleAccess&quot;&gt;
  <access name="MultipleAccess" type="MultipleAccess">
+
   &lt;A type='multiplex'&gt;
   <A type='multiplex'>
+
   &lt;access type='disk' chmod='rw' url='file://./cached/A/visus.idx'  /&gt;
   <access type='disk' chmod='rw' url='file://./cached/A/visus.idx'  />
+
   &lt;access type='network' chmod='r' compression='zip' url=&quot;http://atlantis.sci.utah.edu/mod_visus?dataset=pin2d/A&quot; /&gt;
   <access type='network' chmod='r' compression='zip' url="http://atlantis.sci.utah.edu/mod_visus?dataset=pin2d/A" />
+
   &lt;/A&gt;
   </A>
+
   &lt;B type='multiplex'&gt;
   <B type='multiplex'>
+
   &lt;access type='disk' chmod='rw' url='file://./cached/B/visus.idx'  /&gt;
   <access type='disk' chmod='rw' url='file://./cached/B/visus.idx'  />
+
   &lt;access type='network' chmod='r' compression='zip' url=&quot;http://atlantis.sci.utah.edu/mod_visus?dataset=pin2d/B&quot; /&gt;
   <access type='network' chmod='r' compression='zip' url="http://atlantis.sci.utah.edu/mod_visus?dataset=pin2d/B" />
+
   &lt;/B&gt;
   </B>
+
   &lt;C type='multiplex'&gt;
   <C type='multiplex'>
+
   &lt;access type='disk' chmod='rw' url='file://./cached/C/visus.idx'  /&gt;
   <access type='disk' chmod='rw' url='file://./cached/C/visus.idx'  />
+
   &lt;access type='network' chmod='r' compression='zip' url=&quot;http://atlantis.sci.utah.edu/mod_visus?dataset=pin2d/C&quot; /&gt;
   <access type='network' chmod='r' compression='zip' url="http://atlantis.sci.utah.edu/mod_visus?dataset=pin2d/C" />
+
   &lt;/C&gt;
   </C>
+
   &lt;D type='multiplex'&gt;
   <D type='multiplex'>
+
   &lt;access type='disk' chmod='rw' url='file://./cached/D/visus.idx'  /&gt;
   <access type='disk' chmod='rw' url='file://./cached/D/visus.idx'  />
+
   &lt;access type='network' chmod='r' compression='zip' url=&quot;http://atlantis.sci.utah.edu/mod_visus?dataset=pin2d/D&quot; /&gt;
   <access type='network' chmod='r' compression='zip' url="http://atlantis.sci.utah.edu/mod_visus?dataset=pin2d/D" />
+
   &lt;/D&gt;
   </D>
+
   &lt;E type='multiplex'&gt;
   <E type='multiplex'>
+
   &lt;access type='disk' chmod='rw' url='file://./cached/E/visus.idx'  /&gt;
   <access type='disk' chmod='rw' url='file://./cached/E/visus.idx'  />
+
   &lt;access type='network' chmod='r' compression='zip' url=&quot;http://atlantis.sci.utah.edu/mod_visus?dataset=pin2d/E&quot; /&gt;
   <access type='network' chmod='r' compression='zip' url="http://atlantis.sci.utah.edu/mod_visus?dataset=pin2d/E" />
+
   &lt;/E&gt;  
   </E>  
+
  &lt;/access&gt;
  </access>
+
&lt;/dataset&gt;  </pre>
</dataset>  
 
```
 

Latest revision as of 16:11, 21 September 2018

MIDX is an XML metadata file which defines how multiple IDX files are combined in on single dataset. This, for example, allows dynamic blending of the content of different volumes or also to perform operations (e.g., scripting) using different fields from different data sources.

Affine transformation of a dataset

<dataset typename='IdxMultipleDataset'>

  <dataset url='file://$(CurrentFileDirectory)/datasets/visus.idx' name='first'>
    <M value="2.5 0.0 0.0 0.0 0.0 1.875 0.0 0.0 0.0 0.0 1 0.0 0.0 0.0 0.0 1.0"/>
  </dataset>
  
</dataset>

Two overlapping datasets

<dataset typename='IdxMultipleDataset'>

  <dataset url='file://$(CurrentFileDirectory)/../2kbit1/zip/rowmajor/visus.idx' name='first'>
    <M><translate x='0' y='0' z='0'/></M>
  </dataset>

  <dataset url='file://$(CurrentFileDirectory)/../2kbit1/zip/rowmajor/visus.idx' name='second'>
    <M><translate x='0' y='0' z='0'/></M>
  </dataset>
  
</dataset>

Two datasets side by side:

<dataset typename='IdxMultipleDataset'>

  <dataset url='file://$(CurrentFileDirectory)/../male/visus.idx' name='first'>
    <M>
      <translate x='0' y='0' z='0'/>
      <scale     x='1' y='1' z='3'/>
    </M>
  </dataset>

  <dataset url='file://$(CurrentFileDirectory)/../male/visus.idx' name='second'>
    <M>
      <translate x='2048' y='0' z='0'/>
      <scale     x='1'    y='1' z='3'/>
    </M>
  </dataset>
  
</dataset>

Datasets overlapping with time query

<dataset typename='IdxMultipleDataset'>

  <dataset url='file://$(CurrentFileDirectory)/../2kbit1/zip/rowmajor/visus.idx' name='first'>
    <M><translate x='0' y='0' z='0'/></M>
  </dataset>

  <dataset url='file://$(CurrentFileDirectory)/../borg/visus.idx?time=13' name='second'>
    <M><translate x='0' y='0' z='0'/></M>
  </dataset>
  
</dataset>

Blending multiple timesteps

<dataset typename='IdxMultipleDataset'>
  <dataset url='file://$(CurrentFileDirectory)/../david_subsampled/visus.idx?time=0' name='0' />
  <dataset url='file://$(CurrentFileDirectory)/../david_subsampled/visus.idx?time=1' name='1' />
  <dataset url='file://$(CurrentFileDirectory)/../david_subsampled/visus.idx?time=2' name='2' />
  <dataset url='file://$(CurrentFileDirectory)/../david_subsampled/visus.idx?time=3' name='3' />
</dataset>

Local MIDX. No caching

<dataset name="Example" url="file://./docs/examples/midx/visus.midx">
  <access name="MultipleAccess" type="MultipleAccess">
    <A type='disk' chmod='r' url='file://./docs/examples/midx/A/visus.idx' />
    <B type='disk' chmod='r' url='file://./docs/examples/midx/B/visus.idx' />
    <C type='disk' chmod='r' url='file://./docs/examples/midx/C/visus.idx' />
    <D type='disk' chmod='r' url='file://./docs/examples/midx/D/visus.idx' />
  </access>  
</dataset>  

Local MIDX. Local IDX block caching

Note that is useless to create two local copies of child datasets. It would make more sense if you had remote datasets.

<dataset name="Example" url="file://./docs/examples/midx/visus.midx">
  <access name="MultipleAccess" type="MultipleAccess">
    <A type='multiplex'>
      <access type='disk' chmod='rw' url="file://$(VisusCacheDirectory)/A/visus.idx" />
      <access type='disk' chmod='r'  url='file://./docs/examples/midx/A/visus.idx' />
    </A>
    <B type='multiplex'>
      <access type='disk' chmod='rw' url="file://$(VisusCacheDirectory)/B/visus.idx" />
      <access type='disk' chmod='r'  url='file://./docs/examples/midx/B/visus.idx' />
    </B>
    <C type='multiplex'>
      <access type='disk' chmod='rw' url="file://$(VisusCacheDirectory)/C/visus.idx" />
      <access type='disk' chmod='r'  url='file://./docs/examples/midx/C/visus.idx' />
    </C>
    <D type='multiplex'>
      <access type='disk' chmod='rw' url="file://$(VisusCacheDirectory)/D/visus.idx" />
      <access type='disk' chmod='r'  url='file://./docs/examples/midx/D/visus.idx' />
    </D>
  </access> 
</dataset>   

Local MIDX. Local MIDX block caching

All datasets must have the same IDX bitmask. Otherwise it won't work.

<dataset name="Example" url="file://./docs/examples/midx/visus.midx">
    
  <access name="DefaultAccess" type="multiplex" >
        
    <!-- here I do the up-midx caching -->
      <access type="DiskAccess" chmod='rw'  dir="./cached" compression="zip" />
        
    <!-- child access -->
    <access name="MultipleAccess" type="MultipleAccess">
      <A type='disk' chmod='r' url='file://./docs/examples/midx/A/visus.idx' />
      <B type='disk' chmod='r' url='file://./docs/examples/midx/B/visus.idx' />
      <C type='disk' chmod='r' url='file://./docs/examples/midx/C/visus.idx' />
      <D type='disk' chmod='r' url='file://./docs/examples/midx/D/visus.idx' />
    </access> 
  </access> 
</dataset>

Remote MIDX. Local MIDX block caching

Example for remote MIDX pin2d on atlantis:

<dataset typename="IdxMultipleDataset" url="file:///usr/sci/cedmav/LDAV/midx/pin2d.midx">
  <dataset name="A" url="$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;dataset=pin2d/A" />
  <dataset name="B" url="$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;dataset=pin2d/B" />
  <dataset name="C" url="$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;dataset=pin2d/C" />
  <dataset name="D" url="$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;dataset=pin2d/D" />
  <dataset name="E" url="$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;dataset=pin2d/E" />
</dataset>

The MIDX processing is done server side (example: fieldname is 'avg'). The client caches the MIDX blocks got from server.

<dataset name="Example" url="http://atlantis.sci.utah.edu/mod_visus?dataset=pin2d">
  <access name="DiskAccess"  type='multiplex'>
    <access name="Example" type="DiskAccess" dir="./cached" compression="zip" />
    <access type='network' chmod='r' compression='zip' url="http://atlantis.sci.utah.edu/mod_visus?dataset=pin2d" />
  </access> 
</dataset>   

Remote MIDX. Local IDX block caching

Example for remote MIDX pin2d on atlantis:

<dataset typename="IdxMultipleDataset" url="file:///usr/sci/cedmav/LDAV/midx/pin2d.midx">
  <dataset name="A" url="$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;dataset=pin2d/A" />
  <dataset name="B" url="$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;dataset=pin2d/B" />
  <dataset name="C" url="$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;dataset=pin2d/C" />
  <dataset name="D" url="$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;dataset=pin2d/D" />
  <dataset name="E" url="$(protocol)://$(hostname):$(port)/mod_visus?action=readdataset&amp;dataset=pin2d/E" />
</dataset>

The server serves child IDX datasets. The child caches the child IDX datasets. The MIDX processing is done client side.

<dataset name="Example" url="http://atlantis.sci.utah.edu/mod_visus?dataset=pin2d" >
 <access name="MultipleAccess" type="MultipleAccess">
  <A type='multiplex'>
   <access type='disk' chmod='rw' url='file://./cached/A/visus.idx'  />
   <access type='network' chmod='r' compression='zip' url="http://atlantis.sci.utah.edu/mod_visus?dataset=pin2d/A" />
  </A>
  <B type='multiplex'>
   <access type='disk' chmod='rw' url='file://./cached/B/visus.idx'  />
   <access type='network' chmod='r' compression='zip' url="http://atlantis.sci.utah.edu/mod_visus?dataset=pin2d/B" />
  </B>
  <C type='multiplex'>
   <access type='disk' chmod='rw' url='file://./cached/C/visus.idx'  />
   <access type='network' chmod='r' compression='zip' url="http://atlantis.sci.utah.edu/mod_visus?dataset=pin2d/C" />
  </C>
  <D type='multiplex'>
   <access type='disk' chmod='rw' url='file://./cached/D/visus.idx'  />
   <access type='network' chmod='r' compression='zip' url="http://atlantis.sci.utah.edu/mod_visus?dataset=pin2d/D" />
  </D>
  <E type='multiplex'>
   <access type='disk' chmod='rw' url='file://./cached/E/visus.idx'  />
   <access type='network' chmod='r' compression='zip' url="http://atlantis.sci.utah.edu/mod_visus?dataset=pin2d/E" />
  </E>  
 </access>
</dataset>