<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2016-08-11 16:07 GMT+02:00 Mike Chinander <span dir="ltr"><<a href="mailto:chinander@gmail.com" target="_blank">chinander@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I was going to suggest something along this line. What happens if you use vtkVolumeRayCastMapper instead of <span style="font-size:12.8px">vtkGPUVolumeRayCastMapper (not as a solution to your problem but to narrow down what is causing your problem).</span></div></blockquote><div><br></div><div>I was going to try that, but since vtkVolumeRayCastMapper does not support rendering float data directly, I'd have to convert my two test files to unsigned short instead, and also store it in a different format, since my HDF5 reader is pretty basic and only works with float input and output so far.<br><br></div><div>I might do that actually, since I'm suspecting more and more that this might be the issue.<br><br>volumeMapper->GetMaxMemoryInBytes() reports 128 MB, of which I think it'll use 75% by default, so 96 MB. Anyone know off-hand if this would be too little GPU memory to render a 2500x300x300 volume?<br><br></div><div>In any case, shouldn't VTK print some error if it can't allocate enough GPU memory? In fact, I seem to remember getting some error like that in the past. With my problematic volume in this case, VTK is not printing anything.<br><br></div><div>I'll try to find a machine with more powerful graphics and try my test case there. If someone has the time to try it on their machine though, I'd appreciate it a lot. It only requires VTK7 with OpenGL2 rendering backend and the HDF5 library (C++ interface) to compile.<br><br></div><div>Elvis<br></div><div><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span class=""><font color="#888888"><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">--Mike Chinander</span></div></font></span></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Thu, Aug 11, 2016 at 7:44 AM, Elvis Stansvik <span dir="ltr"><<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="h5"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>2016-08-11 13:26 GMT+02:00 Elvis Stansvik <span dir="ltr"><<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>></span><wbr>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>2016-08-11 11:37 GMT+02:00 Elvis Stansvik <span dir="ltr"><<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>></span><wbr>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>2016-08-11 11:18 GMT+02:00 Elvis Stansvik <span dir="ltr"><<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>></span><wbr>:<br></span><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div>Hi all,<br><br></div>I'm wrestling with a volume rendering problem.<br><br></div>I've set up a very basic pipeline that just renders a volume.<br><br></div><div>As source it uses a custom reader I wrote that loads a volume from a HDF5 dataset (float).<br><br>It seemed to be working fine with the volume I had been testing with (see attached works_fine.png), which was a 120x120x2000. In addition to the the rendering itself, the screenshot shows a histogram plot I was using for debugging, as well as some editor controls I use to modify the color/opacity transfer function.<br><br></div><div>I then tested with another volume which is larger (300x300x5000), but apart from that has pretty much the same characteristic for its scalar values as the first one, and all of a sudden I don't see anything. See the attached not_working.png, which shows the setup using the problematic volume.<br><br></div><div>As you can in the histogram, there's a lot of voxel values roughly around 1, much like in the first volume, so I would expect that with the same transfer functions (black color, and an opacity ramp from 0.0,0.0 up to 5.0,1.0), I should see _something_.<br><br></div><div>I'm pretty sure I'm missing something basic here, but does anyone have an idea why I get the expected rendering with my smaller volume, but not with the bigger one?<br><br></div><div>Thanks a lot for any advice!<span><font color="#888888"><br></font></span></div></div></blockquote><div><br></div></span><div>Sorry, shortly after sending this I think I got one step closer to an explanation. The file from which I load this second, larger, volume is actually a concatenation of several files, and I just tried loading one of the files separately and it worked fine (the rendering looks as expected). So something is probably wrong in the script I use for concatenating HDF5 files. I'll do some digging there.<span><font color="#888888"><br></font></span></div></div></div></div></blockquote><div><br></div></span><div>There seems to be nothing wrong with the concatenation script I'm using. I've now tried creating smaller volumes by not concatenating the full set of files, and up until a resulting volume of around ~2500x300x300 it works okay, but if I extend the volume more than that, the rendering fails like described previously. It's quite strange :/ And I don't think I'm hitting some out-of-memory condition inside VTK, since it normally prints nice errors and crashes if that happens.<span><font color="#888888"><br></font></span></div></div></div></div></blockquote><div><br></div></span><div>I'm beginning to think that maybe I'm running out of graphics memory? Could this be a symptom of that?<br><br></div><div>I've now created a minimal test case, and would very much appreciate if someone could try it out to see if they get the same problem:<br><br></div><div>Download<br><br>   <a href="https://drive.google.com/open?id=0B1a2u6qVxaL7M1B6bFhreE1RQW8" target="_blank">https://drive.google.com/open?<wbr>id=0B1a2u6qVxaL7M1B6bFhreE1RQW<wbr>8</a><br><br></div><div>and extract the .tar archive (162 MB since it includes two volumes). Then<br><br></div><div>   cmake .<br></div><div>   make<br></div><div>   ./voltest working.hdf5<br></div><div>   ./voltest not_working.hdf5<br><br></div><div>For me, rendering of working.hdf5 works, but not rendering of not_working.hdf5. Is that the case also for you?<br><br></div><div>The only difference between the two volumes is that not_working.hdf5 is slightly larger than working.hdf5 (2500 voxels high vs 2000). Apart from that they were both created in the same way.<br><br></div><div>Thanks a lot in advance,<br></div><div>Elvis<br><br></div><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><span><font color="#888888"><br></font></span></div><span><font color="#888888"><div>Elvis<br></div></font></span><span><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><span><font color="#888888"><br></font></span></div><span><font color="#888888"><div>Elvis<br></div></font></span><span><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><span><font color="#888888"><br></font></span></div><span><font color="#888888"><div>Elvis<br></div></font></span><div><br></div><div>PS. If you're confused by the range of the vtkAxisActor that you see in the screenshots, when comparing to the the volume sizes I stated above, it's because my custom render currently hardcodes the spacing to 0.2. DS.<br></div></div>
</blockquote></span></div><br></div></div>
</blockquote></span></div><br></div></div>
</blockquote></span></div><br></div></div>
<br></div></div><span class="">______________________________<wbr>_________________<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/opensou<wbr>rce/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_FA<wbr>Q</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=<wbr>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/mail<wbr>man/listinfo/vtkusers</a><br>
<br></span></blockquote></div><br></div>
</blockquote></div><br></div></div>