[vtkusers] vtkVolumeProperty IndependentComponents On and Off
Kenji Tsumura
kenji.tsumura at neosoftmedical.com
Wed Dec 9 13:25:39 EST 2015
Hi Aashish,
I applied the patch to the latest VTK (from GIT) and rebuilt it.
An error occurred when I run the test program you gave me without gradient opacity.
Please find the attached file.
I am not sure why…
Thank you,
Kenji
From: Aashish Chaudhary [mailto:aashish.chaudhary at kitware.com]
Sent: Wednesday, December 09, 2015 9:04 AM
To: Kenji Tsumura
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] vtkVolumeProperty IndependentComponents On and Off
Hi Kenji,
Could you please try the attached patch? Once if works for you, I will clean it up and create a merge request.
Thanks,
On Tue, Dec 8, 2015 at 11:41 AM, Aashish Chaudhary <aashish.chaudhary at kitware.com<mailto:aashish.chaudhary at kitware.com>> wrote:
Aha... I think I know how to fix the bug. Gradient opacity was the key. I will push a fix today.
- Aashish
On Tue, Dec 8, 2015 at 11:30 AM, Kenji Tsumura <kenji.tsumura at neosoftmedical.com<mailto:kenji.tsumura at neosoftmedical.com>> wrote:
Hi Aashish,
Adding gradient opacity to the test sample causes the same error I have seen in my application.
Please refer to the attached file.
So my application works with IndependentComponents On after removing gradient opacity.
Kenji
From: Aashish Chaudhary [mailto:aashish.chaudhary at kitware.com<mailto:aashish.chaudhary at kitware.com>]
Sent: Tuesday, December 08, 2015 8:22 AM
To: Kenji Tsumura
Cc: vtkusers at vtk.org<mailto:vtkusers at vtk.org>
Subject: Re: [vtkusers] vtkVolumeProperty IndependentComponents On and Off
That would be great Kenji, thanks.
- Aashish
On Mon, Dec 7, 2015 at 5:29 PM, Kenji Tsumura <kenji.tsumura at neosoftmedical.com<mailto:kenji.tsumura at neosoftmedical.com>> wrote:
Aashish,
Thank you very much.
I will try to run the test example and see what happens.
If the test is ok, I will try to reproduce the problem with simpler code.
Kenji
From: Aashish Chaudhary [mailto:aashish.chaudhary at kitware.com<mailto:aashish.chaudhary at kitware.com>]
Sent: Monday, December 07, 2015 3:58 PM
To: Kenji Tsumura
Cc: vtkusers at vtk.org<mailto:vtkusers at vtk.org>
Subject: Re: [vtkusers] vtkVolumeProperty IndependentComponents On and Off
Thanks Kenji for trying out. Its not clear in the log why the build shader code crashed.
Also, I realized that you using Java bindings. Would it be possible to re-create this issue
with a small sample code and you send it to me? We do have two component and 4 component
test (dependent and independent). Please have a look here: https://github.com/Kitware/VTK/blob/master/Rendering/Volume/Testing/Cxx/TestGPURayCastTwoComponentsIndependent.cxx
and
https://github.com/Kitware/VTK/blob/master/Rendering/Volume/Testing/Cxx/TestGPURayCastTwoComponentsDependent.cxx
Thanks,
On Mon, Dec 7, 2015 at 3:41 PM, Kenji Tsumura <kenji.tsumura at neosoftmedical.com<mailto:kenji.tsumura at neosoftmedical.com>> wrote:
Hi Aashish,
Thank you.
I tried with vtkGPUVolumeRayCastMapper.
An error occurs without setting IndependentComponentsOff.
It seems the error occurs in vtkOpenGLGPUVolumeRayCastMapper::BuildShader (See the attached file).
Kenji
From: Aashish Chaudhary [mailto:aashish.chaudhary at kitware.com<mailto:aashish.chaudhary at kitware.com>]
Sent: Monday, December 07, 2015 1:54 PM
To: Kenji Tsumura
Cc: vtkusers at vtk.org<mailto:vtkusers at vtk.org>
Subject: Re: [vtkusers] vtkVolumeProperty IndependentComponents On and Off
On Mon, Dec 7, 2015 at 12:19 PM, Kenji Tsumura <kenji.tsumura at neosoftmedical.com<mailto:kenji.tsumura at neosoftmedical.com>> wrote:
Hello,
I have 3D cardiac MRI data (magnitude data and velocity data), and would like to display the volume rendering of the two data.
I create vtkVolume with two components (first one is velocity data and second one is magnitude data) and use vtkSmartVolumeMapper.
When I set IndependentComponentsOn to the volume property, I can see what I want (refer to the first figure).
But this setting disables GPU rendering and it is slow.
I don't remember vtkSmartVolumeMapper has this logic, I will have a look. In the old GPU raycast mapper, there was some issue with independent components so may be that is the reason that smart volume mapper switched to fixed point ray cast.
Is there a particular reason you are using vtkSmartVolumeMapper? You can directly use GPUVolume RayCastMapper
My understanding is that I have to use IndependentComponentsOff to make the mapper use GPU rendering.
When I set IndependentComponentsOff, only one color transfer function, and only one scalar opacity function to the volume property,
the magnitude data (the second component) is also color-coded (refer to the second figure).
I thought this contradicts the method comments of IndependentComponentsOn/ IndependentComponentsOff.
“For 2 component data, the first is passed through the first color transfer function and the second component is passed through the first opacity transfer function.”
Am I missing something?
Can I make the volume rendering look the same as using two components?
Thank you,
BTY, I use v6.3.0, OpenGL2.
--
Kenji Tsumura
“The information contained in this communication may be confidential, is intended only for the use of the recipient(s) named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original message and any copy of it from your computer system. If you have any questions concerning this message, please contact the sender.
Disclaimer: The information contained in this communication may be confidential, is intended only for the use of the recipient(s) named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original message and any copy of it from your computer system. If you have any questions concerning this message, please contact the sender.
_______________________________________________
Powered by www.kitware.com<http://www.kitware.com>
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Search the list archives at: http://markmail.org/search/?q=vtkusers
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
--
| Aashish Chaudhary
| Technical Leader
| Kitware Inc.
| http://www.kitware.com/company/team/chaudhary.html
Disclaimer: The information contained in this communication may be confidential, is intended only for the use of the recipient(s) named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original message and any copy of it from your computer system. If you have any questions concerning this message, please contact the sender.
--
| Aashish Chaudhary
| Technical Leader
| Kitware Inc.
| http://www.kitware.com/company/team/chaudhary.html
Disclaimer: The information contained in this communication may be confidential, is intended only for the use of the recipient(s) named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original message and any copy of it from your computer system. If you have any questions concerning this message, please contact the sender.
--
| Aashish Chaudhary
| Technical Leader
| Kitware Inc.
| http://www.kitware.com/company/team/chaudhary.html
Disclaimer: The information contained in this communication may be confidential, is intended only for the use of the recipient(s) named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original message and any copy of it from your computer system. If you have any questions concerning this message, please contact the sender.
--
| Aashish Chaudhary
| Technical Leader
| Kitware Inc.
| http://www.kitware.com/company/team/chaudhary.html
--
| Aashish Chaudhary
| Technical Leader
| Kitware Inc.
| http://www.kitware.com/company/team/chaudhary.html
Disclaimer: The information contained in this communication may be confidential, is intended only for the use of the recipient(s) named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original message and any copy of it from your computer system. If you have any questions concerning this message, please contact the sender.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151209/9d37c24d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: error_vtk_latest_w_patch.jpg
Type: image/jpeg
Size: 38831 bytes
Desc: error_vtk_latest_w_patch.jpg
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151209/9d37c24d/attachment.jpg>
More information about the vtkusers
mailing list