[vtkusers] Direct access to the array of vtkImageData
dirkkolb at gmail.com
Wed Mar 11 15:06:44 EDT 2009
-----BEGIN PGP SIGNED MESSAGE-----
thanks for the fast reply. I tested your advise but without success.
I used the
method, which worked without any problems. I tried the method
double* data = (double*)(image->GetScalarPointer(idxFreq,idxTime,0))
in order to check the functionality of GetScalarPointer. The results
was, that data consisted of a non initalized value, e.g. -212121412. So
is there something wrong with the assumption, that "data" should be
equal to "value"?
Michael Jackson schrieb:
> vtkImageData* image = vtkImageData::New();
> // Set the data type, allocate all the data and stuff like that
> double* data = (double*)(image->GetScalarPointer());
> untested but should work.
> Mike Jackson mike.jackson at bluequartz.net
> BlueQuartz Software www.bluequartz.net
> Principal Software Engineer Dayton, Ohio
> On Mar 11, 2009, at 11:23 AM, Dirk Kolb wrote:
> I hope this is the right forum for my question. This is my first time
> with VTK.
> I need some hints for the following problem:
> I implemented a viewer for the presentation of spectral data. Therefore
> I used the vtkImageViewer together with the vtkImageData. I get the
> spectral data in form of a double valued matrix (1000,4096). The content
> of the matrix and also of the vtkImageData is time dependend. This means
> the content of e.g. the 100th line is in the next time step the content
> of the 99th line and so on. The first line of the array is dropped and a
> new line is pushed back.
> Is there a possibility for a fast implemtation? In my opinion I need the
> direct access to the data array of a vtkImageData?
> Thanks in advance,
Powered by www.kitware.com
Visit other Kitware open-source projects at
Please keep messages on-topic and check the VTK FAQ at:
Follow this link to subscribe/unsubscribe:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the vtkusers