<div dir="ltr"><div>There is a VTK journal publication that claims to render multiple volumes:</div><a href="http://www.vtkjournal.org/browse/publication/856">http://www.vtkjournal.org/browse/publication/856</a><div>Is there anything of significance there?</div><div><br></div><div> - David</div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 4, 2016 at 6:27 AM, Jaime Campos <span dir="ltr"><<a href="mailto:jaimefbc@gmail.com" target="_blank">jaimefbc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello everyone, <div><br></div><div>I'm a new subscriber to this mailing list and I was reading this thread, and I'm also interested in this functionality.</div><div>Currently I am using vtkOpenGLVolumeTextureMapper3D for two different volumes that intersect in 3D space, and it happens to render the volumes correctly by blending opacities and doing the correct compositioning (because of the slicing it does internally, I believe, though not being perfect). This also allows me to pick and interact with the vtkVolume props independently, which is a must have for the functionality I am developing. </div><div><br></div><div>The problem, as far as I know, is that with VTK 7.0 new rendering backend (OpenGL 2), this mapper is no longer supported and the new GPU mappers available, unfortunately, are not solving this issue yet. This feature could also be applied to the iOS GPU volume mapper example. I wish I could help you adding this functionality, but unfortunately I'm not familiar with the internals of VTK in these modules, but I'm eager to learn. I hope I can bump up the priority of this request ! </div><div><br></div><div>Thank you,</div><div><br></div><div>Best Regards,</div><div><br></div><div>Jaime Campos</div><div><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2016-03-04 11:00 GMT+00:00 Elvis Stansvik <span dir="ltr"><<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>></span>:<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 class="gmail_extra"><div class="gmail_quote">2016-03-02 21:16 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Elvis,<br>
<br>
thanks for the detailed information. I thought about a way of doing<br>
this. Basically, I think the mapper has to take multiple inputs and if<br>
multiple inputs are present, then we will construct a BBox around it<br>
and used that for traversing. Now, internally, we would have to<br>
transform the data position to each volume so that we can perform the<br>
lookup and set some rules on how to perform compositing (replace,<br>
modulate etc.). I will talk to the team here and will add in our todo<br>
but we would have check on the priority of it.<br></blockquote><div><br></div><div>Thanks a lot for looking into this and bringing it up with the team. It would be a very welcome addition for us, and surely to some others as well.<br><br></div><div>The approach you outline seems sound to me, but I am a layman in visualization :)<br></div><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">
<br>
If you want to help us with this then I am more happy to guide you<br>
with the process. It won't be very difficult but will require some<br>
careful changes to the existing mapper.<br></blockquote><div><br></div><div>I'm afraid we're in the middle of a product launch here at work, so I'm quite swamped. This is only a small part of the application I'm building. I'm also completely new to VTK and visualization in general, so I'm also afraid it would be more difficult and time consuming for me than you might think (as opposed to a seasoned VTK dev).<br><br></div><div>I'm of course prepared to try out any changes you do on our data sets, should you decide to work on this.<br></div><div><br></div><div>Thanks again,<br></div><div>Elvis<br><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">
<br>
Thanks,<br>
<div><br>
<br>
On Mon, Feb 29, 2016 at 11:46 AM, Elvis Stansvik<br>
<<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>> wrote:<br>
> 2016-02-29 16:32 GMT+01:00 Aashish Chaudhary<br>
> <<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a>>:<br>
>><br>
>> Hi Elvis,<br>
>><br>
>> On Sat, Feb 27, 2016 at 12:06 PM, Elvis Stansvik<br>
>> <<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>> wrote:<br>
>> > 2016-02-25 17:10 GMT+01:00 Elvis Stansvik<br>
>> > <<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>>:<br>
>> >><br>
>> >> Hi,<br>
>> >><br>
>> >> From searching around, I think I've gathered that to render multiple<br>
>> >> volumes in a single window, each volume must have its own mapper and<br>
>> >> volume<br>
>> >> property. They can't share mapper or property.<br>
>> >><br>
>> >> My question is whether I must use separate renderers for each volume as<br>
>> >> well, or if I can use the same renderer for them all?<br>
>> >><br>
>> >> Also, I did read something in an old post about problems with rendering<br>
>> >> multiple volumes that intersect (share a voxel). Is this still a<br>
>> >> problem?<br>
>> >> I'm using VTK 6.2 and the vtkVolumeRayCastMapper.<br>
>> >><br>
>> >> Thanks in advance!<br>
>> ><br>
>> ><br>
>> > Including Donny's answer here, to keep the thread intact:<br>
>> ><br>
>> >> See this thread:<br>
>> >><br>
>> >><br>
>> >><br>
>> >> <a href="http://vtk.1045678.n5.nabble.com/Rendering-multiple-volumes-td5734685.html#a5734971" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.com/Rendering-multiple-volumes-td5734685.html#a5734971</a><br>
>> ><br>
>> > Thanks, that clears some things up, and brings up some workarounds. That<br>
>> > thread was from oct/nov last year, so I guess it is still the case that<br>
>> > proper rendering of multiple volumes that share voxels in 3D space is<br>
>> > not<br>
>> > possible? (even with 7.0?).<br>
>><br>
>> It depends what you define proper. If you have two volumes and they<br>
>> share the exact same space, you can combine them into one volume. When<br>
>> they share the same space but do not overlap that's when things get<br>
>> tricky since then the outcome depends on how do you want to handle<br>
>> this disparity. There could be some other ways such as you combine the<br>
>> volume into one. At the rendering level it could get tricky.<br>
>><br>
>> What exactly you are trying to do.<br>
><br>
><br>
> I see, what I would expect I think is composite rendering of the voxels<br>
> using some composite rendering function / blending mode (perhaps<br>
> configurable?).<br>
><br>
> Sorry if my use case wasn't clear, I'm attaching a rough sketch I did just<br>
> now which should explain it better.<br>
><br>
> Each of our volumes is a piece of a drill core (see my photo previously in<br>
> this thread). The pieces were scanned stacked on top of each other in a<br>
> plastic tube inside our machine. During scanning, they are not necessarily<br>
> aligned properly (as shown in the sketch, and also in the photo).<br>
><br>
> We will do some algorithmic alignment of the volumes, but we must also allow<br>
> the user to override / supplement the automatic alignment when it fails.<br>
> This means the user should be able to rotate and move (along Z axis) the<br>
> pieces until they align. It's like a pussle with pieces of a drill core :)<br>
><br>
> While the user is doing this, the volumes may intersect (noone is perfect on<br>
> the first try). This is why I'm asking about rendering multiple volumes that<br>
> partially intersect in 3D space.<br>
><br>
> It's very desirable that the user can see inside the volumes while doing<br>
> this manual alignment, since the features (cracks, density variations, ...)<br>
> inside the rocks may be what guides the user in aligning the pieces<br>
> properly. That's why I don't like the idea of letting the user work with<br>
> extracted isosurfaces or similar instead.<br>
><br>
> Hope this clears things up a little!<br>
><br>
> Elvis<br></div></blockquote></div></div></div></blockquote></div></div></div></div></div></blockquote></div><br></div></div></div>