[vtkusers] Rendering multiple volumes

dewarren davideugenewarren+vtk at gmail.com
Thu Nov 19 13:50:10 EST 2015


Hi all,

     Many thanks for the suggestions!  Although my project is still very
much a work-in-progress, I've gotten some promising results.  I've posted
two sample images on Imgur at http://imgur.com/a/KFFt.  These were created
using two different approaches.

1) The lesion-extent image (red on grayscale) was created using two volumes
loaded from NIFTI files: one containing the template brain; and the other
containing a labelmap indicating healthy tissue vs. lesioned tissue. 
Assigning different color transfer functions according to labelmap values
allowed me to get the effect that I wanted.  I created the labelmap using
numpy and nibabel because I'm still more comfortable with those tools than
with native VTK solutions.
2) The variable-intensity overlap image (black-to-yellow on grayscale) was
created using four volumes from NIFTI files, one each for the RGBA channels
of a non-independent-components volume.  This one took a bit more work in
Numpy because I had to implement labelmasks and a color transfer function
myself instead of defining one in the VTK part of the script.  Essentially,
the grayscale portions of the image are from the template brain volume, the
colored portions of the image are from a volume-occupying brain map of
varying intensity, and relevant values from each were combined in a
non-overlapping portions of a composite volume.

     I think that the second approach (non-independent 4-component RGBA
volumes) will probably be general enough to fulfill all my needs.  Doing
things this way feels like a bit of a kludge, and I'm sure that much more
could probably be accomplished using native VTK functions if I was a more
knowledgeable VTK user.  However, I'm not going to complain too much because
VTK's volume rendering results look great and it's all scriptable through
Python!

     Any thoughts or comments would be very welcome.  I hope to have a more
thorough demonstration repository and/or blog post available relatively
soon.  Best,

Dave





--
View this message in context: http://vtk.1045678.n5.nabble.com/Rendering-multiple-volumes-tp5734685p5735115.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list