<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 70.85pt 2.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FI" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB">Hi all!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">I’m reading some DICOM data with GDCMImageIO, but I end up having double amount of memory reserved than what the actual data would require.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Below you can find my simple test program and in the comments you can see where memory is reserved. I can understand that reader->Update() causes memory reservation but why another piece of memory is reserved within nameGenerator->SetInputDirectory()?
 Is this intended behaviour? My data size is about 178 MB (511x511x359 of unsigned short) so reserving more than 400 MB is way too much.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">I found an ugly way to circumvent this by putting some lines within parenthesis, so that the nameGenerator variable gets cleared when it drops out of scope (commented parenthesis in the code).  But I guess this should
 be fixed in some better way?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Thanks!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Harri, Finland<o:p></o:p></span></p>
<div style="mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;padding:0cm 0cm 1.0pt 0cm">
<p class="MsoNormal" style="border:none;padding:0cm"><span lang="EN-GB"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">#include</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white">"itkImageSeriesReader.h"</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">#include</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white">"itkGDCMImageIO.h"</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">#include</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white">"itkGDCMSeriesFileNames.h"</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:blue;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">int</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
 main(</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">int</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:gray;background:white;mso-highlight:white">argc</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">,
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">char</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">*
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:gray;background:white;mso-highlight:white">argv</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">[])<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">{<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">              
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">typedef</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">unsigned</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">short</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">      
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">PixelType</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">              
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">const</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">unsigned</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">int</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">         Dimension
 = 3;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">              
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">typedef</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> itk::</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">Image</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">PixelType</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">, Dimension
 >      </span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">ImageType</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">              
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">typedef</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> itk::</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">ImageSeriesReader</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">ImageType</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> >   
  </span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">ReaderType</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">              
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">ReaderType</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">::</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">Pointer</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
 reader = </span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">ReaderType</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">::New();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">              
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">typedef</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> itk::</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">GDCMImageIO</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">      
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">ImageIOType</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">              
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">ImageIOType</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">::</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">Pointer</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
 dicomIO = </span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">ImageIOType</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">::New();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">               reader->SetImageIO(dicomIO);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">               reader->SetUseStreaming(</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">true</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">              
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">typedef</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> itk::</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">GDCMSeriesFileNames</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">    
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">NamesGeneratorType</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">              
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:green;background:white;mso-highlight:white">//{
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">              
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">NamesGeneratorType</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">::</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">Pointer</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
 nameGenerator = </span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">NamesGeneratorType</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">::New();                
<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">               nameGenerator->SetInputDirectory(</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:gray;background:white;mso-highlight:white">argv</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">[1]);
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:green;background:white;mso-highlight:white">// Memory usage jumps from 13 MB to 202 MB</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">              
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">typedef</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> std::</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">vector</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><std::</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">string</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">>   
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">FileNamesContainer</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">              
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">FileNamesContainer</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
 fileNames = nameGenerator->GetInputFileNames();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">               reader->SetFileNames(fileNames);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">              
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:green;background:white;mso-highlight:white">//}</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">              
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">try</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">               {<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">                             reader->Update();
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:green;background:white;mso-highlight:white">// Memory usage jumps from 202 MB to 413 MB</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">               }<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">              
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">catch</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> (itk::</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">ExceptionObject</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
 &ex)<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">               {<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">                             std::cout << ex << std::endl;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">                            
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">return</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">EXIT_FAILURE</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">               }<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">              
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">return</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">EXIT_SUCCESS</span><span lang="EN-GB" style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt;font-family:Consolas;color:black;background:white;mso-highlight:white">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt"><o:p> </o:p></span></p>
</div>
</body>
</html>