profoundSegimKeep: Merge Segmentation Map with Grouped Segmentation map

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/profoundSegim.R

Description

Allows users to safely merge a standard segim with a groupim, where you can specify segments to be newly merged together, or groups to be merged.

Usage

1
2
profoundSegimKeep(segim = NULL, groupim = NULL, groupID_merge = NULL, segID_merge = NULL,
clean = FALSE)

Arguments

segim

Integer matrix; required, the segmentation map.

groupim

Integer matrix; the grouped segmentation map. This matrix *must* be the same dimensions as segim (if supplied).

groupID_merge

Integer vector; the group IDs that the user wants to persist into the final segmentation map (removing all segim segments that overlap with any of the specified group IDs).

segID_merge

Integer list; each list element should specify collections of segments to be merged.

clean

Logical; should segments partially overlapping with chosen groups be aggressively removed?

Details

The merged segments inherit the lowest segment value, e.g. list(c(1,2,4),c(5,6)) would merge together segments 1,2,4 and to be a new segment 1, and then 5,6 to be a new segment 5.

If the package fastmatch is loaded then matching should be faster when multiple groups are being merged together.

Value

Integer matrix; the merged segmentation map, where specified groups and segments have been merged.

Author(s)

Aaron Robotham

See Also

profoundSegimMerge

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
image=readFITS(system.file("extdata", 'VIKING/mystery_VIKING_Z.fits', package="ProFound"))

profound=profoundProFound(image, magzero=30, groupstats=TRUE, verbose=TRUE, plot=TRUE)

segim_new=profoundSegimKeep(profound$segim, profound$group$groupim, groupID_merge=1,
segID_merge=list(c(12, 26, 62), c(13, 24)))

profoundSegimPlot(image, segim=segim_new)

## End(Not run)

ProFound documentation built on Jan. 8, 2021, 5:37 p.m.