<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'><div style="text-align: left;">Hi,<br><br>I posted a similar question a few weeks ago, and now that my segmentation works I'm coming back to it. I'll just ask my question first then explain whats going on.<br><br><span style="font-weight: bold;">How is it possible to break up the pipeline into stages so that it will be a little nicer on my memory??</span> By that I mean that I want to do a bit, pass it to the next stage, then delete that bit that I just passed through.<br><br>I'm using Confidence Connected region growing, and its currently proving to be quite annoying in terms of memory usage. Luis explained what my memory usage would be last time, but disregarding that I just want to know how to make the algorithm use a minimal amount of memory.<br><br>&nbsp; caster-&gt;SetInput( reader-&gt;GetOutput() );&nbsp;&nbsp;  //converts signed short to float<br>&nbsp; smoothing-&gt;SetInput( caster-&gt;GetOutput() );&nbsp;&nbsp;  //this must input and output a float or double.... so in this case its a float<br>&nbsp; outputCaster-&gt;SetInput(smoothing-&gt;GetOutput()); &nbsp;&nbsp;  //float to signed short<br>&nbsp; confidenceConnected-&gt;SetInput( outputCaster-&gt;GetOutput() );&nbsp;&nbsp;  <br>&nbsp; //set up some stuff with smoothing and confidence connected, then....<br>&nbsp; confidenceConnected-&gt;Update();<br><br>I was originally just using float all the way though, however this way seems to crash at about 200MB less ram usage :).<br><br>So anyway, I realise that the whole point of the pileline architecture is to do the whole thing in 1 go so that its fast. The problem is.... its sooooooooo bad for memory usage. I tried doing it this way instead....<br><br>&nbsp; caster-&gt;SetInput( reader-&gt;GetOutput() );&nbsp; <br>&nbsp; caster-&gt;Update();<br>&nbsp; reader-&gt;Delete();<br>
&nbsp; smoothing-&gt;SetInput( caster-&gt;GetOutput() ); <br>&nbsp; smoothing-&gt;Update();<br>&nbsp; //etc.......<br><br>...... but that didn't seem to work. I think its because they're all linked, and its not possible to delete them until the end.<br><br><br>Btw, the original method works (for 20 DICOM slices out of over 400). I've managed to get the segmentation working and it outputs a nice 3D VTK image. Not sure if its accurate yet though, but I'll get to that later.<br><br><br>Thanks for your help,<br>Cameron<br><br><br><br></div><br><div></div><br><br /><hr /> before someone else does <a href='http://mycareer.com.au/?s_cid=596064 ' target='_new'>Find the job of your dreams</a></body>
</html>