[Insight-users] Best way to re-initialize level set during filter
operation?
Zachary Pincus
zpincus at stanford.edu
Fri Jun 24 21:08:54 EDT 2005
Hello all,
I'm planning on experimenting with how valuable periodic level set
re-initialization is for my particular segmentation application.
An IsoContourDistanceImageFilter=>FastChamferDistanceImageFilter
pipeline is perfect for re-initializing a level set image, so just I
need to figure out how to apply this pipeline to a *currently-running*
level set segmentation filter (e.g. GeodesicActiveContours or similar),
via a callback.
Obviously, it's possible to just run the level set filter for n
iterations, re-initialize, feed that as input to a "new" (or
potentially recycled) level set filter, and repeat. This seems a little
nastier than just calling re-initialization code from a callback,
though.
Here is how I would envision such a callback working if it were
possible: The "current" level set image is stored in the filter's
output. So to re-initialize this image, I imagine I would need to grab
the output, modify it, and put the output of the pipeline above (which
cannot run in place) back as the "new" output.
Now, I have a few questions about such a procedure:
(1) Is there anything one needs to do to tell a level set filter that
the output has been changed? I'm thinking about filters which use
narrow banding or explicit "layers." Presumably, the layer locations
would need to be updated based on the re-initialized image. How would I
go about triggering such an update?
(2) What is the best way to sneakily change the output of a level set
filter? I can see two paths:
- Grab the level set output image's pixel container. Stuff it in a
new itk::Image. Run that image through the pipeline above. Take the
resulting pixel container, and make that the output image's pixel
container.
- Grab the level set output image, and call DisconnectPipeline() on
it. Run the image through the pipeline above. Disconnect the output of
that pipeline and re-attach it to the level set filter with
GraftOutput().
Is either a preferred option?
So: Can/should this task be accomplished via call-back as I described
above? If so, does anyone have any thoughts as to my specific
questions?
Thanks for your time,
Zachary Pincus
Department of Biochemistry and Program in Biomedical Informatics
Stanford University School of Medicine
More information about the Insight-users
mailing list