[vtkusers] 64bit indexing for vtkStructuredPoints issue

Jim Geach jimgeach at physics.mcgill.ca
Tue Feb 21 12:18:53 EST 2012


dear list, 

(note - this is a vtk python related question) 

i'm rendering very large grids that require 64bit indexing in the scalar component. due to a bug in the way that numpy hands over large arrays to vtk objects, i've had to come up with an inelegant solution of filling a vtkArray in a sequence of managable chunks and keeping track of the last index. 

this works, and tests on smaller data cubes come out looking the way they should. however, once the index exceeds MAX_INT, weird things start happening -- the resulting volume looks jumbled up, like data was placed in the incorrect position. volumes aren't completely garbled, but it's clear where discontinuities are. these effects don't occur for volumes of less than ~1024^3

now, i'm indexing using long integers, but i have a feeling that this is casting is being ignored when i use InsertValue to place a value in the vtk object (i.e. vtk thinks i'm passing a standard int). the first argument to InsertValue should be a vtkIdType, but i am not explicitly casting my index as such (was assuming that vtk was interpreting and casting itself)... could this be the problem? 

i guess my question boils down to: how do i cast my index as the correct vtkIdType (presumably a VTK_UNSIGNED_LONG in this case)?

thanks, jim
 
On 2012-02-21, at 12:00 PM, 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
> 	http://www.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: problem with VTK's Python bindings (Yifei Li)
>   2. Re: problem with VTK's Python bindings (David Gobbi)
>   3. VMASC Modeling, Simulation & Visualization Student Capstone
>      Conference 2012 - reminder & looking for reviewers
>      (Audette, Michel A.)
>   4. how to interpolate some points to a 3-D point array (cetium)
>   5. Initialize a QVTKWidget (Ahmad)
>   6. Camera matrix to Euler angles (zlf)
>   7. Re: Initialize a QVTKWidget (Jothybasu Selvaraj)
>   8. Re: Camera matrix to Euler angles (D?enan Zuki?)
>   9. OBBTree vs ModifiedBSPTree (Jothybasu Selvaraj)
>  10. Points from RepresentationAsWireframe (Doug Hoppes)
>  11. Re: Points from RepresentationAsWireframe (Jothybasu Selvaraj)
>  12. Re: Points from RepresentationAsWireframe (Doug Hoppes)
>  13. Update vtkCamera with vtkMatrix4x4 (zlf)
>  14. RFFT of an RGB image (Massinissa Bandou)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Mon, 20 Feb 2012 12:03:07 -0500
> From: Yifei Li <yifli82 at gmail.com>
> Subject: Re: [vtkusers] problem with VTK's Python bindings
> To: David Gobbi <david.gobbi at gmail.com>
> Cc: vtkusers at vtk.org
> Message-ID:
> 	<CA+Jsj7o3_Jj1yitZof-tyJJfgBhNkqa4jvtQ+tYW9T7VED-PDw at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> On Mon, Feb 20, 2012 at 11:28 AM, David Gobbi <david.gobbi at gmail.com> wrote:
> 
>> On Mon, Feb 20, 2012 at 8:24 AM, Yifei Li <yifli82 at gmail.com> wrote:
>> 
>>> RuntimeError: the sip module implements API v8.0 to v8.1 but the
>>> vtk.vtkFilteringPythonSIP module requires API v7.1
>>> 
>>> Is the sip I have (4.13.2) too new for VTK? How do fix this issue?
>> 
>> You probably have two versions of sip installed on your computer.
>> Make sure that all of the SIP variables in your cmake cache are
>> pointing to the version of sip that you want to use.
>> 
> 
> I do have two versions of sip: one is from the system, and the other is
> installed by myself.
> All the SIP variables look right (pointing to my own sip):
> 
> SIP_EXECUTABLE: FILEPATH=/tmp/yifli/bin/sip
> SIP_INCLUDE_DIR:PATH=/tmp/yifli/include
> SIP_PYQT_DIR:PATH=/tmp/yifi/share/PyQt4
> 
> 
>> Also, why are you building everything in /tmp instead of in a more
>> permanent location?  On many Linux/UNIX systems (including OS X)
>> the contents of /tmp are erased whenever the computer reboots.
>> 
> 
> This is the only place I have writable permissions  on, and the quota on my
> home is very limiting.
> 
> 
>> 
>> - David
>> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120220/2b37dcf8/attachment-0001.htm>
> 
> ------------------------------
> 
> Message: 2
> Date: Mon, 20 Feb 2012 10:39:57 -0700
> From: David Gobbi <david.gobbi at gmail.com>
> Subject: Re: [vtkusers] problem with VTK's Python bindings
> To: Yifei Li <yifli82 at gmail.com>
> Cc: vtkusers at vtk.org
> Message-ID:
> 	<CANwS1=Gq2=k3rE+VWhDhARZLsDHr4aeXQQhNbmDBeO08i0bNsg at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> On Mon, Feb 20, 2012 at 10:03 AM, Yifei Li <yifli82 at gmail.com> wrote:
>> 
>> I do have two versions of sip: one is from the system, and the other is
>> installed by myself.
>> All the SIP variables look right (pointing to my own sip):
>> 
>> SIP_EXECUTABLE: FILEPATH=/tmp/yifli/bin/sip
>> SIP_INCLUDE_DIR:PATH=/tmp/yifli/include
>> SIP_PYQT_DIR:PATH=/tmp/yifi/share/PyQt4
> 
> Are you sure that sip.h is in /tmp/yifli/include?  And not in
> /tmp/yifli/include/python2.6?
> 
> Note that setting SIP_INCLUDE_DIR might not help if sip.h is already
> somewhere else in the include path.  For example, if the "wrong" sip.h
> is in /usr/include then there might not be any easy way to get CMake
> to use your sip.h.  Having multiple versions of sip.h on your system
> can be a difficult issue to fix.
> 
>> This is the only place I have writable permissions ?on, and the quota on my
>> home is very limiting.
> 
> Then I hope that you run "df -k" every so often to make sure that you
> aren't filling up the system disk.
> 
> - David
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Mon, 20 Feb 2012 12:50:03 -0500
> From: "Audette, Michel A." <maudette at odu.edu>
> Subject: [vtkusers] VMASC Modeling, Simulation & Visualization Student
> 	Capstone Conference 2012 - reminder & looking for reviewers
> To: "vtkusers at vtk.org" <vtkusers at vtk.org>
> Message-ID:
> 	<5D094B4A0B15E441811066CCC54AE4FC20BEAA2254 at MUFASA.ts.odu.edu>
> Content-Type: text/plain; charset="us-ascii"
> 
> Dear fellow VTK users and developers,
> 
> The Virginia Modeling, Analysis and Simulation Center is preparing its 6th annual Modeling, Simulation & Visualization Student Capstone Conference on Thursday, April 19, 2012. Paper submission opened on December 5th, 2011 and closes March 9th, 2012. Papers will be accepted as oral or poster presentations.
> 
> Traditionally, the Capstone Conference has featured students in Modeling and Simulation undergraduate & graduate degree programs from several colleges or universities. Students presented their research to an audience of fellow students, faculty, judges, and other distinguished guests.
> 
> For the students, these presentations afford them the opportunity to impart their innovative research to members of the modeling and simulation community from academic, industry, and government backgrounds. The MS&V Student Capstone Conference offers nine presentation tracks this year, each track assigned judges who selected the top three papers for each track.
> 
> All Students are required to submit a 250-word abstract and a paper 6-8 pages in length. Students should be the primary authors of the paper. Papers cannot be published or previously presented. Invited Presentations: Students who would like to submit a paper that has been recently published and/or presented may request an "Invitation to Present at the Student Capstone Conference" from the Track Chair.
> 
> There will be a Career Fair associated with the conference where VMASC industry members and others will have a table/booth.
> 
> See http://www.vmasc.odu.edu/capstone2012.html
> 
> I believe that graduate and undergraduate visualization projects based on VTK are a tremendous fit for this conference. In addition, I am co-chairing the Medical M&S Track, and I am looking for senior researchers who would consider serving as reviewers for student papers submitted to it.
> 
> In addition, if any senior researcher in visualization is interested in serving as a reviewer, please contact me. 
> 
> Thanks for your kind consideration.
> 
> Best wishes,
> 
> Michel
> Michel Audette, Ph.D.
> Assistant Professor,
> Department of Modeling, Simulation and Visualization Engineering,
> Old Dominion University,
> Norfolk, VA.
> 
> 
> ------------------------------
> 
> Message: 4
> Date: Mon, 20 Feb 2012 19:16:35 -0800 (PST)
> From: cetium <cetium at aol.com>
> Subject: [vtkusers] how to interpolate some points to a 3-D point
> 	array
> To: vtkusers at vtk.org
> Message-ID: <1329794195108-5501020.post at n5.nabble.com>
> Content-Type: text/plain; charset=us-ascii
> 
> Hi all,
> i have a point array, but the amount is just too small, so comes the
> question: does VTK have the filters to interpolate reasonable values to a
> point set?
> 
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/how-to-interpolate-some-points-to-a-3-D-point-array-tp5501020p5501020.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> 
> 
> ------------------------------
> 
> Message: 5
> Date: Mon, 20 Feb 2012 19:35:44 -0800 (PST)
> From: Ahmad <falahatpisheh at gmail.com>
> Subject: [vtkusers] Initialize a QVTKWidget
> To: vtkusers at vtk.org
> Message-ID: <1329795344770-5501063.post at n5.nabble.com>
> Content-Type: text/plain; charset=us-ascii
> 
> Hi All,
> 
> I am using a qvtkWidget in a .ui form. When the form loads, the contents of
> the widget is exactly the content of the screen behind the form. However,
> when I, for example, render a vtk Sphere, the widget shows what it is
> expected to show. My question is: can I initialize the widget to show a
> complete black background inside the widget at the time the .ui file loads?
> 
> Thanks,
> Ahmad
> 
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/Initialize-a-QVTKWidget-tp5501063p5501063.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> 
> 
> ------------------------------
> 
> Message: 6
> Date: Tue, 21 Feb 2012 00:28:27 -0800 (PST)
> From: zlf <jxdw_zlf at yahoo.com.cn>
> Subject: [vtkusers] Camera matrix to Euler angles
> To: vtkusers at vtk.org
> Message-ID: <1329812907002-5501560.post at n5.nabble.com>
> Content-Type: text/plain; charset=UTF-8
> 
> Hi all,
> 
> Given a camera matrix. How to calculte the corresponding eular angles
> (x,y,z,?,?,j)?
> 
> Regards,
> 
> superZZ
> 
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/Camera-matrix-to-Euler-angles-tp5501560p5501560.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> 
> 
> ------------------------------
> 
> Message: 7
> Date: Tue, 21 Feb 2012 09:17:47 +0000
> From: Jothybasu Selvaraj <jothybasu at gmail.com>
> Subject: Re: [vtkusers] Initialize a QVTKWidget
> To: Ahmad <falahatpisheh at gmail.com>
> Cc: vtkusers at vtk.org
> Message-ID:
> 	<CAKuw5X1COo76qS8ThK-SzwVOJhysX1W-KjMwfGutfg9MioYSXg at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Can you try
> 
> Renderer->SetBackground(0,0,0);
> renderWin->Render();
> 
> in the constructor of your mainWindow?
> 
> Jothy
> 
> On Tue, Feb 21, 2012 at 3:35 AM, Ahmad <falahatpisheh at gmail.com> wrote:
> 
>> Hi All,
>> 
>> I am using a qvtkWidget in a .ui form. When the form loads, the contents of
>> the widget is exactly the content of the screen behind the form. However,
>> when I, for example, render a vtk Sphere, the widget shows what it is
>> expected to show. My question is: can I initialize the widget to show a
>> complete black background inside the widget at the time the .ui file loads?
>> 
>> Thanks,
>> Ahmad
>> 
>> --
>> View this message in context:
>> http://vtk.1045678.n5.nabble.com/Initialize-a-QVTKWidget-tp5501063p5501063.html
>> Sent from the VTK - Users mailing list archive at Nabble.com.
>> _______________________________________________
>> 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
>> 
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>> 
> 
> 
> 
> -- 
> Jothy
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120221/3220740e/attachment-0001.htm>
> 
> ------------------------------
> 
> Message: 8
> Date: Tue, 21 Feb 2012 11:25:15 +0100
> From: D?enan Zuki? <dzenanz at gmail.com>
> Subject: Re: [vtkusers] Camera matrix to Euler angles
> To: zlf <jxdw_zlf at yahoo.com.cn>
> Cc: vtkusers at vtk.org
> Message-ID:
> 	<CAPf2UMQdAkZb06253UzWX=3EnpHd46L6LVQZ56pUR+-0wR4x9w at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
> 
> Mayve check out there references in here:
> http://en.wikipedia.org/wiki/Rotation_matrix#Euler_angles
> 
> On Tue, Feb 21, 2012 at 09:28, zlf <jxdw_zlf at yahoo.com.cn> wrote:
> 
>> Hi all,
>> 
>> Given a camera matrix. How to calculte the corresponding eular angles
>> (x,y,z,?,?,j)?
>> 
>> Regards,
>> 
>> superZZ
>> 
>> --
>> View this message in context:
>> http://vtk.1045678.n5.nabble.com/Camera-matrix-to-Euler-angles-tp5501560p5501560.html
>> Sent from the VTK - Users mailing list archive at Nabble.com.
>> _______________________________________________
>> 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
>> 
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120221/1ecea3af/attachment-0001.htm>
> 
> ------------------------------
> 
> Message: 9
> Date: Tue, 21 Feb 2012 13:23:45 +0000
> From: Jothybasu Selvaraj <jothybasu at gmail.com>
> Subject: [vtkusers] OBBTree vs ModifiedBSPTree
> To: VTK Mailing List <vtkusers at vtk.org>
> Message-ID:
> 	<CAKuw5X0p1iCW-paSoNWu3UbTmNr2xj2wNCab=3HwLyNTEZ2U5A at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Hi all,
> 
> What is the actual difference between vtkOBBTree and vtkModifiedBSPTree?
> 
>> From their names I can understand that OBBTree partitions data by opotimal
> BB and BSP in some other method. I am trying to find line vtkPolyData (2D)
> intersection.
> 
> For the same line and polydata, OBBTree say it intersects and
> ModifiedBSPTree syas it doesn't.
> 
> BTW, polydata is perpendicular to the line.
> 
> Any clarification?
> 
> Thanks
> 
> -- 
> Jothy
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120221/28b25d97/attachment.htm>
> 
> ------------------------------
> 
> Message: 10
> Date: Tue, 21 Feb 2012 13:28:16 +0000
> From: Doug Hoppes <dhoppes at mbfbioscience.com>
> Subject: [vtkusers] Points from RepresentationAsWireframe
> To: "vtkusers at vtk.org" <vtkusers at vtk.org>
> Message-ID:
> 	<46CB11F12B9DC24D860D4082451B318A029EB8 at exchange3.microbrightfield.com>
> 	
> Content-Type: text/plain; charset="us-ascii"
> 
> Hi all,
> 
>                If I have a vtkvolume, how do I get the points when I use the SetRepresentationAsWireframe?
> 
> Doug
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120221/a1c9d640/attachment-0001.htm>
> 
> ------------------------------
> 
> Message: 11
> Date: Tue, 21 Feb 2012 13:47:09 +0000
> From: Jothybasu Selvaraj <jothybasu at gmail.com>
> Subject: Re: [vtkusers] Points from RepresentationAsWireframe
> To: Doug Hoppes <dhoppes at mbfbioscience.com>
> Cc: "vtkusers at vtk.org" <vtkusers at vtk.org>
> Message-ID:
> 	<CAKuw5X1WMoWY96puFiFFzbKv7sNMvaj1BM7_dMNLjONfuDXCPA at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> If you just want to see them try
> 
> SetRepresentationToPoints()
> 
> Jothy
> 
> On Tue, Feb 21, 2012 at 1:28 PM, Doug Hoppes <dhoppes at mbfbioscience.com>wrote:
> 
>> Hi all,****
>> 
>> ** **
>> 
>>                If I have a vtkvolume, how do I get the points when I use
>> the SetRepresentationAsWireframe?****
>> 
>> ** **
>> 
>> Doug****
>> 
>> ** **
>> 
>> _______________________________________________
>> 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
>> 
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>> 
>> 
> 
> 
> -- 
> Jothy
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120221/f91cbe65/attachment-0001.htm>
> 
> ------------------------------
> 
> Message: 12
> Date: Tue, 21 Feb 2012 13:48:49 +0000
> From: Doug Hoppes <dhoppes at mbfbioscience.com>
> Subject: Re: [vtkusers] Points from RepresentationAsWireframe
> To: "vtkusers at vtk.org" <vtkusers at vtk.org>
> Message-ID:
> 	<46CB11F12B9DC24D860D4082451B318A02A073 at exchange3.microbrightfield.com>
> 	
> Content-Type: text/plain; charset="us-ascii"
> 
> Thanks for the response.  I need the actual points (rather than visualization) so that I can pass them onto another filter.
> 
> From: Jothybasu Selvaraj [mailto:jothybasu at gmail.com]
> Sent: Tuesday, February 21, 2012 8:47 AM
> To: Doug Hoppes
> Cc: vtkusers at vtk.org
> Subject: Re: [vtkusers] Points from RepresentationAsWireframe
> 
> If you just want to see them try
> 
> SetRepresentationToPoints()
> 
> Jothy
> On Tue, Feb 21, 2012 at 1:28 PM, Doug Hoppes <dhoppes at mbfbioscience.com<mailto:dhoppes at mbfbioscience.com>> wrote:
> Hi all,
> 
>                If I have a vtkvolume, how do I get the points when I use the SetRepresentationAsWireframe?
> 
> Doug
> 
> 
> _______________________________________________
> 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
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 
> 
> 
> --
> Jothy
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120221/6cfe4aac/attachment-0001.htm>
> 
> ------------------------------
> 
> Message: 13
> Date: Tue, 21 Feb 2012 08:43:04 -0800 (PST)
> From: zlf <jxdw_zlf at yahoo.com.cn>
> Subject: [vtkusers] Update vtkCamera with vtkMatrix4x4
> To: vtkusers at vtk.org
> Message-ID: <1329842584988-5502738.post at n5.nabble.com>
> Content-Type: text/plain; charset=us-ascii
> 
> Hi all,
> 
> I try to update vtkCamera by passing vtkTransform to SetUserViewTransform.
> But I found camera does not change at all after re-rendering. Am I using the
> wrong function?
> 
> Regards,
> 
> Jerry
> 
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/Update-vtkCamera-with-vtkMatrix4x4-tp5502738p5502738.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> 
> 
> ------------------------------
> 
> Message: 14
> Date: Tue, 21 Feb 2012 11:56:49 -0500
> From: Massinissa Bandou <Massinissa.Bandou at USherbrooke.ca>
> Subject: [vtkusers] RFFT of an RGB image
> To: vtkusers at vtk.org
> Message-ID: <20120221115649.84587a3yo5d9v94w at www.usherbrooke.ca>
> Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed"
> 
> Hello
> 
> I performed a FFT on a JPEG image (RGB) and I filtered with a linear  
> filter but when I performed the RFFT to get the original image, I got  
> it as a greyscale image.
> 
> So I'm thinking because the 'vtkImageFFT.h' is applied only for the  
> first layer(2D).
> 
> Do I need to apply the FFT on each layers or there is another way to do it?
> 
> Another question, I want to display 2 or more images (layers + FFT +  
> RFFT) in the same window.
> According to this example:  
> "http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageFFT"
> 
> I need "vtkImageMapper3D.h" but i don't have it
> How can I get it or bypass it?
> 
> Thank you
> 
> Massi
> 
> 
> 
> ------------------------------
> 
> _______________________________________________
> vtkusers mailing list
> vtkusers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtkusers
> 
> 
> End of vtkusers Digest, Vol 94, Issue 31
> ****************************************




More information about the vtkusers mailing list