[Insight-users] Segmentation pipeline = Full RAM

Cameron Burnett w_e_b_m_a_s_t_e_r_6_9 at hotmail.com
Tue Apr 22 09:22:25 EDT 2008


Hi,

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.

How is it possible to break up the pipeline into stages so that it will be a little nicer on my memory?? 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.

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.

  caster->SetInput( reader->GetOutput() );    //converts signed short to float
  smoothing->SetInput( caster->GetOutput() );    //this must input and output a float or double.... so in this case its a float
  outputCaster->SetInput(smoothing->GetOutput());     //float to signed short
  confidenceConnected->SetInput( outputCaster->GetOutput() );    
  //set up some stuff with smoothing and confidence connected, then....
  confidenceConnected->Update();

I was originally just using float all the way though, however this way seems to crash at about 200MB less ram usage :).

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....

  caster->SetInput( reader->GetOutput() );  
  caster->Update();
  reader->Delete();

  smoothing->SetInput( caster->GetOutput() ); 
  smoothing->Update();
  //etc.......

...... 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.


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.


Thanks for your help,
Cameron






_________________________________________________________________
Find the job of your dreams before someone else does
http://mycareer.com.au/?s_cid=596064 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080422/73dfcd59/attachment.htm>


More information about the Insight-users mailing list