<div dir="ltr"><div class="markdown-here-wrapper" data-md-url="groups.google.com" style="" markdown-here-wrapper-content-modified="true"><p style="margin: 1.2em 0px !important;">It looks like the lobster and bonsai can be downloaded directly as raw volumes (8 bit only, but will serve these purposes perfectly well) here:<br><a href="http://www.volvis.org/">http://www.volvis.org/</a></p>
<p style="margin: 1.2em 0px !important;">This simple wrapper for <code style="font-size: 0.85em; font-family: Consolas, Inconsolata, Courier, monospace;margin: 0px 0.15em; padding: 0px 0.3em; white-space: pre-wrap; border: 1px solid rgb(234, 234, 234); border-radius: 3px; display: inline; background-color: rgb(248, 248, 248);">np.fromfile</code> will load them</p>
<pre style="font-size: 0.85em; font-family: Consolas, Inconsolata, Courier, monospace;font-size: 1em; line-height: 1.2em;margin: 1.2em 0px;"><code class="hljs language-python" style="font-size: 0.85em; font-family: Consolas, Inconsolata, Courier, monospace;margin: 0px 0.15em; padding: 0px 0.3em; white-space: pre-wrap; border: 1px solid rgb(234, 234, 234); border-radius: 3px; display: inline; background-color: rgb(248, 248, 248);white-space: pre; overflow: auto; border-radius: 3px; border: 1px solid rgb(204, 204, 204); padding: 0.5em 0.7em;display: block; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 255);"><span class="hljs-function"><span class="hljs-keyword">import numpy as np


def</span> <span class="hljs-title">loadraw</span><span class="hljs-params">(rawfile, shape=None, dtype=np.uint8)</span>:</span>
    <span class="hljs-string">"""
    Load RAW volume to a NumPy array.

    Parameters
    ----------
    rawfile : string
        Path to *.raw volume.
    shape : tuple
        Shape of the volume. If not provided, output will be a rank-1 stream
        which can be reshaped as desired.
    dtype : NumPy dtype
        Dtype of the raw image volume.
    """</span>        
    vol = np.fromfile(rawfile, dtype=dtype)

    <span class="hljs-keyword">if</span> shape <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> <span class="hljs-keyword">None</span>:
        vol = vol.reshape(shape)

    <span class="hljs-keyword">return</span> vol
</code></pre>
<p style="margin: 1.2em 0px !important;">For the lobster, use <code style="font-size: 0.85em; font-family: Consolas, Inconsolata, Courier, monospace;margin: 0px 0.15em; padding: 0px 0.3em; white-space: pre-wrap; border: 1px solid rgb(234, 234, 234); border-radius: 3px; display: inline; background-color: rgb(248, 248, 248);">shape=(56, 324, 301)</code> and recall the voxel spacing has a ratio of 1.4:1:1<br>For the bonsai, use <code style="font-size: 0.85em; font-family: Consolas, Inconsolata, Courier, monospace;margin: 0px 0.15em; padding: 0px 0.3em; white-space: pre-wrap; border: 1px solid rgb(234, 234, 234); border-radius: 3px; display: inline; background-color: rgb(248, 248, 248);">shape=(256, 256, 256)</code> and the volume is isotropic (1:1:1 spacing)</p><p style="margin: 1.2em 0px !important;"><br></p>
<p style="margin: 1.2em 0px !important;">On Monday, November 9, 2015 at 8:42:26 PM UTC-5, stefanv wrote:</p>
<p style="margin: 1.2em 0px !important;"></p><div class="markdown-here-exclude"><p></p><blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Hi Kevin
<br>
<br>On 2015-11-07 09:46:17, 'Kevin Keraudren' via scikit-image <<a href="mailto:scikit-image@googlegroups.com" target="_blank" rel="nofollow">scikit-image@googlegroups.com</a><wbr>> wrote:
<br>> I don’t want to volunteer for this project, but I just wanted to
<br>> mention that the 3D skeletonization from ITK is easily accessible to
<br>> Python through SimpleITK, see example below for the lobster
<br>> dataset. SimpleITK could be used for comparison or validation of the
<br>> proposed scikit-image algorithm.
<br>
<br>Thanks for the pointer.  In this case, one of the purposes of the
<br>exercise is to stay away from a heavy dependency such as ITK.
<br>
<br>> PS: is there another way to load those *.pvm datasets in Python
<br>> without converting them to raw and hardcoding the image dimension and
<br>> pixel type? An skimage.io.imread() plugin?
<br>
<br>I have no idea about .pvm files, but perhaps we should start a set of
<br>plugin gists on the wiki somewhere?
<br>
<br>Stéfan
<br></blockquote><p></p></div><p style="margin: 1.2em 0px !important;"></p>
<div title="MDH:SXQgbG9va3MgbGlrZSB0aGUgbG9ic3RlciBhbmQgY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