<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Bookman Old Style">Hi,</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT>&nbsp;</DIV>
<DIV><FONT face="Bookman Old Style">I built a pipeline as shown 
below,</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT>&nbsp;</DIV>
<DIV><FONT face="Bookman Old Style">//use itk to read dicom series</FONT></DIV>
<DIV><FONT face="Bookman Old Style">dicomReader = 
ReaderType_Short::New();//itk<BR></FONT><FONT 
face="Bookman Old Style">dicomReader-&gt;SetFileNames( fileNames 
);&nbsp;<BR>dicomReader-&gt;Update();<BR></FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT>&nbsp;</DIV>
<DIV><FONT face="Bookman Old Style">&nbsp;//convert itk image to vtk 
image<BR>&nbsp;connectorMRI = 
ConnectorType::New();<BR>&nbsp;connectorMRI-&gt;SetInput(dicomReader-&gt;GetOutput());<BR>&nbsp;try<BR>&nbsp;{&nbsp;<BR>&nbsp;&nbsp;connectorMRI-&gt;Update();<BR>&nbsp;}<BR>&nbsp;catch( 
itk::ExceptionObject &amp; excp )<BR>&nbsp;{<BR>&nbsp;&nbsp;std::cerr &lt;&lt; 
"Error reading the series " &lt;&lt; std::endl;<BR>&nbsp;&nbsp;std::cerr 
&lt;&lt; excp &lt;&lt; std::endl;<BR>&nbsp;}</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT>&nbsp;</DIV>
<DIV><FONT face="Bookman Old Style">//shift image from short to unsigned short 
type for vtk visualization</FONT></DIV>
<DIV><FONT 
face="Bookman Old Style">shift-&gt;SetInput(connectorMRI-&gt;GetOutput());</FONT></DIV>
<DIV><FONT face="Bookman Old Style">shift-&gt;ReleaseDataFlagOn();</FONT></DIV>
<DIV><FONT face="Bookman Old Style">shift-&gt;Update();</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT>&nbsp;</DIV>
<DIV><FONT face="Bookman Old Style">//Generate a vtk volume</FONT></DIV>
<DIV><FONT face="Bookman Old Style">volume = 
GenerateVTKVolume(shift-&gt;GetOutput());</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT>&nbsp;</DIV>
<DIV><FONT face="Bookman Old Style">I read a dicoms series, which&nbsp;needs 
&nbsp;about 100M memory. I take a look at the memory that ITKImage holds 100M 
and the shift holds another 100M. However, I set the release data flag to On in 
shift. Why does it not release the memory ?</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT>&nbsp;</DIV>
<DIV><FONT face="Bookman Old Style">Regards,</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT>&nbsp;</DIV>
<DIV><FONT face="Bookman Old Style">Yixun Liu</DIV>
<DIV><BR></DIV></FONT>
<DIV><FONT face="Bookman Old Style"></FONT>&nbsp;</DIV></BODY></HTML>