[vtkusers] how to save loaded image slices into a matrix.
Dongqing Chen
dqchen at cvip.louisville.edu
Fri Aug 4 00:11:46 EDT 2006
Dear All:
Some code patches are listed below.
Now the volume is loaded into the memory, how can save it to a 3D matrix? I can not find the member function to finish this task either from vtkPNMReader or vtkImageReader2 class.
// Load Segmented Volume
readerSegmented = vtkPNMReader::New();
readerSegmented->SetDataExtent(0, N1-1, 0, N2-1, 1, m_Slices);
readerSegmented->SetDataSpacing(m_X, m_Y, m_Z);
readerSegmented->SetFilePrefix (SourcePath);
readerSegmented->SetFilePattern("%s.%03d.pgm");
where: N1 is the width, and N2 is the height for each slice.
I want to save all the loaded segmented volume into, say: SegVolume[N1][N2][m_Slices].
Best Wishes,
-----------------------------------------------------------------
Dongqing Chen
Ph.D Research Assistant
Rm. 07, Paul C. Lutz Hall
Computer Vision & Image Processing (CVIP) Lab
Department of Electrical & Computer Engineering
Speed School of Engineering
University of Louisville
Louisville, KY. 40292
U.S.A
Email: dqchen at cvip.louisville.edu
Phone:+1-502-852-2789 (Lab)
+1-502-852-6130 (Office)
-----------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060804/e80b91c0/attachment.htm>
More information about the vtkusers
mailing list