[ITK-users] Recentering Output of fast marching

Andaharoo <[email protected]>
Newsgroups gmane.comp.lib.itk.user
Message-ID <[email protected]>
I've been using the fast marching filter to segment out a particular piece of
a 3d image and now I would like to recenter this segmented part. Sometimes
the segmented part can be at the edge of the image which makes it hard to
rotate since it will only rotate around the center. I tried using fast
marchings getOutputOrigin but that doesn't do what I had hoped it would do.
If I were to write it would go something along the lines of this with a
binary image:
for every pixel
    if the pixel is 1
        if the pixels x val is greater than maxX
            maxX = the pixels x val
        if the pixels x val is smaller than minX
            minX = the pixels x val
        Do the same with the y and z and mins
Then after getting the extents I coudl just do (minX + maxX) / 2, (minY +
maxY) / 2, (minZ + maxZ) / 2



--
View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Recentering-Output-of-fast-marching-tp7590022.html
Sent from the ITK Insight Users mailing list archive at Nabble.com.
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.