SelectConnectedLabelsROI
Select a subset of points or cells labeled from different sources, that are connected given a list of connection pairs.
The `SelectConnectedLabelsROI` component selects subsets of labeled points or cells from different sources that are connected according to specified pairs, facilitating region-of-interest selection in simulations.
- module
- Sofa.Component.Engine.Select
- namespace
- sofa::component::engine::select
- include
- sofa/component/engine/select/SelectConnectedLabelsROI.h
- inherits
-
- DataEngine
- templates
-
- int
- unsigned char
- unsigned int
- unsigned short
- description
The `SelectConnectedLabelsROI` component in the SOFA framework is designed to select subsets of points or cells labeled from different sources based on connectivity criteria. This component plays a role in pre-processing and selecting regions of interest within a simulation domain, but it does not directly contribute to the governing equations or operators of the finite element method (FEM) itself. Instead, it operates at a higher level by facilitating data manipulation for downstream processing.
Governing Equations/Operators:
- The component does not contribute to the mass matrix $M$, stiffness matrix $K$, internal force vector $f_{int}$, or residual $R$. It is a data processing tool that operates on label-based criteria rather than physical quantities.
- It does not implement any constitutive laws (strain measures, stress tensors, hyperelastic potentials) or kinematic laws directly related to the deformation of materials.
Role in the Global FEM Pipeline:
- The `SelectConnectedLabelsROI` component is primarily used for data selection and manipulation. It can be part of a preprocessing step that selects specific regions or components within the simulation domain based on label connectivity.
- In the broader context, it helps in isolating parts of the mesh or model that are relevant to specific simulations or analyses.
Constitutive/Kinematic Laws Involved:
- The component does not directly involve any constitutive laws or kinematic laws. It operates on label data, which could represent physical quantities (e.g., material properties), but the actual physics is external to this component.
Numerical Methods/Discretization Choices:
- The numerical method here is a simple algorithm for selecting points/cells based on label connectivity. It does not discretize any continuous field or apply any mesh-based operations.
- It uses sets and vectors to efficiently process the input labels and connection pairs, ensuring that only connected regions are selected.
Fitting into Variational/Lagrangian Mechanics Framework:
- The `SelectConnectedLabelsROI` component does not directly fit into the variational or Lagrangian mechanics framework since it is a preprocessing tool for data selection rather than a solver or simulator of physical systems.
Summary:
- The `SelectConnectedLabelsROI` component operates on label-based connectivity to select subsets of points or cells. It does not involve any FEM-specific operators, constitutive laws, or numerical discretization methods.
Data Fields
| Name | Type | Default | Help |
|---|---|---|---|
d_nbLabels |
unsigned int | |
|
d_labels |
VecVLabels | |
Methods
void
init
()
virtual
void
reinit
()
virtual
void
parse
(sofa::core::objectmodel::BaseObjectDescription * arg)
virtual
void
parseFields
(const int & str)
void
doUpdate
()
virtual
{
"name": "SelectConnectedLabelsROI",
"namespace": "sofa::component::engine::select",
"module": "Sofa.Component.Engine.Select",
"include": "sofa/component/engine/select/SelectConnectedLabelsROI.h",
"doc": "Select a subset of points or cells labeled from different sources, that are connected given a list of connection pairs.",
"inherits": [
"DataEngine"
],
"templates": [
"int",
"unsigned char",
"unsigned int",
"unsigned short"
],
"data_fields": [
{
"name": "d_nbLabels",
"type": "unsigned int"
},
{
"name": "d_labels",
"type": "VecVLabels"
}
],
"links": [],
"methods": [
{
"name": "init",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "reinit",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "parse",
"return_type": "void",
"params": [
{
"name": "arg",
"type": "sofa::core::objectmodel::BaseObjectDescription *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "parseFields",
"return_type": "void",
"params": [
{
"name": "str",
"type": "const int &"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "doUpdate",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "protected"
}
],
"description": "The `SelectConnectedLabelsROI` component is part of the Sofa.Component.Engine.Select module and inherits from the DataEngine class. It selects subsets of points or cells labeled from different sources that are connected according to a specified list of connection pairs. This component allows for flexible selection criteria based on labels, enabling users to isolate specific regions of interest within their simulations.\n\n### Role and Purpose\nThe primary purpose of `SelectConnectedLabelsROI` is to facilitate the identification and extraction of interconnected subsets from labeled data. It supports various label types such as integers, unsigned characters, shorts, and unsigned integers.\n\n### Interactions with Other Components\n- **Inputs**: The component takes input labels (`d_labels`) for different sources and a list of connections between these labels (`d_connectLabels`). These inputs are processed to identify the connected subsets.\n- **Outputs**: It outputs the indices (`d_indices`) corresponding to the selected points or cells that meet the connectivity criteria specified by `d_connectLabels`.\n\n### Practical Usage Guidance\n- **Data Fields**:\n - `d_nbLabels`: Specifies the number of label lists used for selection.\n - `d_labels`: Stores the labels associated with each point or cell, organized in a vector of SVector objects.\n - `d_connectLabels`: Defines pairs of labels to be connected across different label lists.\n\n- **Initialization and Parsing**: The component initializes its internal state during `init()` and updates it with new data through `reinit()`. It also supports parsing input descriptions via the `parse` method for configuration flexibility.\n\n- **Update Process**: The `doUpdate` method performs the core functionality of selecting connected labels, iterating over the provided label lists to identify points or cells that meet the connection criteria. The result is a list of indices (`d_indices`) representing the selected subset.",
"maths": "<p>The `SelectConnectedLabelsROI` component in the SOFA framework is designed to select subsets of points or cells labeled from different sources based on connectivity criteria. This component plays a role in pre-processing and selecting regions of interest within a simulation domain, but it does not directly contribute to the governing equations or operators of the finite element method (FEM) itself. Instead, it operates at a higher level by facilitating data manipulation for downstream processing.</p>\n\n<p><strong>Governing Equations/Operators:</strong></p>\n\n<ul>\n<li>The component <em>does not</em> contribute to the mass matrix $M$, stiffness matrix $K$, internal force vector $f_{int}$, or residual $R$. It is a data processing tool that operates on label-based criteria rather than physical quantities.</li>\n<li>It does not implement any constitutive laws (strain measures, stress tensors, hyperelastic potentials) or kinematic laws directly related to the deformation of materials.</li>\n</ul>\n\n<p><strong>Role in the Global FEM Pipeline:</strong></p>\n\n<ul>\n<li>The `SelectConnectedLabelsROI` component is primarily used for data selection and manipulation. It can be part of a preprocessing step that selects specific regions or components within the simulation domain based on label connectivity.</li>\n<li>In the broader context, it helps in isolating parts of the mesh or model that are relevant to specific simulations or analyses.</li>\n</ul>\n\n<p><strong>Constitutive/Kinematic Laws Involved:</strong></p>\n\n<ul>\n<li>The component does not directly involve any constitutive laws or kinematic laws. It operates on label data, which could represent physical quantities (e.g., material properties), but the actual physics is external to this component.</li>\n</ul>\n\n<p><strong>Numerical Methods/Discretization Choices:</strong></p>\n\n<ul>\n<li>The numerical method here is a simple algorithm for selecting points/cells based on label connectivity. It does not discretize any continuous field or apply any mesh-based operations.</li>\n<li>It uses sets and vectors to efficiently process the input labels and connection pairs, ensuring that only connected regions are selected.</li>\n</ul>\n\n<p><strong>Fitting into Variational/Lagrangian Mechanics Framework:</strong></p>\n\n<ul>\n<li>The `SelectConnectedLabelsROI` component does not directly fit into the variational or Lagrangian mechanics framework since it is a preprocessing tool for data selection rather than a solver or simulator of physical systems.</li>\n</ul>\n\n<p><em>Summary:</em></p>\n\n<ul>\n<li>The `SelectConnectedLabelsROI` component operates on label-based connectivity to select subsets of points or cells. It does not involve any FEM-specific operators, constitutive laws, or numerical discretization methods.</li>\n</ul>",
"abstract": "The `SelectConnectedLabelsROI` component selects subsets of labeled points or cells from different sources that are connected according to specified pairs, facilitating region-of-interest selection in simulations.",
"sheet": "# SelectConnectedLabelsROI\n\n## Overview\n\nThe `SelectConnectedLabelsROI` is an engine component within the SOFA framework designed to select subsets of points or cells based on label connectivity. It inherits from the `DataEngine` class and operates by processing input labels (`d_labels`) and connection pairs (`d_connectLabels`) to identify connected regions.\n\n## Parameters and Data\n\n- **d_nbLabels**: Specifies the number of label lists used for selection. Type: `unsigned int`.\n- **d_labels**: Stores the labels associated with each point or cell, organized in a vector of SVector objects (`VecVLabels`).\n- **d_connectLabels**: Defines pairs of labels to be connected across different label lists."
}