Next: Cleaning up the Filled Clumps
Up: Reinhold
Previous: Cleaning the Clump Edges
Once the edges have been cleaned up, the volume contained within the
edges can be filled with an integer which identifies the associated peak.
This algorithm proceeds as follows.
- The mask array is scanned for pixels which are marked as peaks.
Recall that only those pixels which are seen to be peaks when profiled
in all directions have been retained. Each of these pixels thus represents
a local maximum in the data value, and has a significantly higher data
value than any of the surrounding pixels. Each such peak is given a
unique integer identifier. This identifier is used within the following
steps to label all pixels in the clump of emission surrounding the peak.
- A line of pixels parallel to the first pixel axis, and which passes
through the peak, is then considered. The line is followed away from the
peak, in both directions, until pixels are encountered which are flagged as
edge pixels. All the pixels along this line between the two edge pixels
are assigned the clump identifier associated with the central peak.
- For each such pixel, another line of pixels parallel to the second
pixel axis and passing through the pixel is considered. The line is followed
away from the pixel, in both directions, until edge pixels are encountered.
All the pixels along this line between the two edge pixels are also assigned
the clump identifier associated with the central peak.
- For each such pixel, another line of pixels parallel to the third
pixel axis and passing through the pixel is considered. The line is followed
away from the pixel, in both directions, until edge pixels are encountered.
All the pixels along this line between the two edge pixels are also assigned
the clump identifier associated with the central peak.
The above process will fill the volume between the edges, but may miss
some pixels (e.g. if the initial line parallel to the first pixel
axis spans the clump at an unusually narrow point). In order to alleviate
this effect, the above process is repeated, but scanning the pixels axes
in a different order (2,3,1 instead of 1,2,3). For 3D data, it is repeated
a third time using the axis order (3,1,2).
Even so, it should be recognised that this filling algorithm will fail to
fill certain shapes entirely. For instance, ``S''-shaped clumps could not
be filled completely using this algorithm.
Next: Cleaning up the Filled Clumps
Up: Reinhold
Previous: Cleaning the Clump Edges
CUPID
Starlink User Note 255
D.S. Berry
19th March 2008
E-mail:ussc@star.rl.ac.uk
Copyright © 2008 Science and Technology Facilities Council