VoxelLoader
The `VoxelLoader` loads and manages voxel-based geometric data within the SOFA simulation framework, providing methods to add hexahedra and retrieve voxel-related information such as size and segmentation.
- module
- Sofa.framework.Core
- namespace
- sofa::core::loader
- include
- sofa/core/loader/VoxelLoader.h
- inherits
-
- BaseLoader
- description
The VoxelLoader is primarily an I/O component designed for loading and managing voxel-based data within the simulation framework. It does not directly contribute to any governing equations, constitutive laws, or numerical methods related to FEM. Its role is more about initializing and preparing geometric and structural elements in the scene graph.
Mathematical and Physical Description:
-
Governing Equations / Operators: The
VoxelLoaderdoes not implement any governing equations, operators, or mathematical models directly relevant to the FEM pipeline. It is a preparatory component that loads voxel-based data into the simulation environment. -
Constitutive Laws and Kinematic Laws: This component does not involve constitutive laws such as stress-strain relationships or kinematic measures like deformation gradients or strain tensors. The primary focus of
VoxelLoaderis to handle geometric data (positions, hexahedra) rather than material behavior. -
Role in the FEM Pipeline: In the context of the overall FEM pipeline,
VoxelLoaderplays a role in mesh generation and initialization. It loads voxel-based geometries into the simulation environment, providing the necessary structural elements that other components (like ForceFields or Mass components) will use to define the mechanics of the system. -
Numerical Methods / Discretization Choices: The
VoxelLoaderitself does not encode any numerical methods or discretization schemes. It is responsible for loading and organizing data in a form suitable for subsequent FEM processing by other components. -
Variational Mechanics Framework: While the broader SOFA framework supports variational mechanics through Lagrangian formulations, the
VoxelLoadercomponent itself does not contribute directly to these aspects. Its primary function is to prepare the geometric and structural data that will later be used in variational formulations and FEM simulations.
Summary: The VoxelLoader is a crucial I/O component for voxel-based geometry initialization within SOFA, but it does not participate in any mathematical or physical computations directly related to FEM. Its main role is to load and manage geometric data that other components will use to define the mechanics of deformable systems.
Methods
void
addHexahedron
(int * pHexahedra, const int & p)
void
addHexahedron
(int * pHexahedra, unsigned int p0, unsigned int p1, unsigned int p2, unsigned int p3, unsigned int p4, unsigned int p5, unsigned int p6, unsigned int p7)
type::Vec3
getVoxelSize
()
virtual
int
getHexaIndicesInGrid
()
int
getDataSize
()
virtual
Vec6i
getROI
()
virtual
unsigned char *
getData
()
virtual
unsigned char *
getSegmentID
()
virtual
void
createSegmentation3DTexture
(unsigned char ** textureData, int & width, int & height, int & depth)
virtual
{
"name": "VoxelLoader",
"namespace": "sofa::core::loader",
"module": "Sofa.framework.Core",
"include": "sofa/core/loader/VoxelLoader.h",
"doc": "",
"inherits": [
"BaseLoader"
],
"templates": [],
"data_fields": [],
"links": [],
"methods": [
{
"name": "addHexahedron",
"return_type": "void",
"params": [
{
"name": "pHexahedra",
"type": "int *"
},
{
"name": "p",
"type": "const int &"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "addHexahedron",
"return_type": "void",
"params": [
{
"name": "pHexahedra",
"type": "int *"
},
{
"name": "p0",
"type": "unsigned int"
},
{
"name": "p1",
"type": "unsigned int"
},
{
"name": "p2",
"type": "unsigned int"
},
{
"name": "p3",
"type": "unsigned int"
},
{
"name": "p4",
"type": "unsigned int"
},
{
"name": "p5",
"type": "unsigned int"
},
{
"name": "p6",
"type": "unsigned int"
},
{
"name": "p7",
"type": "unsigned int"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getVoxelSize",
"return_type": "type::Vec3",
"params": [],
"is_virtual": true,
"is_pure_virtual": true,
"is_static": false,
"access": "public"
},
{
"name": "getHexaIndicesInGrid",
"return_type": "int",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getDataSize",
"return_type": "int",
"params": [],
"is_virtual": true,
"is_pure_virtual": true,
"is_static": false,
"access": "public"
},
{
"name": "getROI",
"return_type": "Vec6i",
"params": [],
"is_virtual": true,
"is_pure_virtual": true,
"is_static": false,
"access": "public"
},
{
"name": "getData",
"return_type": "unsigned char *",
"params": [],
"is_virtual": true,
"is_pure_virtual": true,
"is_static": false,
"access": "public"
},
{
"name": "getSegmentID",
"return_type": "unsigned char *",
"params": [],
"is_virtual": true,
"is_pure_virtual": true,
"is_static": false,
"access": "public"
},
{
"name": "createSegmentation3DTexture",
"return_type": "void",
"params": [
{
"name": "textureData",
"type": "unsigned char **"
},
{
"name": "width",
"type": "int &"
},
{
"name": "height",
"type": "int &"
},
{
"name": "depth",
"type": "int &"
}
],
"is_virtual": true,
"is_pure_virtual": true,
"is_static": false,
"access": "public"
}
],
"description": "The `VoxelLoader` is a SOFA component designed for loading and managing voxel-based data within the simulation framework. It inherits from the `BaseLoader`, which suggests it handles the initialization and management of geometric or structural elements in the scene graph. The primary role of `VoxelLoader` is to load hexahedral (voxel) structures, providing methods to add hexahedra (`addHexahedron`) and retrieve voxel-related data such as size, indices, and segmentation information.\n\nThis component interacts with other SOFA components through a set of abstract methods that need to be implemented by derived classes. These methods include `getVoxelSize`, `getDataSize`, `getROI`, `getData`, `getSegmentID`, and `createSegmentation3DTexture`. These interactions are crucial for integrating voxel data into the simulation, allowing for precise control over the geometry and topology of loaded structures.\n\nPractically, `VoxelLoader` is used to define and manipulate voxel-based models within simulations. It stores positions and hexahedra as `Data` fields, which can be accessed or modified by other components during runtime. The component provides a way to load and process voxel data efficiently, supporting various operations such as segmentation and texture creation.",
"maths": "The `VoxelLoader` is primarily an I/O component designed for loading and managing voxel-based data within the simulation framework. It does not directly contribute to any governing equations, constitutive laws, or numerical methods related to FEM. Its role is more about initializing and preparing geometric and structural elements in the scene graph.\n\n**Mathematical and Physical Description:**\n\n- **Governing Equations / Operators**: The `VoxelLoader` does not implement any governing equations, operators, or mathematical models directly relevant to the FEM pipeline. It is a preparatory component that loads voxel-based data into the simulation environment.\n\n- **Constitutive Laws and Kinematic Laws**: This component does not involve constitutive laws such as stress-strain relationships or kinematic measures like deformation gradients or strain tensors. The primary focus of `VoxelLoader` is to handle geometric data (positions, hexahedra) rather than material behavior.\n\n- **Role in the FEM Pipeline**: In the context of the overall FEM pipeline, `VoxelLoader` plays a role in mesh generation and initialization. It loads voxel-based geometries into the simulation environment, providing the necessary structural elements that other components (like ForceFields or Mass components) will use to define the mechanics of the system.\n\n- **Numerical Methods / Discretization Choices**: The `VoxelLoader` itself does not encode any numerical methods or discretization schemes. It is responsible for loading and organizing data in a form suitable for subsequent FEM processing by other components.\n\n- **Variational Mechanics Framework**: While the broader SOFA framework supports variational mechanics through Lagrangian formulations, the `VoxelLoader` component itself does not contribute directly to these aspects. Its primary function is to prepare the geometric and structural data that will later be used in variational formulations and FEM simulations.\n\n**Summary:** The `VoxelLoader` is a crucial I/O component for voxel-based geometry initialization within SOFA, but it does not participate in any mathematical or physical computations directly related to FEM. Its main role is to load and manage geometric data that other components will use to define the mechanics of deformable systems.",
"abstract": "The `VoxelLoader` loads and manages voxel-based geometric data within the SOFA simulation framework, providing methods to add hexahedra and retrieve voxel-related information such as size and segmentation.",
"sheet": "# VoxelLoader\n\n**Overview:**\nThe `VoxelLoader` is an I/O component that initializes and manages voxel-based geometries in the SOFA scene graph. It inherits from `BaseLoader`, indicating its role in loading geometric data, specifically hexahedral (voxel) structures. The component provides methods for adding hexahedra (`addHexahedron`) and retrieving voxel-related information such as size (`getVoxelSize`), indices (`getHexaIndicesInGrid`), and segmentation details (`getData`, `getSegmentID`).\n\n**Parameters and Data:**\nThe `VoxelLoader` does not expose any significant `Data` fields. Its functionality is primarily driven by the methods it provides for adding hexahedra and retrieving voxel-related data.\n\n**Dependencies and Connections:**\nThe `VoxelLoader` typically interacts with other SOFA components that require geometric or structural information, such as ForceFields or Mass components. It fits into the scene graph by providing the necessary initial geometry for subsequent mechanical simulations.\n\n**Practical Notes:**\nDerived classes must implement abstract methods like `getVoxelSize`, `getDataSize`, and `createSegmentation3DTexture` to ensure proper functionality within the simulation environment."
}