[vtkusers] vtkMultiVolume and shading
Csaba Pinter
csaba.pinter at queensu.ca
Fri May 25 14:12:02 EDT 2018
I created an issue for this bug
https://gitlab.kitware.com/vtk/vtk/issues/17325
I'll add comments there when I have any luck reproducing the problem with a minimal test case.
csaba
-----Original Message-----
From: vtkusers <vtkusers-bounces at vtk.org> On Behalf Of Csaba Pinter
Sent: Wednesday, May 23, 2018 15:31
To: Elvis Stansvik <elvis.stansvik at orexplore.com>
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] vtkMultiVolume and shading
That's a pretty resourceful workaround :) I'll keep trying to get to the bottom of this though.
csaba
-----Original Message-----
From: Elvis Stansvik <elvis.stansvik at orexplore.com>
Sent: Wednesday, May 23, 2018 15:25
To: Csaba Pinter <csaba.pinter at queensu.ca>
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] vtkMultiVolume and shading
2018-05-23 21:16 GMT+02:00 Elvis Stansvik <elvis.stansvik at orexplore.com>:
> 2018-05-23 21:08 GMT+02:00 Csaba Pinter <csaba.pinter at queensu.ca>:
>> Hi Elvis,
>>
>> Sorry for the late answer, I just got back from vacation.
>>
>> I haven't been able to reproduce it with a self-contained test case
>> yet. I've been trying to modify TestGPURayCastMultiVolumeOverlapping,
>> but it worked there. However in my work in Slicer, in which I'm
>> adding a new volume rendering method with this actor, the first
>> transform is always ignored. Here's the branch:
>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
>> ub.com%2Fcpinter%2FSlicer%2Ftree%2Fmulti-volume-rendering&data=02%7C0
>> 1%7Ccsaba.pinter%40queensu.ca%7Cc64f2f95b013430d7bbb08d5c0e2da87%7Cd6
>> 1ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636627002929271879&sdata=LZG
>> VjR%2FE%2FEAfE3WQn%2BirX%2F8%2BrV%2BEOIb6cpo71f1%2BPM4%3D&reserved=0
>>
>> I'll keep trying later this week, and will definitely let you know if I get lucky. Please do the same if you manage to reproduce it.
>
> Alright, looks like we're in the same boat. I'll probably have some
> more time to look at this next week.
FWIW the workaround I toyed around with was always keeping a single-voxel fully-transparent volume around on port 0, but obviously a proper solution would be better.
Elvis
>
> Elvis
>
>>
>> Thanks,
>> csaba
>>
>> -----Original Message-----
>> From: Elvis Stansvik <elvis.stansvik at orexplore.com>
>> Sent: Friday, May 18, 2018 05:35
>> To: Csaba Pinter <csaba.pinter at queensu.ca>
>> Cc: Sankhesh Jhaveri <sankhesh.jhaveri at kitware.com>; vtkusers at vtk.org
>> Subject: Re: [vtkusers] vtkMultiVolume and shading
>>
>> 2018-04-24 22:14 GMT+02:00 Csaba Pinter <csaba.pinter at queensu.ca>:
>>> Hi Sankhesh and Elvis,
>>>
>>> The first issue that I was now able to confirm is that SetVisibility called on the individual vtkVolume objects within vtkMultiVolume has no effect. Not sure if this is intentional or not, but naively I'd think this is the way to show/hide a volume. I'm not fond of the idea to clear the connection in the mapper and set volume to null every time I want to hide one.
>>> The way to reproduce this is for example adding these lines to line 118 in Rendering\Volume\Testing\Cxx\TestGPURayCastMultiVolumeOverlapping.cxx
>>> else if (key == "w")
>>> {
>>> this->Volume->SetVisibility(!this->Volume->GetVisibility());
>>> }
>>> If you start the test interactively (-I), then nothing happens if you press w.
>>>
>>> The other issue is that the user transform I set to the first volume seems to be ignored, while the second volume's transform is used properly. I haven't been able to reproduce it with this test yet, so I'll keep working on it until I find out what is the exact issue.
>>
>> Hi again Csaba. Were you ever able to reproduce the "transform first volume" problem?
>>
>> In my own experiments with vtkMultiVolume, I seem to be hitting a similar issue. In my case it's SetPosition that won't bite on the first volume (I think...), but I guess that is probably the same issue you were seeing.
>>
>> So far I've been unable to reproduce it in a minimal test case though
>> :(
>>
>> Best regards,
>> Elvis
>>
>>>
>>> Cheers,
>>> csaba
>>>
>>> -----Original Message-----
>>> From: Elvis Stansvik <elvis.stansvik at orexplore.com>
>>> Sent: Tuesday, April 24, 2018 10:51
>>> To: Csaba Pinter <csaba.pinter at queensu.ca>
>>> Cc: Sankhesh Jhaveri <sankhesh.jhaveri at kitware.com>;
>>> vtkusers at vtk.org
>>> Subject: Re: [vtkusers] vtkMultiVolume and shading
>>>
>>> 2018-04-24 15:15 GMT+02:00 Csaba Pinter <csaba.pinter at queensu.ca>:
>>>> Hi Sankhesh,
>>>>
>>>>
>>>>
>>>> Thanks for the quick answer! Just in a nutshell, what would be
>>>> needed to do programming-wise to add shading in the code?
>>>>
>>>>
>>>>
>>>> Also I’m wondering if the situation about funding applies to
>>>> bugfixes as well? I am struggling with issues related to per-volume
>>>> visibility and user transforms, and I think I’ll get back to you
>>>> soon with self-contained test cases once I was able to figure out
>>>> which of these are on the VTK side and how to reproduce them easily.
>>>
>>> I'm also about to experiment with the multi-volume support. Would be interesting to hear from you what problems you ran into wrt to per-volume visibility / user transforms, so I know what to look out for :) So if you file issues for those it would be great if you could link to them here.
>>>
>>> Cheers,
>>> Elvis
>>>
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> csaba
>>>>
>>>>
>>>>
>>>> From: Sankhesh Jhaveri <sankhesh.jhaveri at kitware.com>
>>>> Sent: Monday, April 23, 2018 21:15
>>>> To: Csaba Pinter <csaba.pinter at queensu.ca>
>>>> Cc: vtkusers at vtk.org
>>>> Subject: Re: [vtkusers] vtkMultiVolume and shading
>>>>
>>>>
>>>>
>>>> Hi Csaba,
>>>>
>>>> I don’t believe there is a technical limitation. It was merely that
>>>> the original effort for adding multiple overlapping volumes support
>>>> was focused on selected features. I am not aware of current
>>>> efforts/funding to add support for additional features like shading, different blend modes, etc.
>>>>
>>>> Thanks,
>>>> Sankhesh
>>>>
>>>>
>>>>
>>>> On Mon, Apr 23, 2018 at 3:45 PM Csaba Pinter
>>>> <csaba.pinter at queensu.ca>
>>>> wrote:
>>>>
>>>> Hello,
>>>>
>>>>
>>>>
>>>> I’m experimenting with using vtkMultiVolume to add proper
>>>> multi-volume rendering support into 3D Slicer. My main question is
>>>> the reason behind this actor not supporting shading, as apparent
>>>> when used, but also mentioned in the corresponding test:
>>>>
>>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgi
>>>> th
>>>> u
>>>> b.com%2FKitware%2FVTK%2Fblob%2Fmaster%2FRendering%2FVolume%2FTestin
>>>> g%
>>>> 2
>>>> FCxx%2FTestGPURayCastMultiVolumeOverlapping.cxx%23L229&data=02%7C01
>>>> %7
>>>> C
>>>> csaba.pinter%40queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61e
>>>> cb
>>>> 3
>>>> b38b142d582c4efb2838b925c%7C1%7C0%7C636601782604952003&sdata=Ylx6UE
>>>> %2
>>>> B
>>>> 0l7IeQEWU5OEkSYHXSAuBYLT8DzB1RobJY34%3D&reserved=0
>>>>
>>>> Is this a technical limitation that would be very hard to overcome,
>>>> or is it something simpler? I’m asking this because for this actor
>>>> to be really used for volume rendering, shading would be necessary.
>>>>
>>>>
>>>>
>>>> Thank you,
>>>>
>>>> Csaba
>>>>
>>>> _______________________________________________
>>>> Powered by
>>>> https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&
>>>> da
>>>> t
>>>> a=02%7C01%7Ccsaba.pinter%40queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f
>>>> 2c
>>>> 9
>>>> 90%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601782604952003&
>>>> sd
>>>> a
>>>> ta=OAQC2JW%2FBdByHi6rzs3UR3OuEYMXVtnIBzyO2DLUEBg%3D&reserved=0
>>>>
>>>> Visit other Kitware open-source projects at
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww
>>>> .k
>>>> i
>>>> tware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Ccsaba.pinte
>>>> r%
>>>> 4
>>>> 0queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582
>>>> c4
>>>> e
>>>> fb2838b925c%7C1%7C0%7C636601782604952003&sdata=ILwtCl2ODMcW2PistT%2
>>>> BU
>>>> e
>>>> pqKoQ7hCylxaWiGofVT5L8%3D&reserved=0
>>>>
>>>> Please keep messages on-topic and check the VTK FAQ at:
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww
>>>> .v
>>>> t
>>>> k.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7Ce
>>>> 39
>>>> 4
>>>> ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838b925c%7C1
>>>> %7
>>>> C
>>>> 0%7C636601782604952003&sdata=M05RBjDP8XffO2U1b2I%2BMOI2jswVhNERqdrg
>>>> v%
>>>> 2
>>>> Fbd%2Bmo%3D&reserved=0
>>>>
>>>> Search the list archives at:
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmar
>>>> km
>>>> a
>>>> il.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Ccsaba.pinter%40que
>>>> en
>>>> s
>>>> u.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb28
>>>> 38
>>>> b
>>>> 925c%7C1%7C0%7C636601782604952003&sdata=%2B9tRXKCTKzxtmbkE9hWJz1%2F
>>>> oo
>>>> B
>>>> fefTvNJWtuJta0b1o%3D&reserved=0
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.
>>>> o
>>>> rg%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Ccsaba.pinter%40qu
>>>> ee
>>>> n
>>>> su.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2
>>>> 83
>>>> 8
>>>> b925c%7C1%7C0%7C636601782604952003&sdata=2HdbAKBlfe1JNhyMG%2BCo%2Fn
>>>> wJ
>>>> 2
>>>> o2IWDqQHl%2BCIjbu3Fs%3D&reserved=0
>>>>
>>>> --
>>>>
>>>> Sankhesh Jhaveri
>>>>
>>>> Sr. Research & Development Engineer | Kitware | (518) 881-4417
>>>>
>>>>
>>>> _______________________________________________
>>>> Powered by
>>>> https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&
>>>> da
>>>> t
>>>> a=02%7C01%7Ccsaba.pinter%40queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f
>>>> 2c
>>>> 9
>>>> 90%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636601782604952003&
>>>> sd
>>>> a
>>>> ta=OAQC2JW%2FBdByHi6rzs3UR3OuEYMXVtnIBzyO2DLUEBg%3D&reserved=0
>>>>
>>>> Visit other Kitware open-source projects at
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww
>>>> .k
>>>> i
>>>> tware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Ccsaba.pinte
>>>> r%
>>>> 4
>>>> 0queensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582
>>>> c4
>>>> e
>>>> fb2838b925c%7C1%7C0%7C636601782604952003&sdata=ILwtCl2ODMcW2PistT%2
>>>> BU
>>>> e
>>>> pqKoQ7hCylxaWiGofVT5L8%3D&reserved=0
>>>>
>>>> Please keep messages on-topic and check the VTK FAQ at:
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww
>>>> .v
>>>> t
>>>> k.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7Ce
>>>> 39
>>>> 4
>>>> ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb2838b925c%7C1
>>>> %7
>>>> C
>>>> 0%7C636601782604952003&sdata=M05RBjDP8XffO2U1b2I%2BMOI2jswVhNERqdrg
>>>> v%
>>>> 2
>>>> Fbd%2Bmo%3D&reserved=0
>>>>
>>>> Search the list archives at:
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmar
>>>> km
>>>> a
>>>> il.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Ccsaba.pinter%40que
>>>> en
>>>> s
>>>> u.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4efb28
>>>> 38
>>>> b
>>>> 925c%7C1%7C0%7C636601782604952003&sdata=%2B9tRXKCTKzxtmbkE9hWJz1%2F
>>>> oo
>>>> B
>>>> fefTvNJWtuJta0b1o%3D&reserved=0
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.
>>>> o
>>>> rg%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Ccsaba.pinter%40qu
>>>> eensu.ca%7Ce394ec9b8b0a4e6be41b08d5a9f2c990%7Cd61ecb3b38b142d582c4e
>>>> fb2838b925c%7C1%7C0%7C636601782604952003&sdata=2HdbAKBlfe1JNhyMG%2B
>>>> Co%2FnwJ2o2IWDqQHl%2BCIjbu3Fs%3D&reserved=0
>>>>
_______________________________________________
Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7Cc8397173011a4631c53d08d5c0e3c805%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636627006900645962&sdata=TQJPbGU3DoyRoqtocqmVA7I9p5%2F2aUPbhrzw2ZPOH%2BU%3D&reserved=0
Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7Cc8397173011a4631c53d08d5c0e3c805%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636627006900645962&sdata=2l708ALHoceV%2BxYxkTJn%2BdtL4ttKsOwt%2FP4KbMogGZ0%3D&reserved=0
Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7Cc8397173011a4631c53d08d5c0e3c805%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636627006900645962&sdata=mh3dXPPz9qX0oyxUTrQDN16VG5NcoUybE17rqWyVY40%3D&reserved=0
Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7Cc8397173011a4631c53d08d5c0e3c805%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636627006900645962&sdata=0g37QCb2V1osEicu%2F%2Ff%2BEtt3eUp5ms7JuBNn3sl2f7E%3D&reserved=0
Follow this link to subscribe/unsubscribe:
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.org%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Ccsaba.pinter%40queensu.ca%7Cc8397173011a4631c53d08d5c0e3c805%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636627006900645962&sdata=xcODYsLmAzW5OI7FKniONE0mS64G2tFSBmIFLtLELCs%3D&reserved=0
More information about the vtkusers
mailing list