[vtkusers] image data to structured grid in spherical coords
Marty Humperdink
mhumperdink at yahoo.com
Fri Mar 13 01:46:03 EDT 2009
As described in my previous post I'm trying to work with 3D ultrasound data in spherical coordinates.
I load the data into a vtkImageData array (from a raw file).
I've just been trying to use vtkSphericalTransform to take the points from the vtkImageData and transform them into spherical coordinates.
Then I created a vtkStructuredGrid to which I assigned these transformed points and the scalars associated with the original points
from the vtkImageData.
My plan was then to probe this structured grid with a new blank vtkImageData using vtkProbe.
I'm not having much success. I'm hoping someone could please comment on this approach just in terms of the way I'm imagining the pipeline:
1. load raw file using vtkImageReader2
2. get points from output of vtkImageReader2
3. get scalars associated with these points
4. transform points using vtkSphericalTransform
5. create new structured grid and set points as transformed points but set scalars as original scalars from output of vtkImageReader2
6. create new empty vtkImageData
7. probe structured grid with new image data
8. display/output output of probe
many thanks,
Marty
Date: Thu, 12 Mar 2009 12:06:33 -0700 (PDT)
From: Marty Humperdink <mhumperdink at yahoo.com>
Subject: [vtkusers] image data to structured grid in spherical coords
To: vtkusers at vtk.org
Message-ID: <27024.64899.qm at web112207.mail.gq1.yahoo.com>
Content-Type: text/plain; charset=us-ascii
Hello.
I have some 3D ultrasound data stored as a header-less raw file. The data is in spherical coordinates which I know (roughly) from a separate source.
I'd like to resample the 3DUS data into a Cartesian grid.
I've been using vtkImageReader2 to load the data from the raw file giving me vtkImageData.
I believe I need to create a vtkStructuredGrid from this image data and apply the
Spherical coordinate geometry (do I just do this to the points? can I preserve the topology of the imageData?). Then I think I could use vtkProbeFilter to resample the
structured grid with a new vtkImageData object.
Could someone please suggest a method to transform the vtkImageData object into a structured grid with the spherical
coordinate geometry? I have been trying various approaches with little overall success.
I would greatly appreciate any feedback or suggestions.
MH
More information about the vtkusers
mailing list