<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2912" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Dear All:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp; Some code patches are listed below. 
</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 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 <FONT face="Times New Roman" 
size=3>vtkImageReader2 class.</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>// Load&nbsp; Segmented 
Volume<BR>&nbsp;&nbsp;&nbsp; readerSegmented = 
vtkPNMReader::New();<BR>&nbsp;&nbsp;&nbsp; readerSegmented-&gt;SetDataExtent(0, 
N1-1, 0, N2-1, 1, m_Slices);<BR>&nbsp;&nbsp;&nbsp; 
readerSegmented-&gt;SetDataSpacing(m_X, m_Y, m_Z);<BR>&nbsp;&nbsp;&nbsp; 
readerSegmented-&gt;SetFilePrefix (SourcePath);<BR>&nbsp;&nbsp;&nbsp; 
readerSegmented-&gt;SetFilePattern("%s.%03d.pgm");&nbsp;&nbsp;&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>where: N1 is the width, and N2 is the height for 
each slice. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp; I want to save all the loaded segmented 
volume into, say: SegVolume[N1][N2][m_Slices].</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Best 
Wishes,<BR>-----------------------------------------------------------------<BR>Dongqing 
Chen<BR>Ph.D Research Assistant<BR>Rm. 07, Paul C. Lutz Hall<BR>Computer Vision 
&amp; Image Processing (CVIP) Lab<BR>Department of Electrical &amp; Computer 
Engineering<BR>Speed School of Engineering<BR>University of 
Louisville<BR>Louisville, KY. 40292<BR>U.S.A<BR>Email: <A 
href="mailto:dqchen@cvip.louisville.edu">dqchen@cvip.louisville.edu</A><BR>Phone:+1-502-852-2789 
(Lab)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
+1-502-852-6130 
(Office)<BR>-----------------------------------------------------------------</FONT></DIV></BODY></HTML>