switch_channel: Channel Switch

View source: R/redefine_utils.R

switch_channelR Documentation

Channel Switch

Description

Switches Channel in 'IFC_data' object

Usage

switch_channel(obj, from, to, BF = TRUE, MODE = 1)

Arguments

obj

an 'IFC_data' object extracted with features extracted.

from, to

an integer index of channel. 'from' and 'to' should be different.

BF

should 'from' channel be considered as brightfield. Default is TRUE.

MODE

collection mode (as retrieved by getInfo) determining the range. Default is 1.

Details

'BF' and 'MODE' will be used only if 'to' is not found in 'obj'.
If switching channel results in duplicated features definition, e.g. "Intensity_M01_Ch01" and "Intensity_M04_Ch04" exists in 'from' and user called switch_channel(obj, 4, 1). So, "Intensity_M01_Ch01" will become "Intensity_M01_Ch01" (the same) and, "Intensity_M04_Ch04" will become "Intensity_M01_Ch01". Meaning that resulting "Intensity_M01_Ch01" can originate from either "Intensity_M01_Ch01" or "Intensity_M04_Ch04". In such case duplicates will be collected in 'dup' member of attr(, "map").
/!\ Note also that 'initial' member of attr(, "map") will always be the one of 'from', i.e. "Intensity_M01_Ch01" will be mapped with "Intensity_M04_Ch04" .

Value

a list, intended to be passed to 'new_feat_def' argument of getFromNamespace("redefine_obj", "IFC") whose members are:
-features_def, an 'IFC_features_def' object, or a list containing features definition
-masks, an 'IFC_masks' object or a data.frame containing masks definition and name.
-images, a data.frame containing images definition.


IFC documentation built on Sept. 14, 2023, 1:08 a.m.