[vtkusers] using vtkImageReslice with external data arrays

Marius S Giurgi rendezvous at dreamxplosion.com
Thu Feb 10 10:42:01 EST 2005


Hi, David

As vtkImageReslice is mostly your creation I thought I'd ask the master 
a very specific question.
Please give me a hint, at your own convenience.

The application I am trying to develop is dealing with processing MRI 
data, and I am going to use the vtkImageReslice to mainly to introduce 
motion to the brain data (rotation/translation), and I'd like this 
motion computation to be as quick as possible. I have a pointer to the 
actual 3D brain image (directly read from the disk) as a set of 
181x217x181 double array. This data gets altered throughout the 
application, therefore I need to have a pointer to it available, 
besides having it wrapped into a vtkImageData object. Eventually, I 
need to pass this data to the reslicer to put the motion in, therefore 
I was wondering how can I get a hold on a pointer to the reslicer 
output data. I know I could use the vtkImageExport to get a hold on 
that pointer, but my question is does this pointer remain the same once 
I create the reslicer and produce its output?

Say, I use the importer to wrap my data into a vtkImageData, pass it to 
the vtkImageReslice, and then get its output, and finally use the 
exporter to get the pointer to the output data. If I modify the 
transformation matrix connected to vtkImageReslice and have the result 
updated, will the output go into the same place so I can access it 
through the same pointer?

To put it shortly, I'd like to have two pointers, one to the input data 
and one to the output data and let the vtkImageReslice do the work, 
avoiding any unnecessary copy of data. Eventually, the rigid rotation 
is just value mapping of an input grid onto an output grid, right?

marius


"To be really medieval, one should have no body. To be really
modern, one should have no soul. To be really Greek, one should
have no clothes."
  -- Oscar Wilde
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1881 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050210/3432837c/attachment.bin>


More information about the vtkusers mailing list