1#ifndef HVL_COMPUTATIONAL_DOMAIN_H
2#define HVL_COMPUTATIONAL_DOMAIN_H
12using json = nlohmann::json;
92 std::vector<std::pair<VoxelGrid, Eigen::Vector3d>> voxel_grids_;
93 Eigen::Vector3d dim_space_;
94 bool is_python_environment_;
114 static bool isJSON(
const std::string &file_path);
129 void setVoxelGrids(
const json &json_object,
const std::string &json_directory_path);
151 static void getNIFTIFilePaths(
const json &voxel_grid_json,
const std::string &json_directory_path, std::vector<std::string> &nifti_file_paths);
159 static void getOrigins(
const json &voxel_grid_json, std::vector<Eigen::Vector3d> &origins);
166 static bool isNIFTI(
const std::string &file_path);
Class which represents the computational domain.
static void getOrigins(const json &voxel_grid_json, std::vector< Eigen::Vector3d > &origins)
Adds origins of voxel grids to the given vector.
void initializeCompDomain(const std::string &json_file_path)
Runs the initialization of the computational domain.
static bool isNIFTI(const std::string &file_path)
Checks if the given file path is a NIFTI file.
ComputationalDomain(const std::string &json_file_path, bool is_python_environment=false)
Constructor for the ComputationalDomain class.
int getNumVoxelGrids() const
Returns the number of voxel grids in the computational domain.
Voxel background_voxel
Voxel which represents the background material.
bool isInComputationalDomain(const Eigen::Vector3d &position) const
Returns true if the position is within the computational domain, false otherwise.
void setCompProperties(const json &json_object)
Sets the properties of the computational domain.
static bool isJSON(const std::string &file_path)
Checks if the given file path is a JSON file.
Eigen::Vector3d getVoxelGridOriginN(int N)
Returns the origin of the voxel grid at index N.
std::vector< std::string > getMaterialNames() const
Returns the names of the materials in the computational domain.
std::string getBackgroundMaterialName() const
Returns the name of the background material.
Voxel & getVoxel(const Eigen::Vector3d &position)
Returns the voxel at the given position.
VoxelGrid & getVoxelGridN(int N)
Returns the voxel grid at index N.
void setVoxelGrids(const json &json_object, const std::string &json_directory_path)
Sets the voxel grids of the computational domain.
InteractionData getInteractionData() const
Returns the interaction data generated by the materials in the computational domain.
Eigen::Vector3d getVoxelGridDimSpaceN(int N)
Returns the spatial dimensions of the voxel grid at index N.
static void getNIFTIFilePaths(const json &voxel_grid_json, const std::string &json_directory_path, std::vector< std::string > &nifti_file_paths)
Adds NIFTI file paths to the given vector.
Class which provides access to various simulation significant data.
Class which represents a voxel grid.
Struct which represents a voxel.