[ITK-users] Recentering Output of fast marching

Andaharoo andx_roo at live.com
Mon Jun 26 12:39:02 EDT 2017


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.


More information about the Insight-users mailing list