[vtkusers] vtkusers Digest, Vol 169, Issue 23

Cartik Sharma cartik.sharma at gmail.com
Wed May 23 21:18:32 EDT 2018


Dear VTK Developers,

Is there a quantum machine learning toolbox for VTK based on the
premise of high energy physics and computing to leverage DWave's
quantum
architecture?

If so, I'd be interested in applying . my skills in modeling and
analysis for quantum machine learning for this VTK bridge toolkit.

Best regards,
Cartik
Quantum Machine Learning program, U of Toronto.


On Wed, May 16, 2018 at 11:24 AM,  <vtkusers-request at vtk.org> wrote:
> Send vtkusers mailing list submissions to
>         vtkusers at vtk.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://vtk.org/mailman/listinfo/vtkusers
> or, via email, send a message with subject or body 'help' to
>         vtkusers-request at vtk.org
>
> You can reach the person managing the list at
>         vtkusers-owner at vtk.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of vtkusers digest..."
>
>
> Today's Topics:
>
>    1. Re: VTK integration in PyQt (wrong layout) (Aur?lien Marsan)
>    2. Re: vtksmartvolumemapper issues (Maguire, Alister Owen)
>    3. Re: Large performance difference between
>       vtkResampleWithDataSet in VTK 8.1.0 and Resample with Dataset
>       filter in Paraview 5.5 (Evan Kao)
>    4. Re: vtksmartvolumemapper issues (mark.ostroot at lickenbrocktech.com)
>    5. Re: Large performance difference between
>       vtkResampleWithDataSet in VTK 8.1.0 and Resample with Dataset
>       filter in Paraview 5.5 (Sujin Philip)
>    6. Re: Large performance difference between
>       vtkResampleWithDataSet in VTK 8.1.0 and Resample with Dataset
>       filter in Paraview 5.5 (Evan Kao)
>    7. Re: Large performance difference between
>       vtkResampleWithDataSet in VTK 8.1.0 and Resample with Dataset
>       filter in Paraview 5.5 (Sujin Philip)
>    8. Re: Large performance difference between
>       vtkResampleWithDataSet in VTK 8.1.0 and Resample with Dataset
>       filter in Paraview 5.5 (Evan Kao)
>    9. Re: Time Interpolation (kenichiro yoshimi)
>   10. ANN: Latex and Markdown versions of the VTK textbook
>       (Bill Lorensen)
>   11. Re: VtkDistanceWidget label text font (ashishbme)
>   12. Wireframe and Volume Rendering (Andaharoo)
>   13. Re: Correct anatomical orientation of volumes from Niftii and
>       DICOM (ochampao)
>   14. nested vtkPropAssembly visibility (Petr Matou?ek)
>   15. Re: Wireframe and Volume Rendering (Sankhesh Jhaveri)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 15 May 2018 12:06:24 -0400
> From: Aur?lien Marsan <aur.marsan at gmail.com>
> To: mafiaskafia <tsilveira1993 at gmail.com>
> Cc: vtkusers <vtkusers at vtk.org>
> Subject: Re: [vtkusers] VTK integration in PyQt (wrong layout)
> Message-ID:
>         <CALBJ7LK-fynY2_A0SBWAP4zscXx=gnu-zSNi5Lz6QcG_RK9eQQ at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi,
>
> There is a fantastic tutorial on this topic.
> See: https://github.com/diego0020/tutorial-vtk-pyqt
>
> Bests.
>
>
>
> 2018-05-09 9:26 GMT-04:00 mafiaskafia <tsilveira1993 at gmail.com>:
>
>> Hey,
>>
>> Yes of course!
>> Here is a screenshot of what i'm seeing:
>>
>> <http://vtk.1045678.n5.nabble.com/file/t342418/2.png>
>>
>> And this is what i want:
>>
>> <http://vtk.1045678.n5.nabble.com/file/t342418/1.png>
>>
>> Cheers
>>
>>
>>
>>
>>
>>
>>
>> --
>> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
>> _______________________________________________
>> Powered by 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:
>> https://vtk.org/mailman/listinfo/vtkusers
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <https://vtk.org/pipermail/vtkusers/attachments/20180515/8533dc88/attachment-0001.html>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 15 May 2018 16:24:21 +0000
> From: "Maguire, Alister Owen" <maguire7 at llnl.gov>
> To: "mark.ostroot at lickenbrocktech.com"
>         <mark.ostroot at lickenbrocktech.com>, "vtkusers at vtk.org"
>         <vtkusers at vtk.org>
> Subject: Re: [vtkusers] vtksmartvolumemapper issues
> Message-ID: <2AD840EC-594A-43A5-8A89-9D27A9E846D0 at llnl.gov>
> Content-Type: text/plain; charset="utf-8"
>
> Are you including the following two lines in your .C file?
>
> #include <vtkAutoInit.h>
> VTK_MODULE_INIT(vtkRenderingVolumeOpenGL2);
>
> I?m not sure if this is the root of your issue, but I had run into problems while working with vtkSmartVolumeMapper a while back, and I ended up discovering that these two lines were needed for it to be used properly.
>
> You can find more info about it here
> https://www.vtk.org/Wiki/VTK/VTK_6_Migration/Factories_now_require_defines
>
> Best,
> Alister
>
>
>
> From: vtkusers <vtkusers-bounces at vtk.org> on behalf of "mark.ostroot at lickenbrocktech.com" <mark.ostroot at lickenbrocktech.com>
> Date: Tuesday, May 15, 2018 at 8:43 AM
> To: "vtkusers at vtk.org" <vtkusers at vtk.org>
> Subject: [vtkusers] vtksmartvolumemapper issues
>
> Hello all,
>
> I am updating some old vtk 6.3 code to vtk 8.1, Currently the older code uses vtksmartvolumemapper, I am running into a run time error with a new smart pointer.
>
> my code:
>
> #include <vtkSmartVolumeMapper.h>
> ..
> ..
> ..
> vtkSmartPointer<vtkSmartVolumeMapper> vMapper  = vtkSmartPointer<vtkSmartVolumeMapper>::New();    < = this breaks with unhandled exception at (vtkRenderingVolume-8.1.dll) Access violation reading location 0x0000000000000000
>
>
>
> The code compiles, but I hit this run time exception on execution. I don't believe the smartvolumemapper has been deprecated, does anyone have any idea of what I am doing wrong?
>
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <https://vtk.org/pipermail/vtkusers/attachments/20180515/13976f97/attachment-0001.html>
>
> ------------------------------
>
> Message: 3
> Date: Tue, 15 May 2018 10:05:01 -0700
> From: Evan Kao <tossin at gmail.com>
> To: Sujin Philip <sujin.philip at kitware.com>
> Cc: Shawn Waldon <shawn.waldon at kitware.com>, VTK Users
>         <vtkusers at vtk.org>
> Subject: Re: [vtkusers] Large performance difference between
>         vtkResampleWithDataSet in VTK 8.1.0 and Resample with Dataset filter
>         in Paraview 5.5
> Message-ID:
>         <CAEhu9hAqoSYdGcD5vY5mLznSKLtnjrridzeJvZf1Qn=xb5oHog at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Shawn and Sujin,
>
> Thanks for the quick responses.  The CPU on the computer I'm using is an
> i7-6700
> <https://ark.intel.com/products/88196/Intel-Core-i7-6700-Processor-8M-Cache-up-to-4_00-GHz>
> with 4 cores, 8 threads, and 3.4 GHz frequency.
>
> Multi-threading may be a factor, but it's hard to tell because resampling
> in ParaView is so quick.  ParaView is capable of using 100% of the CPU,
> while VTK (in Python) will max out at 12-13%.  However, for these
> particular datasets, resampling doesn't appear to stress ParaView that much
> (11-16% when observing the Windows Task Manager, and some of that may be
> because of the rendering).  However, I was under the impression that at
> best multi-threading could only reduce the time it takes by N threads (ie
> 8x), while the speed difference here is almost 1000x.  I measured the times
> for ParaView 5.5, VTK 8.1 (compiled elsewhere), and VTK 7.1 (compiled by
> our group):
>
>    1. ParaView 5.5 - 1.1s, using a stopwatch, multiple trials. Timing
>    started the moment I clicked "Apply".
>    2. VTK 8.1 - 922.47s, timed using Python's timeit module, measuring only
>    the vtkResampleWithDataSet.Update() method.
>    3. VTK 7.1 - 950.47s, timed the same way as above.
>
> I'm aware of the difference in labeling between VTK and ParaView for Source
> and Input (which confuses me all the time).  I can verify the correct data
> sets were assigned by saving the output (which should an unstructured grid)
> and viewing it in ParaView - it looks identical to the resampled data
> generated in ParaView (although it overwrites the point scalars array and
> adds some ghost information that needs to be removed).
>
> Thanks,
> Evan
>
> On Tue, May 15, 2018 at 7:38 AM, Sujin Philip <sujin.philip at kitware.com>
> wrote:
>
>> Hi Evan,
>>
>> As Shawn mentioned it could be due to lack of multi-threading. Could you
>> provide us the configuration of the system you are using? Like the number
>> of cores/threads and the CPU frequency? Also please share the actual time
>> that ParaView and VTK are taking. Is it possible for you to try out a
>> slightly older VTK version and see if the performance difference is still
>> there?
>>
>> Which dataset are you setting as input and which as source? The names are
>> unfortunately opposite between VTK-m and ParaView due to legacy reasons.
>> Probing with the unstructured grid as the source is much slower than
>> probing with the structured grid as the source. So please confirm that the
>> VTK pipeline is set up properly.
>>
>> Please let me know if none these seem to be the cause of your problem and
>> I will dig deeper.
>>
>> Thanks
>> Sujin
>>
>>
>>
>> On Tue, May 15, 2018 at 9:52 AM, Shawn Waldon <shawn.waldon at kitware.com>
>> wrote:
>>
>>> Hi Evan,
>>>
>>> I suspect the differece is that the ParaView binaries were compiled with
>>> TBB multithreading support and the Anaconda VTK was not.
>>> vtkResampleWithDataSet is set up to use TBB multithreading if available.
>>> Check the utilization of the cores on your computer when running each and
>>> you will see ParaView using all available cores and Anaconda's VTK probably
>>> only using one.  It is also possible the cell locator change improved
>>> things further but I'm not familiar with that.
>>>
>>> HTH,
>>>
>>> Shawn
>>>
>>> On Mon, May 14, 2018 at 7:54 PM, Evan Kao <tossin at gmail.com> wrote:
>>>
>>>> Hello all,
>>>>
>>>> I am trying to resample a structured grid data (~1.4M points, 1.3M
>>>> cells) with an unstructured grid (~320K points, 480K cells).  In Paraview
>>>> 5.5, this resampling is nearly instant with the Resample With Dataset
>>>> filter.  Yet in a Python script using vtkResampleWithDataSet from VTK
>>>> 8.1.0, the same operation takes about 15 minutes (>2 orders of magnitude
>>>> difference in speed).  As far as I can tell from the VTK repository on
>>>> Gitlab, the only difference between the Paraview/release version and the
>>>> 8.1.0 or 8.1.1 tagged releases is a switch in the cell locator.  Is this
>>>> enough to explain the difference in the performance?  If not, could someone
>>>> enlighten me as to what the possible factors are here?
>>>>
>>>> Also, if it matters, this is all on a Windows 7 64-bit machine.
>>>> Paraview is installed from binaries, while VTK was downloaded from an
>>>> Anaconda distribution compiled by a third party.
>>>>
>>>> Thanks for your time,
>>>> Evan Kao
>>>>
>>>> _______________________________________________
>>>> Powered by 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:
>>>> https://vtk.org/mailman/listinfo/vtkusers
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Powered by 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:
>>> https://vtk.org/mailman/listinfo/vtkusers
>>>
>>>
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <https://vtk.org/pipermail/vtkusers/attachments/20180515/e39153f4/attachment-0001.html>
>
> ------------------------------
>
> Message: 4
> Date: Tue, 15 May 2018 10:07:52 -0700
> From: <mark.ostroot at lickenbrocktech.com>
> To: "Maguire, Alister Owen" <maguire7 at llnl.gov>
> Cc: vtkusers at vtk.org
> Subject: Re: [vtkusers] vtksmartvolumemapper issues
> Message-ID:
>         <20180515100752.c7db654a879d86b78cfcacc46040d57b.abe68c2fdf.mailapi at email09.godaddy.com>
>
> Content-Type: text/plain; charset="utf-8"
>
>  Alister,
>
> Thanks for your help I managed to get the code working now It was a missing autoinit line.
>
> I ended up needing to add
> #define vtkRenderingVolume_AUTOINIT 1(vtkRenderingVolumeOpenGL2)
>
> at the top of my code
> -Thanks,
> Mark
>
>
> --------- Original Message --------- Subject: Re: [vtkusers] vtksmartvolumemapper issues
> From: "Maguire, Alister Owen" <maguire7 at llnl.gov>
> Date: 5/15/18 9:24 am
> To: "mark.ostroot at lickenbrocktech.com" <mark.ostroot at lickenbrocktech.com>, "vtkusers at vtk.org" <vtkusers at vtk.org>
>
>   Are you including the following two lines in your .C file?
>
>  #include <vtkAutoInit.h>
>  VTK_MODULE_INIT(vtkRenderingVolumeOpenGL2);
>
>  I'm not sure if this is the root of your issue, but I had run into problems while working with vtkSmartVolumeMapper a while back, and I ended up discovering that these two lines were needed for it to be used properly.
>
>  You can find more info about it here
>  https://www.vtk.org/Wiki/VTK/VTK_6_Migration/Factories_now_require_defines
>
>  Best,
>  Alister
>
>
>
>   From: vtkusers <vtkusers-bounces at vtk.org> on behalf of "mark.ostroot at lickenbrocktech.com" <mark.ostroot at lickenbrocktech.com>
>  Date: Tuesday, May 15, 2018 at 8:43 AM
>  To: "vtkusers at vtk.org" <vtkusers at vtk.org>
>  Subject: [vtkusers] vtksmartvolumemapper issues
>
>
>
> Hello all,
>
>
>
> I am updating some old vtk 6.3 code to vtk 8.1, Currently the older code uses vtksmartvolumemapper, I am running into a run time error with a new smart pointer.
>
>
>
> my code:
>
>
>
> #include <vtkSmartVolumeMapper.h>
>
> ..
>
> ..
>
> ..
>
> vtkSmartPointer<vtkSmartVolumeMapper> vMapper  = vtkSmartPointer<vtkSmartVolumeMapper>::New();    < = this breaks with unhandled exception at (vtkRenderingVolume-8.1.dll) Access violation reading location 0x0000000000000000
>
>
>
>
>
>
>
> The code compiles, but I hit this run time exception on execution. I don't believe the smartvolumemapper has been deprecated, does anyone have any idea of what I am doing wrong?
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <https://vtk.org/pipermail/vtkusers/attachments/20180515/bda4dd8c/attachment-0001.html>
>
> ------------------------------
>
> Message: 5
> Date: Tue, 15 May 2018 15:32:23 -0400
> From: Sujin Philip <sujin.philip at kitware.com>
> To: Evan Kao <tossin at gmail.com>
> Cc: Shawn Waldon <shawn.waldon at kitware.com>, VTK Users
>         <vtkusers at vtk.org>
> Subject: Re: [vtkusers] Large performance difference between
>         vtkResampleWithDataSet in VTK 8.1.0 and Resample with Dataset filter
>         in Paraview 5.5
> Message-ID:
>         <CAEWo2JMYaneG=c29j4qrXVQw4pKuvBM6o4Yuq1JT9VzTpwkoZg at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Evan,
>
> I tried testing this on my end and I am seeing expected performance from
> VTK and ParaView. But the performance is dependent on the datasets used. Is
> it possible for you to share your datasets and scripts with us? Could you
> try this with smaller versions of your datasets and see if you are able to
> reproduce this?
>
> I am not familiar with the timeit module in Python. From the documentation
> it looks like it runs the code multiple times by default and prints the
> total time. Can you confirm if you have taken this into consideration in
> your script?
>
> A simple way to time operations in ParaView is to refer to the "Timer Log"
> under the "Tools" menu. You should see a line like:
>
> Execute vtkResampleWithDataSet id: 6788, 2.70556 seconds
>
>
> Thanks
> Sujin
>
>
> On Tue, May 15, 2018 at 1:05 PM, Evan Kao <tossin at gmail.com> wrote:
>
>> Hi Shawn and Sujin,
>>
>> Thanks for the quick responses.  The CPU on the computer I'm using is an
>> i7-6700
>> <https://ark.intel.com/products/88196/Intel-Core-i7-6700-Processor-8M-Cache-up-to-4_00-GHz>
>> with 4 cores, 8 threads, and 3.4 GHz frequency.
>>
>> Multi-threading may be a factor, but it's hard to tell because resampling
>> in ParaView is so quick.  ParaView is capable of using 100% of the CPU,
>> while VTK (in Python) will max out at 12-13%.  However, for these
>> particular datasets, resampling doesn't appear to stress ParaView that much
>> (11-16% when observing the Windows Task Manager, and some of that may be
>> because of the rendering).  However, I was under the impression that at
>> best multi-threading could only reduce the time it takes by N threads (ie
>> 8x), while the speed difference here is almost 1000x.  I measured the times
>> for ParaView 5.5, VTK 8.1 (compiled elsewhere), and VTK 7.1 (compiled by
>> our group):
>>
>>    1. ParaView 5.5 - 1.1s, using a stopwatch, multiple trials. Timing
>>    started the moment I clicked "Apply".
>>    2. VTK 8.1 - 922.47s, timed using Python's timeit module, measuring
>>    only the vtkResampleWithDataSet.Update() method.
>>    3. VTK 7.1 - 950.47s, timed the same way as above.
>>
>> I'm aware of the difference in labeling between VTK and ParaView for
>> Source and Input (which confuses me all the time).  I can verify the
>> correct data sets were assigned by saving the output (which should an
>> unstructured grid) and viewing it in ParaView - it looks identical to the
>> resampled data generated in ParaView (although it overwrites the point
>> scalars array and adds some ghost information that needs to be removed).
>>
>> Thanks,
>> Evan
>>
>> On Tue, May 15, 2018 at 7:38 AM, Sujin Philip <sujin.philip at kitware.com>
>> wrote:
>>
>>> Hi Evan,
>>>
>>> As Shawn mentioned it could be due to lack of multi-threading. Could you
>>> provide us the configuration of the system you are using? Like the number
>>> of cores/threads and the CPU frequency? Also please share the actual time
>>> that ParaView and VTK are taking. Is it possible for you to try out a
>>> slightly older VTK version and see if the performance difference is still
>>> there?
>>>
>>> Which dataset are you setting as input and which as source? The names are
>>> unfortunately opposite between VTK-m and ParaView due to legacy reasons.
>>> Probing with the unstructured grid as the source is much slower than
>>> probing with the structured grid as the source. So please confirm that the
>>> VTK pipeline is set up properly.
>>>
>>> Please let me know if none these seem to be the cause of your problem and
>>> I will dig deeper.
>>>
>>> Thanks
>>> Sujin
>>>
>>>
>>>
>>> On Tue, May 15, 2018 at 9:52 AM, Shawn Waldon <shawn.waldon at kitware.com>
>>> wrote:
>>>
>>>> Hi Evan,
>>>>
>>>> I suspect the differece is that the ParaView binaries were compiled with
>>>> TBB multithreading support and the Anaconda VTK was not.
>>>> vtkResampleWithDataSet is set up to use TBB multithreading if available.
>>>> Check the utilization of the cores on your computer when running each and
>>>> you will see ParaView using all available cores and Anaconda's VTK probably
>>>> only using one.  It is also possible the cell locator change improved
>>>> things further but I'm not familiar with that.
>>>>
>>>> HTH,
>>>>
>>>> Shawn
>>>>
>>>> On Mon, May 14, 2018 at 7:54 PM, Evan Kao <tossin at gmail.com> wrote:
>>>>
>>>>> Hello all,
>>>>>
>>>>> I am trying to resample a structured grid data (~1.4M points, 1.3M
>>>>> cells) with an unstructured grid (~320K points, 480K cells).  In Paraview
>>>>> 5.5, this resampling is nearly instant with the Resample With Dataset
>>>>> filter.  Yet in a Python script using vtkResampleWithDataSet from VTK
>>>>> 8.1.0, the same operation takes about 15 minutes (>2 orders of magnitude
>>>>> difference in speed).  As far as I can tell from the VTK repository on
>>>>> Gitlab, the only difference between the Paraview/release version and the
>>>>> 8.1.0 or 8.1.1 tagged releases is a switch in the cell locator.  Is this
>>>>> enough to explain the difference in the performance?  If not, could someone
>>>>> enlighten me as to what the possible factors are here?
>>>>>
>>>>> Also, if it matters, this is all on a Windows 7 64-bit machine.
>>>>> Paraview is installed from binaries, while VTK was downloaded from an
>>>>> Anaconda distribution compiled by a third party.
>>>>>
>>>>> Thanks for your time,
>>>>> Evan Kao
>>>>>
>>>>> _______________________________________________
>>>>> Powered by 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:
>>>>> https://vtk.org/mailman/listinfo/vtkusers
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Powered by 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:
>>>> https://vtk.org/mailman/listinfo/vtkusers
>>>>
>>>>
>>>
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <https://vtk.org/pipermail/vtkusers/attachments/20180515/a6b29d0d/attachment-0001.html>
>
> ------------------------------
>
> Message: 6
> Date: Tue, 15 May 2018 13:47:44 -0700
> From: Evan Kao <tossin at gmail.com>
> To: Sujin Philip <sujin.philip at kitware.com>
> Cc: Shawn Waldon <shawn.waldon at kitware.com>, VTK Users
>         <vtkusers at vtk.org>
> Subject: Re: [vtkusers] Large performance difference between
>         vtkResampleWithDataSet in VTK 8.1.0 and Resample with Dataset filter
>         in Paraview 5.5
> Message-ID:
>         <CAEhu9hAt8VgKdkvLCSmZNQzEd9+3MZt_FBmh7FhKvqoyEKJe7g at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hello Sujin,
>
> Using the TimerLog, I got the following time from ParaView:
>
> Execute vtkResampleWithDataSet id: 10345, 0.42 seconds
>
> As for the timeit module, you can see how I use it in the attached Python
> script.  I only use timeit's default_timer function to grab the time before
> and after completion of the vtkResampleWithDataSet method and take the
> difference as the time elapsed.  Regardless, qualitatively ParaView is
> near-instant while VTK takes a while.
>
> Google drive links to the datasets themselves are here (hopefully this
> doesn't trigger any mailing list filters): Unstructured Grid (35MB)
> <https://drive.google.com/open?id=1jvjiDlMJEJihB8OQneOeBzJXFiZKKYsR> |
> Structured
> Grid (70MB)
> <https://drive.google.com/open?id=1RYz4eORPWWf23n6G5am-9_F44zxEOHMl>
>
> If I get a chance, I'll take a look at using smaller data sets.
>
> - Evan
>
>
> On Tue, May 15, 2018 at 12:32 PM, Sujin Philip <sujin.philip at kitware.com>
> wrote:
>
>> Hi Evan,
>>
>> I tried testing this on my end and I am seeing expected performance from
>> VTK and ParaView. But the performance is dependent on the datasets used. Is
>> it possible for you to share your datasets and scripts with us? Could you
>> try this with smaller versions of your datasets and see if you are able to
>> reproduce this?
>>
>> I am not familiar with the timeit module in Python. From the documentation
>> it looks like it runs the code multiple times by default and prints the
>> total time. Can you confirm if you have taken this into consideration in
>> your script?
>>
>> A simple way to time operations in ParaView is to refer to the "Timer Log"
>> under the "Tools" menu. You should see a line like:
>>
>> Execute vtkResampleWithDataSet id: 6788, 2.70556 seconds
>>
>>
>> Thanks
>> Sujin
>>
>>
>> On Tue, May 15, 2018 at 1:05 PM, Evan Kao <tossin at gmail.com> wrote:
>>
>>> Hi Shawn and Sujin,
>>>
>>> Thanks for the quick responses.  The CPU on the computer I'm using is an
>>> i7-6700
>>> <https://ark.intel.com/products/88196/Intel-Core-i7-6700-Processor-8M-Cache-up-to-4_00-GHz>
>>> with 4 cores, 8 threads, and 3.4 GHz frequency.
>>>
>>> Multi-threading may be a factor, but it's hard to tell because resampling
>>> in ParaView is so quick.  ParaView is capable of using 100% of the CPU,
>>> while VTK (in Python) will max out at 12-13%.  However, for these
>>> particular datasets, resampling doesn't appear to stress ParaView that much
>>> (11-16% when observing the Windows Task Manager, and some of that may be
>>> because of the rendering).  However, I was under the impression that at
>>> best multi-threading could only reduce the time it takes by N threads (ie
>>> 8x), while the speed difference here is almost 1000x.  I measured the times
>>> for ParaView 5.5, VTK 8.1 (compiled elsewhere), and VTK 7.1 (compiled by
>>> our group):
>>>
>>>    1. ParaView 5.5 - 1.1s, using a stopwatch, multiple trials. Timing
>>>    started the moment I clicked "Apply".
>>>    2. VTK 8.1 - 922.47s, timed using Python's timeit module, measuring
>>>    only the vtkResampleWithDataSet.Update() method.
>>>    3. VTK 7.1 - 950.47s, timed the same way as above.
>>>
>>> I'm aware of the difference in labeling between VTK and ParaView for
>>> Source and Input (which confuses me all the time).  I can verify the
>>> correct data sets were assigned by saving the output (which should an
>>> unstructured grid) and viewing it in ParaView - it looks identical to the
>>> resampled data generated in ParaView (although it overwrites the point
>>> scalars array and adds some ghost information that needs to be removed).
>>>
>>> Thanks,
>>> Evan
>>>
>>> On Tue, May 15, 2018 at 7:38 AM, Sujin Philip <sujin.philip at kitware.com>
>>> wrote:
>>>
>>>> Hi Evan,
>>>>
>>>> As Shawn mentioned it could be due to lack of multi-threading. Could you
>>>> provide us the configuration of the system you are using? Like the number
>>>> of cores/threads and the CPU frequency? Also please share the actual time
>>>> that ParaView and VTK are taking. Is it possible for you to try out a
>>>> slightly older VTK version and see if the performance difference is still
>>>> there?
>>>>
>>>> Which dataset are you setting as input and which as source? The names
>>>> are unfortunately opposite between VTK-m and ParaView due to legacy
>>>> reasons. Probing with the unstructured grid as the source is much slower
>>>> than probing with the structured grid as the source. So please confirm that
>>>> the VTK pipeline is set up properly.
>>>>
>>>> Please let me know if none these seem to be the cause of your problem
>>>> and I will dig deeper.
>>>>
>>>> Thanks
>>>> Sujin
>>>>
>>>>
>>>>
>>>> On Tue, May 15, 2018 at 9:52 AM, Shawn Waldon <shawn.waldon at kitware.com>
>>>> wrote:
>>>>
>>>>> Hi Evan,
>>>>>
>>>>> I suspect the differece is that the ParaView binaries were compiled
>>>>> with TBB multithreading support and the Anaconda VTK was not.
>>>>> vtkResampleWithDataSet is set up to use TBB multithreading if available.
>>>>> Check the utilization of the cores on your computer when running each and
>>>>> you will see ParaView using all available cores and Anaconda's VTK probably
>>>>> only using one.  It is also possible the cell locator change improved
>>>>> things further but I'm not familiar with that.
>>>>>
>>>>> HTH,
>>>>>
>>>>> Shawn
>>>>>
>>>>> On Mon, May 14, 2018 at 7:54 PM, Evan Kao <tossin at gmail.com> wrote:
>>>>>
>>>>>> Hello all,
>>>>>>
>>>>>> I am trying to resample a structured grid data (~1.4M points, 1.3M
>>>>>> cells) with an unstructured grid (~320K points, 480K cells).  In Paraview
>>>>>> 5.5, this resampling is nearly instant with the Resample With Dataset
>>>>>> filter.  Yet in a Python script using vtkResampleWithDataSet from VTK
>>>>>> 8.1.0, the same operation takes about 15 minutes (>2 orders of magnitude
>>>>>> difference in speed).  As far as I can tell from the VTK repository on
>>>>>> Gitlab, the only difference between the Paraview/release version and the
>>>>>> 8.1.0 or 8.1.1 tagged releases is a switch in the cell locator.  Is this
>>>>>> enough to explain the difference in the performance?  If not, could someone
>>>>>> enlighten me as to what the possible factors are here?
>>>>>>
>>>>>> Also, if it matters, this is all on a Windows 7 64-bit machine.
>>>>>> Paraview is installed from binaries, while VTK was downloaded from an
>>>>>> Anaconda distribution compiled by a third party.
>>>>>>
>>>>>> Thanks for your time,
>>>>>> Evan Kao
>>>>>>
>>>>>> _______________________________________________
>>>>>> Powered by 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:
>>>>>> https://vtk.org/mailman/listinfo/vtkusers
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Powered by 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:
>>>>> https://vtk.org/mailman/listinfo/vtkusers
>>>>>
>>>>>
>>>>
>>>
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <https://vtk.org/pipermail/vtkusers/attachments/20180515/51575cc2/attachment-0001.html>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: test_vtkresamplewithdataset.py
> Type: application/octet-stream
> Size: 1287 bytes
> Desc: not available
> URL: <https://vtk.org/pipermail/vtkusers/attachments/20180515/51575cc2/attachment-0001.obj>
>
> ------------------------------
>
> Message: 7
> Date: Tue, 15 May 2018 17:36:10 -0400
> From: Sujin Philip <sujin.philip at kitware.com>
> To: Evan Kao <tossin at gmail.com>
> Cc: Shawn Waldon <shawn.waldon at kitware.com>, VTK Users
>         <vtkusers at vtk.org>
> Subject: Re: [vtkusers] Large performance difference between
>         vtkResampleWithDataSet in VTK 8.1.0 and Resample with Dataset filter
>         in Paraview 5.5
> Message-ID:
>         <CAEWo2JO_rBK=RFMJ2A+dAjiHWuBKtvV_GR7YXSJ-_7Yrdko-nA at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Evan,
>
> Thanks for sharing the data. I tried your script on my Linux desktop and
> the performance I see on both VTK and ParaView is similar and <1 second.
> This is even without threading enabled. I haven't tried this on Windows yet.
>
> BTW, there is an error in the script you shared. The inputs to the resample
> filter are in the wrong order and the "vtkXMLUnstructuredGridWriter" throws
> an error saying that the data passed to it is not an unstructured grid. I
> assume you want to resample the data values from the structured grid on to
> the geometry provided by the unstructured grid. The result will be an
> unstructured grid, which can be written by the
> "vtkXMLUnstructuredGridWrite". For this the input should be the "mesh" data
> and the source should be "image".
>
> So, currently I don't have a good explanation for what is causing the
> performance degradation for you. It might be some issues with the builds,
> or the Windows setup. You can maybe try building VTK yourself (make sure to
> build in "Release" mode), or try another machine and see if the problem
> persists. I will also try to reproduce this on a Windows machine.
>
> Thanks
> Sujin
>
>
> On Tue, May 15, 2018 at 4:47 PM, Evan Kao <tossin at gmail.com> wrote:
>
>> Hello Sujin,
>>
>> Using the TimerLog, I got the following time from ParaView:
>>
>> Execute vtkResampleWithDataSet id: 10345, 0.42 seconds
>>
>> As for the timeit module, you can see how I use it in the attached Python
>> script.  I only use timeit's default_timer function to grab the time before
>> and after completion of the vtkResampleWithDataSet method and take the
>> difference as the time elapsed.  Regardless, qualitatively ParaView is
>> near-instant while VTK takes a while.
>>
>> Google drive links to the datasets themselves are here (hopefully this
>> doesn't trigger any mailing list filters): Unstructured Grid (35MB)
>> <https://drive.google.com/open?id=1jvjiDlMJEJihB8OQneOeBzJXFiZKKYsR> | Structured
>> Grid (70MB)
>> <https://drive.google.com/open?id=1RYz4eORPWWf23n6G5am-9_F44zxEOHMl>
>>
>> If I get a chance, I'll take a look at using smaller data sets.
>>
>> - Evan
>>
>>
>> On Tue, May 15, 2018 at 12:32 PM, Sujin Philip <sujin.philip at kitware.com>
>> wrote:
>>
>>> Hi Evan,
>>>
>>> I tried testing this on my end and I am seeing expected performance from
>>> VTK and ParaView. But the performance is dependent on the datasets used. Is
>>> it possible for you to share your datasets and scripts with us? Could you
>>> try this with smaller versions of your datasets and see if you are able to
>>> reproduce this?
>>>
>>> I am not familiar with the timeit module in Python. From the
>>> documentation it looks like it runs the code multiple times by default and
>>> prints the total time. Can you confirm if you have taken this into
>>> consideration in your script?
>>>
>>> A simple way to time operations in ParaView is to refer to the "Timer
>>> Log" under the "Tools" menu. You should see a line like:
>>>
>>> Execute vtkResampleWithDataSet id: 6788, 2.70556 seconds
>>>
>>>
>>> Thanks
>>> Sujin
>>>
>>>
>>> On Tue, May 15, 2018 at 1:05 PM, Evan Kao <tossin at gmail.com> wrote:
>>>
>>>> Hi Shawn and Sujin,
>>>>
>>>> Thanks for the quick responses.  The CPU on the computer I'm using is an
>>>> i7-6700
>>>> <https://ark.intel.com/products/88196/Intel-Core-i7-6700-Processor-8M-Cache-up-to-4_00-GHz>
>>>> with 4 cores, 8 threads, and 3.4 GHz frequency.
>>>>
>>>> Multi-threading may be a factor, but it's hard to tell because
>>>> resampling in ParaView is so quick.  ParaView is capable of using 100% of
>>>> the CPU, while VTK (in Python) will max out at 12-13%.  However, for these
>>>> particular datasets, resampling doesn't appear to stress ParaView that much
>>>> (11-16% when observing the Windows Task Manager, and some of that may be
>>>> because of the rendering).  However, I was under the impression that at
>>>> best multi-threading could only reduce the time it takes by N threads (ie
>>>> 8x), while the speed difference here is almost 1000x.  I measured the times
>>>> for ParaView 5.5, VTK 8.1 (compiled elsewhere), and VTK 7.1 (compiled by
>>>> our group):
>>>>
>>>>    1. ParaView 5.5 - 1.1s, using a stopwatch, multiple trials. Timing
>>>>    started the moment I clicked "Apply".
>>>>    2. VTK 8.1 - 922.47s, timed using Python's timeit module, measuring
>>>>    only the vtkResampleWithDataSet.Update() method.
>>>>    3. VTK 7.1 - 950.47s, timed the same way as above.
>>>>
>>>> I'm aware of the difference in labeling between VTK and ParaView for
>>>> Source and Input (which confuses me all the time).  I can verify the
>>>> correct data sets were assigned by saving the output (which should an
>>>> unstructured grid) and viewing it in ParaView - it looks identical to the
>>>> resampled data generated in ParaView (although it overwrites the point
>>>> scalars array and adds some ghost information that needs to be removed).
>>>>
>>>> Thanks,
>>>> Evan
>>>>
>>>> On Tue, May 15, 2018 at 7:38 AM, Sujin Philip <sujin.philip at kitware.com>
>>>> wrote:
>>>>
>>>>> Hi Evan,
>>>>>
>>>>> As Shawn mentioned it could be due to lack of multi-threading. Could
>>>>> you provide us the configuration of the system you are using? Like the
>>>>> number of cores/threads and the CPU frequency? Also please share the actual
>>>>> time that ParaView and VTK are taking. Is it possible for you to try out a
>>>>> slightly older VTK version and see if the performance difference is still
>>>>> there?
>>>>>
>>>>> Which dataset are you setting as input and which as source? The names
>>>>> are unfortunately opposite between VTK-m and ParaView due to legacy
>>>>> reasons. Probing with the unstructured grid as the source is much slower
>>>>> than probing with the structured grid as the source. So please confirm that
>>>>> the VTK pipeline is set up properly.
>>>>>
>>>>> Please let me know if none these seem to be the cause of your problem
>>>>> and I will dig deeper.
>>>>>
>>>>> Thanks
>>>>> Sujin
>>>>>
>>>>>
>>>>>
>>>>> On Tue, May 15, 2018 at 9:52 AM, Shawn Waldon <shawn.waldon at kitware.com
>>>>> > wrote:
>>>>>
>>>>>> Hi Evan,
>>>>>>
>>>>>> I suspect the differece is that the ParaView binaries were compiled
>>>>>> with TBB multithreading support and the Anaconda VTK was not.
>>>>>> vtkResampleWithDataSet is set up to use TBB multithreading if available.
>>>>>> Check the utilization of the cores on your computer when running each and
>>>>>> you will see ParaView using all available cores and Anaconda's VTK probably
>>>>>> only using one.  It is also possible the cell locator change improved
>>>>>> things further but I'm not familiar with that.
>>>>>>
>>>>>> HTH,
>>>>>>
>>>>>> Shawn
>>>>>>
>>>>>> On Mon, May 14, 2018 at 7:54 PM, Evan Kao <tossin at gmail.com> wrote:
>>>>>>
>>>>>>> Hello all,
>>>>>>>
>>>>>>> I am trying to resample a structured grid data (~1.4M points, 1.3M
>>>>>>> cells) with an unstructured grid (~320K points, 480K cells).  In Paraview
>>>>>>> 5.5, this resampling is nearly instant with the Resample With Dataset
>>>>>>> filter.  Yet in a Python script using vtkResampleWithDataSet from VTK
>>>>>>> 8.1.0, the same operation takes about 15 minutes (>2 orders of magnitude
>>>>>>> difference in speed).  As far as I can tell from the VTK repository on
>>>>>>> Gitlab, the only difference between the Paraview/release version and the
>>>>>>> 8.1.0 or 8.1.1 tagged releases is a switch in the cell locator.  Is this
>>>>>>> enough to explain the difference in the performance?  If not, could someone
>>>>>>> enlighten me as to what the possible factors are here?
>>>>>>>
>>>>>>> Also, if it matters, this is all on a Windows 7 64-bit machine.
>>>>>>> Paraview is installed from binaries, while VTK was downloaded from an
>>>>>>> Anaconda distribution compiled by a third party.
>>>>>>>
>>>>>>> Thanks for your time,
>>>>>>> Evan Kao
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Powered by 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:
>>>>>>> https://vtk.org/mailman/listinfo/vtkusers
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Powered by 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:
>>>>>> https://vtk.org/mailman/listinfo/vtkusers
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <https://vtk.org/pipermail/vtkusers/attachments/20180515/1eaecaed/attachment-0001.html>
>
> ------------------------------
>
> Message: 8
> Date: Tue, 15 May 2018 15:28:43 -0700
> From: Evan Kao <tossin at gmail.com>
> To: Sujin Philip <sujin.philip at kitware.com>
> Cc: Shawn Waldon <shawn.waldon at kitware.com>, VTK Users
>         <vtkusers at vtk.org>
> Subject: Re: [vtkusers] Large performance difference between
>         vtkResampleWithDataSet in VTK 8.1.0 and Resample with Dataset filter
>         in Paraview 5.5
> Message-ID:
>         <CAEhu9hBc4LG0AupFLRRy4LBJAN2=UrMck6+JSzpiKtwRSyQUkA at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Sujin,
>
> I thought I had put in the correct source/input, but I suppose I should
> have checked more closely.  Still, it didn't make that much of a difference
> (634s or 10.5 min).  I'll continue checking if this problem persists for me
> on other platforms.
>
> I also tried using vtkResampleWithDataSet inside a Programmable Filter in
> ParaView, and it performed quickly (0.98s).
>
> Is it possible to see the build flags for your version of VTK, or the ones
> that were used for the ParaView binaries?  Were you using testing on VTK
> 8.1 or the latest version?
>
> Thanks,
> Evan Kao
>
> On Tue, May 15, 2018 at 2:36 PM, Sujin Philip <sujin.philip at kitware.com>
> wrote:
>
>> Hi Evan,
>>
>> Thanks for sharing the data. I tried your script on my Linux desktop and
>> the performance I see on both VTK and ParaView is similar and <1 second.
>> This is even without threading enabled. I haven't tried this on Windows yet.
>>
>> BTW, there is an error in the script you shared. The inputs to the
>> resample filter are in the wrong order and the
>> "vtkXMLUnstructuredGridWriter" throws an error saying that the data passed
>> to it is not an unstructured grid. I assume you want to resample the data
>> values from the structured grid on to the geometry provided by the
>> unstructured grid. The result will be an unstructured grid, which can be
>> written by the "vtkXMLUnstructuredGridWrite". For this the input should be
>> the "mesh" data and the source should be "image".
>>
>> So, currently I don't have a good explanation for what is causing the
>> performance degradation for you. It might be some issues with the builds,
>> or the Windows setup. You can maybe try building VTK yourself (make sure to
>> build in "Release" mode), or try another machine and see if the problem
>> persists. I will also try to reproduce this on a Windows machine.
>>
>> Thanks
>> Sujin
>>
>>
>> On Tue, May 15, 2018 at 4:47 PM, Evan Kao <tossin at gmail.com> wrote:
>>
>>> Hello Sujin,
>>>
>>> Using the TimerLog, I got the following time from ParaView:
>>>
>>> Execute vtkResampleWithDataSet id: 10345, 0.42 seconds
>>>
>>> As for the timeit module, you can see how I use it in the attached Python
>>> script.  I only use timeit's default_timer function to grab the time before
>>> and after completion of the vtkResampleWithDataSet method and take the
>>> difference as the time elapsed.  Regardless, qualitatively ParaView is
>>> near-instant while VTK takes a while.
>>>
>>> Google drive links to the datasets themselves are here (hopefully this
>>> doesn't trigger any mailing list filters): Unstructured Grid (35MB)
>>> <https://drive.google.com/open?id=1jvjiDlMJEJihB8OQneOeBzJXFiZKKYsR> | Structured
>>> Grid (70MB)
>>> <https://drive.google.com/open?id=1RYz4eORPWWf23n6G5am-9_F44zxEOHMl>
>>>
>>> If I get a chance, I'll take a look at using smaller data sets.
>>>
>>> - Evan
>>>
>>>
>>> On Tue, May 15, 2018 at 12:32 PM, Sujin Philip <sujin.philip at kitware.com>
>>> wrote:
>>>
>>>> Hi Evan,
>>>>
>>>> I tried testing this on my end and I am seeing expected performance from
>>>> VTK and ParaView. But the performance is dependent on the datasets used. Is
>>>> it possible for you to share your datasets and scripts with us? Could you
>>>> try this with smaller versions of your datasets and see if you are able to
>>>> reproduce this?
>>>>
>>>> I am not familiar with the timeit module in Python. From the
>>>> documentation it looks like it runs the code multiple times by default and
>>>> prints the total time. Can you confirm if you have taken this into
>>>> consideration in your script?
>>>>
>>>> A simple way to time operations in ParaView is to refer to the "Timer
>>>> Log" under the "Tools" menu. You should see a line like:
>>>>
>>>> Execute vtkResampleWithDataSet id: 6788, 2.70556 seconds
>>>>
>>>>
>>>> Thanks
>>>> Sujin
>>>>
>>>>
>>>> On Tue, May 15, 2018 at 1:05 PM, Evan Kao <tossin at gmail.com> wrote:
>>>>
>>>>> Hi Shawn and Sujin,
>>>>>
>>>>> Thanks for the quick responses.  The CPU on the computer I'm using is
>>>>> an i7-6700
>>>>> <https://ark.intel.com/products/88196/Intel-Core-i7-6700-Processor-8M-Cache-up-to-4_00-GHz>
>>>>> with 4 cores, 8 threads, and 3.4 GHz frequency.
>>>>>
>>>>> Multi-threading may be a factor, but it's hard to tell because
>>>>> resampling in ParaView is so quick.  ParaView is capable of using 100% of
>>>>> the CPU, while VTK (in Python) will max out at 12-13%.  However, for these
>>>>> particular datasets, resampling doesn't appear to stress ParaView that much
>>>>> (11-16% when observing the Windows Task Manager, and some of that may be
>>>>> because of the rendering).  However, I was under the impression that at
>>>>> best multi-threading could only reduce the time it takes by N threads (ie
>>>>> 8x), while the speed difference here is almost 1000x.  I measured the times
>>>>> for ParaView 5.5, VTK 8.1 (compiled elsewhere), and VTK 7.1 (compiled by
>>>>> our group):
>>>>>
>>>>>    1. ParaView 5.5 - 1.1s, using a stopwatch, multiple trials. Timing
>>>>>    started the moment I clicked "Apply".
>>>>>    2. VTK 8.1 - 922.47s, timed using Python's timeit module, measuring
>>>>>    only the vtkResampleWithDataSet.Update() method.
>>>>>    3. VTK 7.1 - 950.47s, timed the same way as above.
>>>>>
>>>>> I'm aware of the difference in labeling between VTK and ParaView for
>>>>> Source and Input (which confuses me all the time).  I can verify the
>>>>> correct data sets were assigned by saving the output (which should an
>>>>> unstructured grid) and viewing it in ParaView - it looks identical to the
>>>>> resampled data generated in ParaView (although it overwrites the point
>>>>> scalars array and adds some ghost information that needs to be removed).
>>>>>
>>>>> Thanks,
>>>>> Evan
>>>>>
>>>>> On Tue, May 15, 2018 at 7:38 AM, Sujin Philip <sujin.philip at kitware.com
>>>>> > wrote:
>>>>>
>>>>>> Hi Evan,
>>>>>>
>>>>>> As Shawn mentioned it could be due to lack of multi-threading. Could
>>>>>> you provide us the configuration of the system you are using? Like the
>>>>>> number of cores/threads and the CPU frequency? Also please share the actual
>>>>>> time that ParaView and VTK are taking. Is it possible for you to try out a
>>>>>> slightly older VTK version and see if the performance difference is still
>>>>>> there?
>>>>>>
>>>>>> Which dataset are you setting as input and which as source? The names
>>>>>> are unfortunately opposite between VTK-m and ParaView due to legacy
>>>>>> reasons. Probing with the unstructured grid as the source is much slower
>>>>>> than probing with the structured grid as the source. So please confirm that
>>>>>> the VTK pipeline is set up properly.
>>>>>>
>>>>>> Please let me know if none these seem to be the cause of your problem
>>>>>> and I will dig deeper.
>>>>>>
>>>>>> Thanks
>>>>>> Sujin
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Tue, May 15, 2018 at 9:52 AM, Shawn Waldon <
>>>>>> shawn.waldon at kitware.com> wrote:
>>>>>>
>>>>>>> Hi Evan,
>>>>>>>
>>>>>>> I suspect the differece is that the ParaView binaries were compiled
>>>>>>> with TBB multithreading support and the Anaconda VTK was not.
>>>>>>> vtkResampleWithDataSet is set up to use TBB multithreading if available.
>>>>>>> Check the utilization of the cores on your computer when running each and
>>>>>>> you will see ParaView using all available cores and Anaconda's VTK probably
>>>>>>> only using one.  It is also possible the cell locator change improved
>>>>>>> things further but I'm not familiar with that.
>>>>>>>
>>>>>>> HTH,
>>>>>>>
>>>>>>> Shawn
>>>>>>>
>>>>>>> On Mon, May 14, 2018 at 7:54 PM, Evan Kao <tossin at gmail.com> wrote:
>>>>>>>
>>>>>>>> Hello all,
>>>>>>>>
>>>>>>>> I am trying to resample a structured grid data (~1.4M points, 1.3M
>>>>>>>> cells) with an unstructured grid (~320K points, 480K cells).  In Paraview
>>>>>>>> 5.5, this resampling is nearly instant with the Resample With Dataset
>>>>>>>> filter.  Yet in a Python script using vtkResampleWithDataSet from VTK
>>>>>>>> 8.1.0, the same operation takes about 15 minutes (>2 orders of magnitude
>>>>>>>> difference in speed).  As far as I can tell from the VTK repository on
>>>>>>>> Gitlab, the only difference between the Paraview/release version and the
>>>>>>>> 8.1.0 or 8.1.1 tagged releases is a switch in the cell locator.  Is this
>>>>>>>> enough to explain the difference in the performance?  If not, could someone
>>>>>>>> enlighten me as to what the possible factors are here?
>>>>>>>>
>>>>>>>> Also, if it matters, this is all on a Windows 7 64-bit machine.
>>>>>>>> Paraview is installed from binaries, while VTK was downloaded from an
>>>>>>>> Anaconda distribution compiled by a third party.
>>>>>>>>
>>>>>>>> Thanks for your time,
>>>>>>>> Evan Kao
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Powered by 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:
>>>>>>>> https://vtk.org/mailman/listinfo/vtkusers
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Powered by 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:
>>>>>>> https://vtk.org/mailman/listinfo/vtkusers
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <https://vtk.org/pipermail/vtkusers/attachments/20180515/a379d6a6/attachment-0001.html>
>
> ------------------------------
>
> Message: 9
> Date: Wed, 16 May 2018 09:22:22 +0900
> From: kenichiro yoshimi <rccm.kyoshimi at gmail.com>
> To: "Slaughter, Andrew E" <andrew.slaughter at inl.gov>
> Cc: vtk <vtkusers at vtk.org>
> Subject: Re: [vtkusers] Time Interpolation
> Message-ID:
>         <CAHDyfPD+9byXue8wEqPevtXnT0-FuBEKH8ac=Ty8kT0NC_2Lwg at mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> Hi Andrew,
>
> I use the second vtkExtractTimeSteps to extract the hoping time step
> from the output of vtkTemporalInterpolator
> which contains multiple time steps like [0, 1(index of specfiedTime),
> ...] in my code. Especially, specified time step index is needed to be
> "1" in extractTime2 filter:
>   extractTime2.AddTimeStepIndex(1)
> because the index of hoping time is made indicate "1" in
> vtkTemporalInterpolator.
>
> Best Regards
>
> 2018-05-15 23:37 GMT+09:00 Slaughter, Andrew E <andrew.slaughter at inl.gov>:
>> This is great, thanks for taking time to get this working. I have one
>> question, what is the purpose of the second vtkExtractTimeSteps?
>>
>> On Tue, May 15, 2018 at 2:13 AM, kenichiro yoshimi <rccm.kyoshimi at gmail.com>
>> wrote:
>>>
>>> Hello Andrew,
>>>
>>> I found a dirty way using vtkTemporalInterpolator and
>>> vtkExtractTimeSteps as follows, and you can set an arbitrary time
>>> value to "specifiedTime" within the code:
>>>
>>> ----
>>> #!/usr/bin/env python
>>> import os
>>> import vtk
>>> import numpy as np
>>>
>>> specifiedTime = 0.18
>>>
>>> # Input file and variable
>>> filename = os.path.abspath('mug.e')
>>> nodal_var = 'convected'
>>>
>>> # Read Exodus Data
>>> reader = vtk.vtkExodusIIReader()
>>> reader.SetFileName(filename)
>>> reader.UpdateInformation()
>>> reader.SetTimeStep(10)
>>> reader.SetAllArrayStatus(vtk.vtkExodusIIReader.NODAL, 1)
>>> #reader.Update(); print reader
>>>
>>> info =
>>> reader.GetExecutive().GetOutputInformation().GetInformationObject(0)
>>> key = vtk.vtkStreamingDemandDrivenPipeline.TIME_STEPS()
>>> times = np.array([info.Get(key,i) for i in range(info.Length(key))])
>>> index = np.max(np.where(times <= specifiedTime))
>>>
>>> extractTime = vtk.vtkExtractTimeSteps()
>>> extractTime.SetInputConnection(0, reader.GetOutputPort(0))
>>> extractTime.SetTimeStepIndices(2, [index, index+1])
>>>
>>> # Time interpolation (How do I set this up?)
>>> time = vtk.vtkTemporalInterpolator()
>>> time.SetInputConnection(0, extractTime.GetOutputPort(0))
>>> time.SetDiscreteTimeStepInterval(specifiedTime - times[index])
>>> time.UpdateTimeStep(specifiedTime)
>>>
>>> extractTime2 = vtk.vtkExtractTimeSteps()
>>> extractTime2.SetInputConnection(0, time.GetOutputPort(0))
>>> extractTime2.AddTimeStepIndex(1)
>>>
>>> # Create Geometry
>>> geometry = vtk.vtkCompositeDataGeometryFilter()
>>> geometry.SetInputConnection(0, extractTime2.GetOutputPort(0))
>>> geometry.Update()
>>>
>>> writer = vtk.vtkExodusIIWriter()
>>> writer.SetInputConnection(0, geometry.GetOutputPort())
>>> writer.SetFileName('time.e')
>>> writer.WriteAllTimeStepsOn()
>>> writer.Write()
>>>
>>> # Mapper
>>> mapper = vtk.vtkPolyDataMapper()
>>> mapper.SetInputConnection(geometry.GetOutputPort())
>>> mapper.SelectColorArray(nodal_var)
>>> mapper.SetScalarModeToUsePointFieldData()
>>> mapper.InterpolateScalarsBeforeMappingOn()
>>>
>>> # Actor
>>> actor = vtk.vtkActor()
>>> actor.SetMapper(mapper)
>>>
>>> # Renderer
>>> renderer = vtk.vtkRenderer()
>>> renderer.AddViewProp(actor)
>>>
>>> # Window and Interactor
>>> window = vtk.vtkRenderWindow()
>>> window.AddRenderer(renderer)
>>> window.SetSize(600, 600)
>>>
>>> interactor = vtk.vtkRenderWindowInteractor()
>>> interactor.SetRenderWindow(window)
>>> interactor.Initialize()
>>>
>>> # Show the result
>>> window.Render()
>>> interactor.Start()
>>> ----
>>>
>>> Best
>>>
>>> 2018-05-11 2:06 GMT+09:00 Slaughter, Andrew E <andrew.slaughter at inl.gov>:
>>> > I was hoping someone could help me setup interpolation for ExodusII
>>> > data.
>>> > The attached python scripts (I am using MacOS; python2.7; vtk7.1) reads
>>> > the
>>> > ExodusII file (mug.e). I would like to be able to set an arbitrary time
>>> > value and have VTK perform the interpolation, would someone please help
>>> > me
>>> > get this working? I have two versions I am working on, one using
>>> > vtkTemporalInterpolator and the other with
>>> > vtkInterpolateDataSetAttributes.
>>> > I am happy using either class, I just need it to work.
>>> >
>>> > I am aware that some of these features are built into Paraview, but my
>>> > project requires me to make this work with pure VTK.
>>> >
>>> > Thanks,
>>> >
>>> > Andrew
>>> >
>>> > _______________________________________________
>>> > Powered by www.kitware.com
>>> >
>>> > Visit other Kitware open-source projects at
>>> >
>>> > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html&d=DwIBaQ&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=puHckBK1HPjYo6fLuDnW7Rsr9yj_a2niN1Z4KRui5BM&s=E7mpGidBh-HqQHk8zv6FqPKcN2BAfHg5FyshFS96aAM&e=
>>> >
>>> > Please keep messages on-topic and check the VTK FAQ at:
>>> >
>>> > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_VTK-5FFAQ&d=DwIBaQ&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=puHckBK1HPjYo6fLuDnW7Rsr9yj_a2niN1Z4KRui5BM&s=__QxFPfkRQHlaX87BPaTQqC3-xiuwKePex8T9KtAD8Q&e=
>>> >
>>> > Search the list archives at:
>>> > https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=DwIBaQ&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=puHckBK1HPjYo6fLuDnW7Rsr9yj_a2niN1Z4KRui5BM&s=CNEA4K6JVEFn6AGYM0fYeW0rg6ENnWlIx_cTPpb7zHM&e=
>>> >
>>> > Follow this link to subscribe/unsubscribe:
>>> >
>>> > https://urldefense.proofpoint.com/v2/url?u=https-3A__vtk.org_mailman_listinfo_vtkusers&d=DwIBaQ&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=puHckBK1HPjYo6fLuDnW7Rsr9yj_a2niN1Z4KRui5BM&s=DJXa7N2JNLCUAVjyuFKhbN5PDsErajyMP1cjw0MJQyg&e=
>>> >
>>
>>
>
>
> ------------------------------
>
> Message: 10
> Date: Tue, 15 May 2018 20:10:53 -0700
> From: Bill Lorensen <bill.lorensen at gmail.com>
> To: VTK Users <vtkusers at vtk.org>, VTK Developers
>         <vtk-developers at vtk.org>
> Subject: [vtkusers] ANN: Latex and Markdown versions of the VTK
>         textbook
> Message-ID:
>         <CADZJ4hNk99WyOhiUB-mM00L9waA_FmVrH7j_mj00AqOzP281CA at mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> Folks,
>
> We have been busy converting the current online PDF version of the VTK
> Textbook. The two efforts include a Latex version led by Andrew
> Maclean and a markdown version led by Bill Lorensen. Will
> Schroeder provided encouragement and a high-resolution PDF of the
> textbook. Bernhard Meehan provided us with Latex versions for most of
> the 155 equations. Jon Haitz Legarreta helped with Latex formatting.
>
> The two versions serve two different goals. The Latex version is
> duplicating the original text that was written using Adobe's
> Framemaker. The goal is to produce a version with links to figures,
> references, equations, examples, etc. Figures that exist in the
> VTKExamples are kept up-to-date.  Hopefully, by using a more familiar
> format (Latex), this version will serve as a base for community
> updates and future versions of the text.
>
> The Markdown version is an interactive, platform friendly version of
> the book. The entire text is available as a  Chapter by Chapter web
> site. The figures that exist as VTK Examples are linked to the nightly
> output of the regression testing. Also, all vtk classes in the text
> are linked to the doxygen descripti0on of the class. Example code that
> produces book figures links back to the figure in the text. This
> allows easy movement from text to examples and back. This version is
> smartphone and tablet friendly.
>
> The current version of the Latex textbook is here:
> https://raw.githubusercontent.com/lorensen/VTKExamples/master/src/VTKBookLaTex/VTKTextBook.pdf
>
> The alpha version of all Chapters of the Markdown text starts here:
> https://lorensen.github.io/VTKExamples/site/VTKBook/01Chapter1/
>
> A more detailed description of both efforts is here:
> https://lorensen.github.io/VTKExamples/site/VTKBook/
>
>
> If you are on researchgate.net you can follow the VTKExamples at
> https://www.researchgate.net/project/VTK-Examples
>
> As always, we welcome positive and constructive comments.
>
> Enjoy,
>
> Bill
>
>
> --
> Unpaid intern in BillsParadise at noware dot com
>
>
> ------------------------------
>
> Message: 11
> Date: Tue, 15 May 2018 20:40:29 -0700 (MST)
> From: ashishbme <ashishbme at gmail.com>
> To: vtkusers at vtk.org
> Subject: Re: [vtkusers] VtkDistanceWidget label text font
> Message-ID: <1526442029141-0.post at n5.nabble.com>
> Content-Type: text/plain; charset=us-ascii
>
> Hi kenichiro yoshimi,
>
> Thank you, solution provided by you worked for me.
>
> Regards
> Ashish
>
>
>
> --
> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
>
>
> ------------------------------
>
> Message: 12
> Date: Tue, 15 May 2018 23:49:42 -0700 (MST)
> From: Andaharoo <Andx_roo at live.com>
> To: vtkusers at vtk.org
> Subject: [vtkusers] Wireframe and Volume Rendering
> Message-ID: <1526453382123-0.post at n5.nabble.com>
> Content-Type: text/plain; charset=us-ascii
>
> Rendering wireframes over a volume doesn't seem to work correctly. The volume
> just disappears? Is there a simple fix/flag or something I'm missing? The
> lines intermix fine with the volume. But the volume behind the plane doesn't
> show.
>
> <http://vtk.1045678.n5.nabble.com/file/t342007/example.png>
>
>
>
> --
> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
>
>
> ------------------------------
>
> Message: 13
> Date: Wed, 16 May 2018 04:15:45 -0700 (MST)
> From: ochampao <ochampao at hotmail.com>
> To: vtkusers at vtk.org
> Subject: Re: [vtkusers] Correct anatomical orientation of volumes from
>         Niftii and DICOM
> Message-ID: <1526469345889-0.post at n5.nabble.com>
> Content-Type: text/plain; charset=us-ascii
>
> Hi David,
>
> I've used your suggestion to verify the camera configuration with
> vtkAxesActor. In combination with the AnatomicalOrientation [1] example, it
> was very helpful. I think now I've setup the camera in the 3 views to follow
> (hopefully correctly) the RAS coordinate system convention. See screenshot
> with the axes.
>
> <http://vtk.1045678.n5.nabble.com/file/t341857/2018-05-16_10_29_01-kPlan_TPM.png>
>
> I have also switched to using vtkDICOMReader (vtk-dicom 0.87 + VTK8.1) for
> loading from DICOM. This is so that I can make use of the vtkDICOMToRAS
> class to account for the change in coordinate system from LPS to RAS (until
> I am comfortable enough to write my own conversion methods). See loadDicom()
> method below. Despite making these changes I still see the images flipped
> horizontally (referring to the axial view and also comparing with Slicer
> which as I understand also uses RAS).
>
> <http://vtk.1045678.n5.nabble.com/file/t341857/2018-05-16_12_12_42-kPlan_TPM.png>
>
> Assumuing my camera setup is indeed correct, shouldn't vtkDICOMToRAS account
> for the switch in coordinates? Are some steps missing? Why do I see this
> horizontal flip?
>
> I've included below the relevant code for setting up the cameras and loading
> Dicom.
>
> Thanks for your help.
> Panos.
>
> [1]
> https://lorensen.github.io/VTKExamples/site/Cxx/VisualizationAlgorithms/AnatomicalOrientation/
> <https://lorensen.github.io/VTKExamples/site/Cxx/VisualizationAlgorithms/AnatomicalOrientation/>
>
> // ================================================
> //     loadDicom()
> // ================================================
> vtkSmartPointer<vtkImageData> QuadView::loadDicom(const char* path) const
> {
>         vtkNew<vtkGlobFileNames> fileGlob;
>         fileGlob->SetDirectory(path);
>         fileGlob->AddFileNames("*.dcm");
>         vtkSmartPointer<vtkStringArray> vtkStringFilenames =
> fileGlob->GetFileNames();
>
>         vtkNew<vtkDICOMReader> reader;
>         reader->SetFileNames(vtkStringFilenames);
>         reader->SetMemoryRowOrderToFileNative();
>         reader->UpdateInformation();
>
>         vtkNew<vtkDICOMToRAS> converterLPSToRAS;
>         converterLPSToRAS->SetInputConnection(reader->GetOutputPort());
>         converterLPSToRAS->SetPatientMatrix(reader->GetPatientMatrix());
>         converterLPSToRAS->SetAllowRowReordering(true);
>         converterLPSToRAS->SetAllowColumnReordering(true);
>         converterLPSToRAS->UpdateMatrix();
>         converterLPSToRAS->Update();
>
>         return converterLPSToRAS->GetOutput();
> }
>
> // ================================================
> //     resetCameras2D()
> // ================================================
> void QuadView::resetCameras2D() const
> {
>     // iterate through the active 2D views.
>     for (const auto &view : mQuadViewUI.getQVTKOpenGLWidget2DKeyList())
>     {
>         // Reset camera & clipping range
>         mPipelineObject2DContainer.at(view).renderer->ResetCamera();
>
>         switch (view)
>                 {
>                         case IQuadViewUI::VTKDockWidget::TopLeft: //Axial
>                         {
>                                 double viewUp[3] = { 0, 1, 0 };
>                                 double leftToRight[3] = { 1, 0, 0 };
>                                 vtkCamera* camera =
>                                         mPipelineObject2DContainer.at(view).renderer->GetActiveCamera();
>
>                                 setImageOrientation(leftToRight, viewUp, *camera);
>                                 camera->OrthogonalizeViewUp();
>                                 break;
>                         }
>                         case IQuadViewUI::VTKDockWidget::TopRight: //Sagittal
>                         {
>                                 double viewUp[3] = { 0, 0, 1 };
>                                 double leftToRight[3] = { 0, -1, 0 };
>                                 vtkCamera* camera =
>                                         mPipelineObject2DContainer.at(view).renderer->GetActiveCamera();
>
>                                 setImageOrientation(leftToRight, viewUp, *camera);
>                                 camera->OrthogonalizeViewUp();
>                                 break;
>                         }
>                         case IQuadViewUI::VTKDockWidget::BottomLeft: //Coronal
>                         {
>                                 double viewUp[3] = { 0, 0, 1 };
>                                 double leftToRight[3] = { 1, 0, 0 };
>                                 vtkCamera* camera =
>                                         mPipelineObject2DContainer.at(view).renderer->GetActiveCamera();
>
>                                 setImageOrientation(leftToRight, viewUp, *camera);
>                                 camera->OrthogonalizeViewUp();
>                                 break;
>                         }
>                         default:
>                                 break;
>                 }
>     }
> }
>
> // ================================================
> //     setImageOrientation()
> // ================================================
> void QuadView::setImageOrientation(const double leftToRight[3], const double
> viewUp[3], vtkCamera &camera) const
> {
>         // from vtkInteractorStyleImage::SetImageOrientation()
>
>         // compute the view plane normal, which points out of the screen, through
> the cross product
>         double normal[3];
>         vtkMath::Cross(leftToRight, viewUp, normal);
>
>         // get the camera focus
>         double focus[3];
>         camera.GetFocalPoint(focus);
>
>         // get the camera distance from the focus
>         double d = camera.GetDistance();
>
>         // position the camera on view plane normal keeping the focus and the
> distance from it fixed
>         camera.SetPosition(
>                 focus[0] + d*normal[0],
>                 focus[1] + d*normal[1],
>                 focus[2] + d*normal[2]);
>
>         // make sure focus is the same
>         camera.SetFocalPoint(focus);
>
>         // setup view up vector
>         camera.SetViewUp(viewUp);
> }
>
>
>
> --
> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
>
>
> ------------------------------
>
> Message: 14
> Date: Wed, 16 May 2018 15:57:59 +0200
> From: Petr Matou?ek <p3tr.matousek at gmail.com>
> To: vtkusers at vtk.org
> Subject: [vtkusers] nested vtkPropAssembly visibility
> Message-ID: <10e7edab-0cb8-505c-29ec-3303720214cd at gmail.com>
> Content-Type: text/plain; charset=iso-8859-2; format=flowed
>
> Hello,
>
> I have the following assembly hierarchy:
>
> vtkPropAssembly1 -> vtkPropAssmebly2 -> vtkActor
>
> Calling vtkPropAssembly1.VisibilityOff() or vtkActor.VisibilityOff()
> will hide the vtkActor during render. But calling
> vtkPropAssembly2.VisibilityOff() has no effect.
>
> Is this intended behavior or a bug? I expected that calling
> vtkPropAssembly2.VisibilityOff() will hide the vtkActor too.
>
> This kind of behavior was already reported here:
>
> http://vtk.org/Bug/view.php?id=3312
> https://gitlab.kitware.com/vtk/vtk/issues/3312
>
> Best regards, Petr Matousek
>
>
> ------------------------------
>
> Message: 15
> Date: Wed, 16 May 2018 11:24:26 -0400
> From: Sankhesh Jhaveri <sankhesh.jhaveri at kitware.com>
> To: Andaharoo <Andx_roo at live.com>
> Cc: vtkusers at vtk.org
> Subject: Re: [vtkusers] Wireframe and Volume Rendering
> Message-ID:
>         <CAEcL5t4=y3SSCzwOETj5L6hPHtCfAg5S0D7Nk0v0GUAjQTycRA at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi,
>
> Could you share example code that reproduces this behavior?
> I don't see it in ParaView:
>
> [image: WireframeVolumeIntersection.png]
>
> Thanks,
> Sankhesh
>
> On Wed, May 16, 2018 at 2:49 AM Andaharoo <Andx_roo at live.com> wrote:
>
>> Rendering wireframes over a volume doesn't seem to work correctly. The
>> volume
>> just disappears? Is there a simple fix/flag or something I'm missing? The
>> lines intermix fine with the volume. But the volume behind the plane
>> doesn't
>> show.
>>
>> <http://vtk.1045678.n5.nabble.com/file/t342007/example.png>
>>
>>
>>
>> --
>> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
>> _______________________________________________
>> Powered by 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:
>> https://vtk.org/mailman/listinfo/vtkusers
>>
> --
> Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware
> <http://www.kitware.com/> | (518) 881-4417
> ?
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <https://vtk.org/pipermail/vtkusers/attachments/20180516/7f86c2f1/attachment.html>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: WireframeVolumeIntersection.png
> Type: image/png
> Size: 168574 bytes
> Desc: not available
> URL: <https://vtk.org/pipermail/vtkusers/attachments/20180516/7f86c2f1/attachment.png>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Powered by 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:
> https://vtk.org/mailman/listinfo/vtkusers
>
>
> ------------------------------
>
> End of vtkusers Digest, Vol 169, Issue 23
> *****************************************



-- 
Cartik Sharma
about.me/sharmacartik


More information about the vtkusers mailing list