[Insight-users] Segmentation pipeline = Full RAM
Cameron Burnett
w_e_b_m_a_s_t_e_r_6_9 at hotmail.com
Thu Apr 24 10:29:43 EDT 2008
Thanks for the help Karthik.
I did what you said, and set the release data flags, while also streaming up until the Confidence Connected part. It works now, but it takes over an hour to do the whole 400MB DICOM series.
Could you recommend some stuff to look at so that I can create a mask of just the area I want to segment? I think that should help quite a lot with the amount of time the program is taking to segment and everything.
Thanks again,
Cameron.
> Date: Tue, 22 Apr 2008 09:53:48 -0400
> From: karthik.krishnan at kitware.com
> To: w_e_b_m_a_s_t_e_r_6_9 at hotmail.com
> Subject: Re: [Insight-users] Segmentation pipeline = Full RAM
> CC: insight-users at itk.org
>
> On Tue, Apr 22, 2008 at 9:22 AM, Cameron Burnett
> <w_e_b_m_a_s_t_e_r_6_9 at hotmail.com> wrote:
> >
> > Hi,
> >
> > 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.
> >
>
> > 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.......
>
> > 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.
>
> You are referring to two different concepts here. Pipeline
> architecture vs Streaming.
>
> ITK filters support streaming (by updating regions in pieces and
> processing the pieces part by part in parallel). You can process the
> pieces serially as well by updating each piece yourself. This is done
> by requesting a particular sub-region of the input. See the
> documentation for SetRequestedRegion().
>
> That said, not all filters can support streaming. RegionGrowing
> filters cannot, since a region can be connected via a loop from one
> piece to another.
>
> Your should be check the following
>
> 1. Make sure the ReleaseDataFlag is ON for all the filters in your
> pipeline. This forces data to be released on a filter after its output
> has been consumed by the next filter/sink in the pipeline. This should
> significantly reduce your memory usage.
>
> 2. Even if your whole pipeline cannot be updated in pieces, you can
> update the portion of your pipeline that you need in pieces. (This is
> already done for you, under the hood) For instance if you had.
>
> Chances are, you forgot to pay attention to (1).
>
> You can use the itk::MemoryProbe class in Review to identify the
> memory eaters in your pipeline.
>
> --
> karthik
_________________________________________________________________
Are you paid what you're worth? Find out: SEEK Salary Centre
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fninemsn%2Eseek%2Ecom%2Eau%2Fcareer%2Dresources%2Fsalary%2Dcentre%2F%3Ftracking%3Dsk%3Ahet%3Asc%3Anine%3A0%3Ahot%3Atext&_t=764565661&_r=OCT07_endtext_salary&_m=EXT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080425/fc3f50cc/attachment.htm>
More information about the Insight-users
mailing list