<div dir="ltr">Hi Aashish,<br><div class="gmail_extra"><br><div class="gmail_quote">2016-02-10 18:12 GMT+01:00 Aashish Chaudhary <span dir="ltr"><<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Sun, Feb 7, 2016 at 5:41 AM, Elvis Stansvik <span dir="ltr"><<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div>Hi all,<br><br>As I tried to explain in a previous mail<br><br> <a href="http://markmail.org/message/mfp2npib5nqeeuux" target="_blank">http://markmail.org/message/mfp2npib5nqeeuux</a><br><br></div>I have a large amount of volume data, and I need to render only a small part of it.<br><br></div>I've been trying to find information on the streaming visualization pipeline that VTK supports, but it's been a bit hard to find examples similar what I want to do.<br><br></div>My questions right now are:<br><br></div>1) Is there some file format for volume data which is supported by VTK with a reader that is "intelligent" enough to only read the parts of the file that is requested by downstream consumers into main memory? That is, is there something I could use so that my use case would work "out of the box". If there is, I'm prepared to make sure the output from our analysis is in this format, as it would save me from writing a custom reader.<br></div></div></div></div></div></div></div></div></div></div></div></div></blockquote><div><br></div></span><div>AMR data structure might help (<a href="http://www.vtk.org/doc/nightly/html/classvtkAMRVolumeMapper.html#details" target="_blank">http://www.vtk.org/doc/nightly/html/classvtkAMRVolumeMapper.html#details</a>). <br></div></div></div></div></blockquote><div><br></div><div>Hm, the "detailed description" you linked is essentially empty. I'll do some googling, as I don't even know what AMR is. Thanks for the pointer though!<br><br></div><div>In general I've begun to realize that most class docs in VTK are either very brief or essentially empty. It makes it extremely hard to work with the library as a newcomer. There are a few blog posts and wiki pages around, but it's a mix of outdated and up-to-date info, and the almost total lack of class docs or high-level documents is quite discouraging :(<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><br></div>2) If there isn't, does anyone know of an example reader somewhere that has this intelligence? I'm prepared to write my own reader, but would really like a good example of how such a reader can be written.<br></div></div></div></div></div></div></div></div></div></div></div></blockquote><div><br></div></span><div>I believe some of the VTK image filter do this kind of work but I have to look into it. </div></div></div></div></blockquote><div><br></div><div>Yes, I started looking into the MINC reader which we're using in a prototype, and it seems it tries to respect the extends requested by downstream. I'm not 100% sure though.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div><div><div><br></div>3) I assume that all parts of the pipeline I set up must be capable of working with partial data (extents in my case) for this to work? That is, I obviously can't have something in the pipeline which is a "bad citizen" and spoils it, causing the pipeline to request all the data. Is there a list of which classes that supports this? Or are all filters et.c. in VTK well-written in the sense that they will only request the minimal amount of data they need, based on downstream requirements?<br></div></div></div></div></div></div></div></div></div></div></blockquote><div><br></div></span><div>I believe so.<br></div></div></div></div></blockquote><div><br></div><div>Sorry for bunching several questions together like I did here. I assume your answer was to the last question?<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div><div><br></div>4) If I set the volume of interest for a volume using a vtkExtractVOI, will the information about which piece of the volume is required reach the source (reader) at the start of the pipeline?</div></div></div></div></div></div></div></div></div></blockquote><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div><br></div>5) I was planning on having a pipeline that looks roughly like<br><br></div> Reader ----> Extract VOI ----> Do stuff ---> View1<br> \<br></div> +------> Extract VOI ----> Do other stuff ---> View2<br><br></div>where each of the two views show a different part of the full volume. One of the views is scrollable, and the idea is that when the user scrolls that view, the VOI is updated and that branch of the pipeline is re-executed. Only the required data should be loaded from disk into main memory when this happens. Is this kind of setup possible? Or will I have to use two completely separate pipelines?<br></div></div></div></div></div></blockquote><div><br></div></span><div>It depends how you write the code (are you setting data to mapper or you are connecting it to a pipeline?). </div></div></div></div></blockquote><div><br></div><div>Hm, I'm not sure I understand. The above was a conceptual sketch of a pipeline. I assume I would have mappers somewhere at the end of the two branches above, around "View1" and "View2". Each of these mappers would be connected to a branch of the pipeline.<br><br></div><div>I don't think I would "set the data" in any way, but try to use the streaming nature of the VTK pipeline.<br><br></div><div>Thanks a lot for taking the time to answer.<br><br></div><div>Elvis<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class=""><div dir="ltr"><div><div><div><div><br></div>6) If it turns out there are no built-in file formats where the reader supports loading parts of the data from the file on disk based on downstream requirements, I'm leaning towards making our own HDF5-based format + reader (I believe the full volume will be around 50-100 GB of data), since I think (but I'm not sure) that it's possible to only read parts of a 3D array from a HDF5 file using h5py. Does anyone else have a good suggestion for a file format, or have you been in a similar situation?<br><br></div>Very grateful for any advice.<br><br></div>Best regards,<br></div>Elvis<br></div>
<br></span>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><font face="trebuchet ms, sans-serif"><i>| Aashish Chaudhary <br>| Technical Leader <br>| Kitware Inc. <br></i></font><div><i><font face="trebuchet ms, sans-serif">| </font><a href="http://www.kitware.com/company/team/chaudhary.html" target="_blank">http://www.kitware.com/company/team/chaudhary.html</a></i></div></div></div>
</font></span></div></div>
</blockquote></div><br></div></div>