pub struct Parameter {
pub parameter_number: usize,
pub channel_name: ChannelName,
pub label_name: LabelName,
pub transform: TransformType,
pub state: ParameterProcessing,
pub excitation_wavelength: Option<usize>,
}Fields§
§parameter_number: usizeThe offset of the parameter in the FCS file’s event data (1-based index)
channel_name: ChannelNameThe name of the channel ($PnN keyword)
label_name: LabelNameThe label name of the parameter ($PnS keyword)
transform: TransformTypeThe default transform to apply to the parameter
state: ParameterProcessingInstructions for parameter processing (compensation, unmixing, etc.) This enum indicates what transformations should be applied.
excitation_wavelength: Option<usize>Excitation wavelength in nanometers (from $PnL keyword, if available)
Implementations§
Source§impl Parameter
impl Parameter
Sourcepub fn new(
parameter_number: &usize,
channel_name: &str,
label_name: &str,
transform: &TransformType,
) -> Self
pub fn new( parameter_number: &usize, channel_name: &str, label_name: &str, transform: &TransformType, ) -> Self
Creates a new Parameter with the specified properties
§Arguments
parameter_number- The 1-based index of the parameter in the FCS filechannel_name- The channel name from the$PnNkeyword (e.g., “FSC-A”, “FL1-A”)label_name- The label name from the$PnSkeyword (e.g., “CD8”, “CD4”)transform- The default transformation type to apply
§Returns
A new Parameter with Raw processing state and no excitation wavelength
Sourcepub fn is_fluorescence(&self) -> bool
pub fn is_fluorescence(&self) -> bool
Check if this parameter is fluorescence (should be transformed by default) Excludes FSC (forward scatter), SSC (side scatter), and Time
Sourcepub fn get_display_label(&self) -> String
pub fn get_display_label(&self) -> String
Get the display label for this parameter Format examples:
- Raw: “UV379-A::CD8” or just “FSC-A”
- Compensated: “Comp::UV379-A::CD8”
- Unmixed: “Unmix::UV379-A::CD8”
- UnmixedCompensated: “Comp+Unmix::UV379-A::CD8”
Sourcepub fn get_short_label(&self) -> String
pub fn get_short_label(&self) -> String
Get the short label (without state prefix)
Sourcepub fn with_state(&self, state: ParameterProcessing) -> Self
pub fn with_state(&self, state: ParameterProcessing) -> Self
Create a new parameter with updated state
Sourcepub fn with_transform(&self, transform: TransformType) -> Self
pub fn with_transform(&self, transform: TransformType) -> Self
Create a new parameter with updated transform
Sourcepub fn generate_plot_options(
&self,
include_compensated: bool,
) -> Vec<ParameterOption>
pub fn generate_plot_options( &self, include_compensated: bool, ) -> Vec<ParameterOption>
Generate parameter options for plotting interfaces
Creates a list of ParameterOption structs representing different processing
states of this parameter that can be used for plotting.
For fluorescence parameters:
- Always returns transformed versions (arcsinh applied)
- If
include_compensatedis true, also includes compensated+transformed versions - Includes unmixed versions if compensation is available
For non-fluorescence parameters (FSC, SSC, Time):
- Returns raw (untransformed) versions only
§Arguments
include_compensated- Whether to include compensated and unmixed variants
§Returns
A vector of ParameterOption structs ready for use in plotting UIs
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Parameter
impl RefUnwindSafe for Parameter
impl Send for Parameter
impl Sync for Parameter
impl Unpin for Parameter
impl UnsafeUnpin for Parameter
impl UnwindSafe for Parameter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more