Radiation transport model plugin. More...
#include <RadiationModel.h>
Public Types | |
| enum class | ColorCorrectionAlgorithm { DIAGONAL_ONLY , MATRIX_3X3_AUTO , MATRIX_3X3_FORCE } |
| Color correction algorithm types for auto-calibration. More... | |
Public Member Functions | |
| RadiationModel (helios::Context *context) | |
| Default constructor. | |
| ~RadiationModel () | |
| Destructor. | |
| RadiationModel (RadiationModel &&)=default | |
| RadiationModel & | operator= (RadiationModel &&)=default |
| RadiationModel (const RadiationModel &)=delete | |
| RadiationModel & | operator= (const RadiationModel &)=delete |
| void | disableMessages () |
| Disable/silence status messages. | |
| void | enableMessages () |
| Enable status messages. | |
| std::string | getBackendName () const |
| Get the name of the active ray tracing backend (e.g., "OptiX 8.1", "Vulkan Compute") | |
| void | optionalOutputPrimitiveData (const char *label) |
| Add optional output primitive data values to the Context. | |
| void | setDirectRayCount (const std::string &label, size_t N) |
| Sets variable directRayCount, the number of rays to be used in direct radiation model. | |
| void | setDiffuseRayCount (const std::string &label, size_t N) |
| Sets variable diffuseRayCount, the number of rays to be used in diffuse (ambient) radiation model. | |
| void | setDiffuseRadiationFlux (const std::string &label, float flux) |
| Diffuse (ambient) radiation flux. | |
| void | setDiffuseRadiationExtinctionCoeff (const std::string &label, float K, const helios::vec3 &peak_dir) |
| Extinction coefficient of diffuse ambient radiation. | |
| void | setDiffuseRadiationExtinctionCoeff (const std::string &label, float K, const helios::SphericalCoord &peak_dir) |
| Extinction coefficient of diffuse ambient radiation. | |
| void | setDiffuseSpectrumIntegral (float spectrum_integral) |
| Scale the global diffuse spectrum so its integral equals the specified value (=∫Sdλ) | |
| void | setDiffuseSpectrumIntegral (float spectrum_integral, float wavelength_min, float wavelength_max) |
| Scale the global diffuse spectrum based on a prescribed integral between two wavelengths (=∫Sdλ) | |
| void | setDiffuseSpectrumIntegral (const std::string &band_label, float spectrum_integral) |
| Set the integral of the diffuse spectral flux distribution across all possible wavelengths (=∫Sdλ) | |
| void | setDiffuseSpectrumIntegral (const std::string &band_label, float spectrum_integral, float wavelength_min, float wavelength_max) |
| Scale the source spectral flux distribution based on a prescribed integral between two wavelengths (=∫Sdλ) | |
| void | addRadiationBand (const std::string &label) |
| Add a spectral radiation band to the model. | |
| void | addRadiationBand (const std::string &label, float wavelength_min, float wavelength_max) |
| Add a spectral radiation band to the model with explicit specification of the spectral wave band. | |
| void | copyRadiationBand (const std::string &old_label, const std::string &new_label) |
| Copy a spectral radiation band based on a previously created band. | |
| void | copyRadiationBand (const std::string &old_label, const std::string &new_label, float wavelength_min, float wavelength_max) |
| Copy a spectral radiation band based on a previously created band and explicitly set new band wavelength range. | |
| bool | doesBandExist (const std::string &label) const |
| Check if a radiation band exists based on its label. | |
| void | disableEmission (const std::string &label) |
| Disable emission calculations for all primitives in this band. | |
| void | enableEmission (const std::string &label) |
| Enable emission calculations for all primitives in this band. | |
| uint | addCollimatedRadiationSource () |
| Add an external source of collimated radiation (i.e., source at infinite distance with parallel rays) assuming the default direction of (0,0,1) | |
| uint | addCollimatedRadiationSource (const helios::SphericalCoord &direction) |
| Add an external source of collimated radiation (i.e., source at infinite distance with parallel rays) | |
| uint | addCollimatedRadiationSource (const helios::vec3 &direction) |
| Add an external source of collimated radiation (i.e., source at infinite distance with parallel rays) | |
| uint | addSphereRadiationSource (const helios::vec3 &position, float radius) |
| Add an external source of radiation that emits from the surface of a sphere. | |
| uint | addSunSphereRadiationSource () |
| Add a sphere radiation source that models the sun assuming the default direction of (0,0,1) | |
| uint | addSunSphereRadiationSource (const helios::SphericalCoord &sun_direction) |
| Add a sphere radiation source that models the sun. | |
| uint | addSunSphereRadiationSource (const helios::vec3 &sun_direction) |
| Add a sphere radiation source that models the sun. | |
| uint | addRectangleRadiationSource (const helios::vec3 &position, const helios::vec2 &size, const helios::vec3 &rotation_rad) |
| Add planar rectangular radiation source. | |
| uint | addDiskRadiationSource (const helios::vec3 &position, float radius, const helios::vec3 &rotation_rad) |
| Add planar circular radiation source. | |
| void | deleteRadiationSource (uint sourceID) |
| Delete an existing radiation source (any type) | |
| void | setSourceSpectrumIntegral (uint source_ID, float source_integral) |
| Set the integral of the source spectral flux distribution across all possible wavelengths (=∫Sdλ) | |
| void | setSourceSpectrumIntegral (uint source_ID, float source_integral, float wavelength_min, float wavelength_max) |
| Scale the source spectral flux distribution based on a prescribed integral between two wavelengths (=∫Sdλ) | |
| void | setSourceFlux (uint source_ID, const std::string &band_label, float flux) |
| Set the flux of radiation source for this band. | |
| void | setSourceFlux (const std::vector< uint > &source_ID, const std::string &band_label, float flux) |
| Set the flux of multiple radiation sources for this band. | |
| float | getSourceFlux (uint source_ID, const std::string &band_label) const |
| Get the flux of radiation source for this band. | |
| void | setSourcePosition (uint source_ID, const helios::vec3 &position) |
| Set the position/direction of radiation source based on a Cartesian vector. | |
| void | setSourcePosition (uint source_ID, const helios::SphericalCoord &position) |
| Set the position/direction of radiation source based on a spherical vector. | |
| helios::vec3 | getSourcePosition (uint source_ID) const |
| Get the position/direction of radiation source. | |
| void | setSourceSpectrum (uint source_ID, const std::vector< helios::vec2 > &spectrum) |
| Set the spectral distribution of a radiation source according to a vector of wavelength-intensity pairs. | |
| void | setSourceSpectrum (const std::vector< uint > &source_ID, const std::vector< helios::vec2 > &spectrum) |
| Set the spectral distribution of multiple radiation sources according to a vector of wavelength-intensity pairs. | |
| void | setSourceSpectrum (uint source_ID, const std::string &spectrum_label) |
| Set the spectral distribution of a radiation source based on global data of wavelength-intensity pairs. | |
| void | setSourceSpectrum (const std::vector< uint > &source_ID, const std::string &spectrum_label) |
| Set the spectral distribution of multiple radiation sources based on global data of wavelength-intensity pairs. | |
| void | setDiffuseSpectrum (const std::string &spectrum_label) |
| Set the spectral distribution of diffuse ambient radiation for all bands based on global data of wavelength-intensity pairs. | |
| float | getDiffuseFlux (const std::string &band_label) const |
| Get the diffuse flux for a given band. | |
| void | enableLightModelVisualization () |
| Add a 3D model of the light source (rectangular, disk, and sphere) to the Context for visualization purposes. | |
| void | disableLightModelVisualization () |
| Remove the 3D model of the light source from the Context. | |
| void | enableCameraModelVisualization () |
| Add a 3D model of the camera to the Context for visualization purposes. | |
| void | disableCameraModelVisualization () |
| Remove the 3D model of the camera from the Context. | |
| float | integrateSpectrum (const std::vector< helios::vec2 > &object_spectrum, float wavelength_min, float wavelength_max) const |
| Integrate a spectral distribution between two wavelength bounds. | |
| float | integrateSpectrum (const std::vector< helios::vec2 > &object_spectrum) const |
| Integrate a spectral distribution across all wavelengths. | |
| float | integrateSpectrum (uint source_ID, const std::vector< helios::vec2 > &object_spectrum, float wavelength_min, float wavelength_max) const |
| Integrate the product of a radiation source spectral distribution with specified spectral data between two wavelength bounds. | |
| float | integrateSpectrum (uint source_ID, const std::vector< helios::vec2 > &object_spectrum, const std::vector< helios::vec2 > &camera_spectrum) const |
| Integrate the product of a radiation source spectral distribution, surface spectral data, and camera spectral response across all wavelengths. | |
| float | integrateSpectrum (const std::vector< helios::vec2 > &object_spectrum, const std::vector< helios::vec2 > &camera_spectrum) const |
| Integrate the product of surface spectral data and camera spectral response across all wavelengths. | |
| float | integrateSourceSpectrum (uint source_ID, float wavelength_min, float wavelength_max) const |
| Integrate a source spectral distribution between two wavelength bounds. | |
| void | scaleSpectrum (const std::string &existing_global_data_label, const std::string &new_global_data_label, float scale_factor) const |
| Scale an entire spectrum by a constant factor. Creates new global data for scaled spectrum. | |
| void | scaleSpectrum (const std::string &global_data_label, float scale_factor) const |
| Scale an entire spectrum by a constant factor. Performs scaling in-place. | |
| void | scaleSpectrumRandomly (const std::string &existing_global_data_label, const std::string &new_global_data_label, float minimum_scale_factor, float maximum_scale_factor) const |
| Scale an entire spectrum by a random factor following a uniform distribution. | |
| void | blendSpectra (const std::string &new_spectrum_label, const std::vector< std::string > &spectrum_labels, const std::vector< float > &weights) const |
| Blend one or more spectra together into a new spectrum. | |
| void | blendSpectraRandomly (const std::string &new_spectrum_label, const std::vector< std::string > &spectrum_labels) const |
| Blend one or more spectra together into a new spectrum, with random weights assigned to each input spectrum. | |
| void | interpolateSpectrumFromPrimitiveData (const std::vector< uint > &primitive_UUIDs, const std::vector< std::string > &spectra, const std::vector< float > &values, const std::string &primitive_data_query_label, const std::string &primitive_data_radprop_label) |
| Configure automatic spectral interpolation based on primitive data values. | |
| void | interpolateSpectrumFromObjectData (const std::vector< uint > &object_IDs, const std::vector< std::string > &spectra, const std::vector< float > &values, const std::string &object_data_query_label, const std::string &primitive_data_radprop_label) |
| Configure automatic spectral interpolation based on object data values. | |
| void | setScatteringDepth (const std::string &label, uint depth) |
| Set the number of scattering iterations for a certain band. | |
| void | setMinScatterEnergy (const std::string &label, uint energy) |
| Set the energy threshold used to terminate scattering iterations. Scattering iterations are terminated when the maximum to-be-scattered energy among all primitives is less than "energy". | |
| void | enforcePeriodicBoundary (const std::string &boundary) |
| Use a periodic boundary condition in one or more lateral directions. | |
| void | addRadiationCamera (const std::string &camera_label, const std::vector< std::string > &band_label, const helios::vec3 &position, const helios::vec3 &lookat, const CameraProperties &camera_properties, uint antialiasing_samples) |
| Add a radiation camera sensor. | |
| void | addRadiationCamera (const std::string &camera_label, const std::vector< std::string > &band_label, const helios::vec3 &position, const helios::SphericalCoord &viewing_direction, const CameraProperties &camera_properties, uint antialiasing_samples) |
| Add a radiation camera sensor. | |
| void | addSIFCamera (const std::string &camera_label, const std::vector< std::string > &emission_band_labels, const helios::vec3 &position, const helios::vec3 &lookat, const SIFCameraProperties &camera_properties, uint antialiasing_samples) |
| Add a solar-induced chlorophyll fluorescence (SIF) camera sensor. | |
| void | addSIFCamera (const std::string &camera_label, const std::vector< std::string > &emission_band_labels, const helios::vec3 &position, const helios::SphericalCoord &viewing_direction, const SIFCameraProperties &camera_properties, uint antialiasing_samples) |
| Add a solar-induced chlorophyll fluorescence (SIF) camera sensor using a spherical viewing direction. | |
| bool | isSIFCamera (const std::string &camera_label) const |
| Check whether a camera was added via addSIFCamera (vs. addRadiationCamera). | |
| void | setCameraSpectralResponse (const std::string &camera_label, const std::string &band_label, const std::string &global_data) |
| Set the spectral response of a camera band based on reference to global data. This function version uses all the global data array to calculate the spectral response. | |
| void | setCameraSpectralResponseFromLibrary (const std::string &camera_label, const std::string &camera_library_name) |
| Set the camera spectral response based on a camera available in the standard camera spectral library (radiation/spectral_data/camera_spectral_library.xml). | |
| void | addRadiationCameraFromLibrary (const std::string &camera_label, const std::string &library_camera_label, const helios::vec3 &position, const helios::vec3 &lookat, uint antialiasing_samples) |
| Add a radiation camera sensor loading all properties from the camera library. | |
| void | addRadiationCameraFromLibrary (const std::string &camera_label, const std::string &library_camera_label, const helios::vec3 &position, const helios::vec3 &lookat, uint antialiasing_samples, const std::vector< std::string > &band_labels) |
| Add a radiation camera sensor loading all properties from the camera library with custom band names. | |
| void | setCameraPosition (const std::string &camera_label, const helios::vec3 &position) |
| Set the position of the radiation camera. | |
| helios::vec3 | getCameraPosition (const std::string &camera_label) const |
| Get the position of the radiation camera. | |
| void | setCameraLookat (const std::string &camera_label, const helios::vec3 &lookat) |
| Set the position the radiation camera is pointed toward (used to calculate camera orientation) | |
| helios::vec3 | getCameraLookat (const std::string &camera_label) const |
| Get the position the radiation camera is pointed toward (used to calculate camera orientation) | |
| void | setCameraOrientation (const std::string &camera_label, const helios::vec3 &direction) |
| Set the orientation of the radiation camera based on a Cartesian vector. | |
| void | setCameraOrientation (const std::string &camera_label, const helios::SphericalCoord &direction) |
| Set the orientation of the radiation camera based on a spherical coordinate. | |
| helios::SphericalCoord | getCameraOrientation (const std::string &camera_label) const |
| Get the orientation of the radiation camera based on a spherical coordinate. | |
| CameraProperties | getCameraParameters (const std::string &camera_label) const |
| Get the intrinsic parameters of an existing radiation camera. | |
| void | updateCameraParameters (const std::string &camera_label, const CameraProperties &camera_properties) |
| Update intrinsic parameters of an existing radiation camera. | |
| std::vector< std::string > | getAllCameraLabels () |
| Get the labels for all radiation cameras that have been added to the radiation model. | |
| void | enableCameraMetadata (const std::string &camera_label) |
| Enable automatic JSON metadata file writing for a camera. | |
| void | enableCameraMetadata (const std::vector< std::string > &camera_labels) |
| Enable automatic JSON metadata file writing for multiple cameras. | |
| CameraMetadata | getCameraMetadata (const std::string &camera_label) const |
| Get the current metadata for a camera. | |
| void | setCameraMetadata (const std::string &camera_label, const CameraMetadata &metadata) |
| Set metadata for a camera to be automatically written with images. | |
| void | enableCameraLensFlare (const std::string &camera_label) |
| Enable lens flare rendering for a camera. | |
| void | disableCameraLensFlare (const std::string &camera_label) |
| Disable lens flare rendering for a camera. | |
| bool | isCameraLensFlareEnabled (const std::string &camera_label) const |
| Check if lens flare rendering is enabled for a camera. | |
| void | setCameraLensFlareProperties (const std::string &camera_label, const LensFlareProperties &properties) |
| Set lens flare rendering properties for a camera. | |
| LensFlareProperties | getCameraLensFlareProperties (const std::string &camera_label) const |
| Get the current lens flare properties for a camera. | |
| void | updateGeometry () |
| Adds all geometric primitives from the Context to OptiX. | |
| void | updateGeometry (const std::vector< uint > &UUIDs) |
| Adds certain geometric primitives from the Context to OptiX as specified by a list of UUIDs. | |
| void | runBand (const std::string &label) |
| Run the simulation for a single radiative band. | |
| void | runBand (const std::vector< std::string > &labels) |
| Run the simulation for a multiple radiative bands. | |
| std::vector< float > | getTotalAbsorbedFlux () |
| Get the total absorbed radiation flux summed over all bands for each primitive. | |
| float | getSkyEnergy () |
| Get the radiative energy lost to the sky (surroundings) | |
| float | calculateGtheta (helios::Context *context, helios::vec3 view_direction) |
| Calculate G(theta) (i.e., projected area fraction) for a group of primitives given a certain viewing direction. | |
| void | setCameraCalibration (CameraCalibration *CameraCalibration) |
| void | updateCameraResponse (const std::string &orginalcameralabel, const std::vector< std::string > &sourcelabels_raw, const std::vector< std::string > &cameraresponselabels, helios::vec2 &wavelengthrange, const std::vector< std::vector< float > > &truevalues, const std::string &calibratedmark) |
| Update the camera response for a given camera based on color board. | |
| float | getCameraResponseScale (const std::string &orginalcameralabel, const std::vector< std::string > &cameraresponselabels, const std::vector< std::string > &bandlabels, const std::vector< std::string > &sourcelabels, helios::vec2 &wavelengthrange, const std::vector< std::vector< float > > &truevalues) |
| Get the scale factor of the camera response for a given camera. | |
| void | runRadiationImaging (const std::string &cameralabel, const std::vector< std::string > &sourcelabels, const std::vector< std::string > &bandlabels, const std::vector< std::string > &cameraresponselabels, helios::vec2 wavelengthrange, float fluxscale=1, float diffusefactor=0.0005, uint scatteringdepth=4) |
| Run radiation imaging simulation. | |
| void | runRadiationImaging (const std::vector< std::string > &cameralabels, const std::vector< std::string > &sourcelabels, const std::vector< std::string > &bandlabels, const std::vector< std::string > &cameraresponselabels, helios::vec2 wavelengthrange, float fluxscale=1, float diffusefactor=0.0005, uint scatteringdepth=4) |
| Run radiation imaging simulation. | |
| void | applyCameraImageCorrections (const std::string &cameralabel, const std::string &red_band_label, const std::string &green_band_label, const std::string &blue_band_label, float saturation_adjustment=1.f, float brightness_adjustment=1.f, float contrast_adjustment=1.f) |
| Apply camera image corrections including brightness, contrast, saturation, and gamma compression. | |
| void | applyImageProcessingPipeline (const std::string &cameralabel, const std::string &red_band_label, const std::string &green_band_label, const std::string &blue_band_label, float saturation_adjustment=1.f, float brightness_adjustment=1.f, float contrast_adjustment=1.f, float gain_adjustment=1.f) |
| void | applyCameraColorCorrectionMatrix (const std::string &camera_label, const std::string &red_band_label, const std::string &green_band_label, const std::string &blue_band_label, const std::string &ccm_file_path) |
| Apply pre-computed color correction matrix to camera data. | |
| std::string | writeCameraImage (const std::string &camera, const std::vector< std::string > &bands, const std::string &imagefile_base, const std::string &image_path="./", int frame=-1, float flux_to_pixel_conversion=1.f) |
| Write camera data for one or more bands to a JPEG image. | |
| std::string | writeNormCameraImage (const std::string &camera, const std::vector< std::string > &bands, const std::string &imagefile_base, const std::string &image_path="./", int frame=-1) |
| Write normalized camera data (maximum value is 1) for one or more bands to a JPEG image. | |
| void | writeCameraImageData (const std::string &camera, const std::string &band, const std::string &imagefile_base, const std::string &image_path="./", int frame=-1) |
| Write camera data for one band to an ASCII text file. | |
| void | writeCameraImageDataEXR (const std::string &camera, const std::string &band, const std::string &imagefile_base, const std::string &image_path="./", int frame=-1) |
| Write camera pixel data to an EXR file with lossless float compression. | |
| void | writeCameraImageDataEXR (const std::string &camera, const std::vector< std::string > &bands, const std::string &imagefile_base, const std::string &image_path="./", int frame=-1) |
| Write multi-band camera pixel data to a single EXR file with lossless float compression. | |
| void | writePrimitiveDataLabelMap (const std::string &cameralabel, const std::string &primitive_data_label, const std::string &imagefile_base, const std::string &image_path="./", int frame=-1, float padvalue=NAN) |
| Write image pixel labels to text file based on primitive data. Primitive data must have type 'float', 'double', 'uint', or 'int'. | |
| void | writeObjectDataLabelMap (const std::string &cameralabel, const std::string &object_data_label, const std::string &imagefile_base, const std::string &image_path="./", int frame=-1, float padvalue=NAN) |
| Write image pixel labels to text file based on object data. Object data must have type 'float', 'double', 'uint', or 'int'. | |
| void | writeDepthImageData (const std::string &cameralabel, const std::string &imagefile_base, const std::string &image_path="./", int frame=-1) |
| Write depth image data to text file. | |
| void | writeDepthImageDataEXR (const std::string &cameralabel, const std::string &imagefile_base, const std::string &image_path="./", int frame=-1) |
| Write depth image data to an EXR file with lossless float compression. | |
| void | writeNormDepthImage (const std::string &cameralabel, const std::string &imagefile_base, float max_depth, const std::string &image_path="./", int frame=-1) |
| Write depth image file, with grayscale normalized to the minimum and maximum depth values. | |
| void | writeImageBoundingBoxes (const std::string &cameralabel, const std::string &primitive_data_label, uint object_class_ID, const std::string &imagefile_base, const std::string &image_path="./", bool append_label_file=false, int frame=-1) |
| Write bounding boxes based on primitive data labels (Ultralytic's YOLO format). Primitive data must have type of 'uint' or 'int'. | |
| void | writeImageBoundingBoxes_ObjectData (const std::string &cameralabel, const std::string &object_data_label, uint object_class_ID, const std::string &imagefile_base, const std::string &image_path="./", bool append_label_file=false, int frame=-1) |
| Write bounding boxes based on object data labels (Ultralytic's YOLO format). Object data must have type of 'uint' or 'int'. | |
| void | writeImageBoundingBoxes (const std::string &cameralabel, const std::string &primitive_data_label, const uint &object_class_ID, const std::string &image_file, const std::string &classes_txt_file="classes.txt", const std::string &image_path="./") |
| Write bounding boxes based on primitive data labels (Ultralytic's YOLO format). Primitive data must have type of 'uint' or 'int'. | |
| void | writeImageBoundingBoxes (const std::string &cameralabel, const std::vector< std::string > &primitive_data_label, const std::vector< uint > &object_class_ID, const std::string &image_file, const std::string &classes_txt_file="classes.txt", const std::string &image_path="./") |
| Write bounding boxes based on primitive data labels (Ultralytic's YOLO format). Primitive data must have type of 'uint' or 'int'. | |
| void | writeImageBoundingBoxes_ObjectData (const std::string &cameralabel, const std::string &object_data_label, const uint &object_class_ID, const std::string &image_file, const std::string &classes_txt_file="classes.txt", const std::string &image_path="./") |
| Write bounding boxes based on object data labels (Ultralytic's YOLO format). Object data must have type of 'uint' or 'int'. | |
| void | writeImageBoundingBoxes_ObjectData (const std::string &cameralabel, const std::vector< std::string > &object_data_label, const std::vector< uint > &object_class_ID, const std::string &image_file, const std::string &classes_txt_file="classes.txt", const std::string &image_path="./") |
| Write bounding boxes based on object data labels (Ultralytic's YOLO format). Object data must have type of 'uint' or 'int'. | |
| void | writeImageSegmentationMasks (const std::string &cameralabel, const std::string &primitive_data_label, const uint &object_class_ID, const std::string &json_filename, const std::string &image_file, const std::vector< std::string > &data_attribute_labels={}, bool append_file=false) |
| Write segmentation masks for primitive data in COCO JSON format. Primitive data must have type of 'uint' or 'int'. | |
| void | writeImageSegmentationMasks (const std::string &cameralabel, const std::vector< std::string > &primitive_data_label, const std::vector< uint > &object_class_ID, const std::string &json_filename, const std::string &image_file, const std::vector< std::string > &data_attribute_labels={}, bool append_file=false) |
| Write segmentation masks for primitive data in COCO JSON format. Primitive data must have type of 'uint' or 'int'. | |
| void | writeImageSegmentationMasks_ObjectData (const std::string &cameralabel, const std::string &object_data_label, const uint &object_class_ID, const std::string &json_filename, const std::string &image_file, const std::vector< std::string > &data_attribute_labels={}, bool append_file=false) |
| Write segmentation masks for object data in COCO JSON format. Object data must have type of 'uint' or 'int'. | |
| void | writeImageSegmentationMasks_ObjectData (const std::string &cameralabel, const std::vector< std::string > &object_data_label, const std::vector< uint > &object_class_ID, const std::string &json_filename, const std::string &image_file, const std::vector< std::string > &data_attribute_labels={}, bool append_file=false) |
| Write segmentation masks for object data in COCO JSON format. Object data must have type of 'uint' or 'int'. | |
| void | setPadValue (const std::string &cameralabel, const std::vector< std::string > &bandlabels, const std::vector< float > &padvalues) |
| Set padding value for pixels do not have valid values. | |
| void | calibrateCamera (const std::string &orginalcameralabel, const std::vector< std::string > &sourcelabels, const std::vector< std::string > &cameraresponselabels, const std::vector< std::string > &bandlabels, const float scalefactor, const std::vector< std::vector< float > > &truevalues, const std::string &calibratedmark) |
| Calibrate camera. | |
| void | calibrateCamera (const std::string &originalcameralabel, const float scalefactor, const std::vector< std::vector< float > > &truevalues, const std::string &calibratedmark) |
| Calibrate camera. | |
| std::string | autoCalibrateCameraImage (const std::string &camera_label, const std::string &red_band_label, const std::string &green_band_label, const std::string &blue_band_label, const std::string &output_file_path, bool print_quality_report=false, ColorCorrectionAlgorithm algorithm=ColorCorrectionAlgorithm::MATRIX_3X3_AUTO, const std::string &ccm_export_file_path="") |
| Auto-calibrate camera image using colorboard reference values. | |
| void | exportColorCorrectionMatrixXML (const std::string &file_path, const std::string &camera_label, const std::vector< std::vector< float > > &matrix, const std::string &source_image_path, const std::string &colorboard_type, float average_delta_e) |
| Helper function to export color correction matrix to XML file (public for testing) | |
| std::vector< std::vector< float > > | loadColorCorrectionMatrixXML (const std::string &file_path, std::string &camera_label_out) |
| Helper function to load color correction matrix from XML file (public for testing) | |
| std::vector< float > | getCameraPixelData (const std::string &camera_label, const std::string &band_label) |
| Get camera pixel data for a specific band. | |
| void | setCameraPixelData (const std::string &camera_label, const std::string &band_label, const std::vector< float > &pixel_data) |
| Set camera pixel data for a specific band. | |
Static Public Member Functions | |
| static int | selfTest (int argc=0, char **argv=nullptr) |
| Self-test. | |
| static bool | isGPUBackendAvailable () |
| Check if the GPU ray tracing backend is available. | |
| static RadiationModel | createWithBackend (helios::Context *context, std::unique_ptr< helios::RayTracingBackend > backend) |
| Create RadiationModel with custom backend (for testing) | |
Radiation transport model plugin.
Definition at line 674 of file RadiationModel.h.
|
strong |
Color correction algorithm types for auto-calibration.
Definition at line 1943 of file RadiationModel.h.
|
explicit |
Default constructor.
Definition at line 30 of file RadiationModel.cpp.
| RadiationModel::~RadiationModel | ( | ) |
Destructor.
Definition at line 147 of file RadiationModel.cpp.
| uint RadiationModel::addCollimatedRadiationSource | ( | ) |
Add an external source of collimated radiation (i.e., source at infinite distance with parallel rays) assuming the default direction of (0,0,1)
Definition at line 982 of file RadiationModel.cpp.
| uint RadiationModel::addCollimatedRadiationSource | ( | const helios::SphericalCoord & | direction | ) |
Add an external source of collimated radiation (i.e., source at infinite distance with parallel rays)
| [in] | direction | Spherical coordinate pointing toward the radiation source (elevation and azimuth angles in radians) |
Definition at line 987 of file RadiationModel.cpp.
| uint RadiationModel::addCollimatedRadiationSource | ( | const helios::vec3 & | direction | ) |
Add an external source of collimated radiation (i.e., source at infinite distance with parallel rays)
| [in] | direction | unit vector pointing toward the radiation source |
Definition at line 991 of file RadiationModel.cpp.
| uint RadiationModel::addDiskRadiationSource | ( | const helios::vec3 & | position, |
| float | radius, | ||
| const helios::vec3 & | rotation_rad | ||
| ) |
Add planar circular radiation source.
| [in] | position | (x,y,z) position of the center of the disk radiation source |
| [in] | radius | Radius of disk source |
| [in] | rotation_rad | Rotation of the source in radians about the x- y- and z- axes (the sign of the rotation angle follows right-hand rule) |
Definition at line 1127 of file RadiationModel.cpp.
| void RadiationModel::addRadiationBand | ( | const std::string & | label | ) |
Add a spectral radiation band to the model.
| [in] | label | Label used to reference the band |
Definition at line 321 of file RadiationModel.cpp.
| void RadiationModel::addRadiationBand | ( | const std::string & | label, |
| float | wavelength_min, | ||
| float | wavelength_max | ||
| ) |
Add a spectral radiation band to the model with explicit specification of the spectral wave band.
| [in] | label | Label used to reference the band |
| [in] | wavelength_min | Lower bounding wavelength for wave band |
| [in] | wavelength_max | Upper bounding wavelength for wave band |
Definition at line 345 of file RadiationModel.cpp.
| void RadiationModel::addRadiationCamera | ( | const std::string & | camera_label, |
| const std::vector< std::string > & | band_label, | ||
| const helios::vec3 & | position, | ||
| const helios::SphericalCoord & | viewing_direction, | ||
| const CameraProperties & | camera_properties, | ||
| uint | antialiasing_samples | ||
| ) |
Add a radiation camera sensor.
| [in] | camera_label | A label that will be used to refer to the camera (e.g., "thermal", "multispectral", "NIR", etc.). |
| [in] | band_label | Labels for radiation bands to include in camera. |
| [in] | position | Cartesian (x,y,z) location of the camera sensor. |
| [in] | viewing_direction | Spherical direction in which the camera is pointed (elevation and azimuth angles in radians). |
| [in] | camera_properties | 'CameraProperties' struct containing intrinsic camera parameters. |
| [in] | antialiasing_samples | Number of ray samples per pixel. More samples will decrease noise/aliasing in the image, but will take longer to run. |
Definition at line 90 of file RadiationCamera.cpp.
| void RadiationModel::addRadiationCamera | ( | const std::string & | camera_label, |
| const std::vector< std::string > & | band_label, | ||
| const helios::vec3 & | position, | ||
| const helios::vec3 & | lookat, | ||
| const CameraProperties & | camera_properties, | ||
| uint | antialiasing_samples | ||
| ) |
Add a radiation camera sensor.
| [in] | camera_label | A label that will be used to refer to the camera (e.g., "thermal", "multispectral", "NIR", etc.). |
| [in] | band_label | Labels for radiation bands to include in camera. |
| [in] | position | Cartesian (x,y,z) location of the camera sensor. |
| [in] | lookat | Cartesian (x,y,z) position at which the camera is pointed. The vector (lookat-position) is perpendicular to the camera face. |
| [in] | camera_properties | 'CameraProperties' struct containing intrinsic camera parameters. |
| [in] | antialiasing_samples | Number of ray samples per pixel. More samples will decrease noise/aliasing in the image, but will take longer to run. |
Definition at line 30 of file RadiationCamera.cpp.
| void RadiationModel::addRadiationCameraFromLibrary | ( | const std::string & | camera_label, |
| const std::string & | library_camera_label, | ||
| const helios::vec3 & | position, | ||
| const helios::vec3 & | lookat, | ||
| uint | antialiasing_samples | ||
| ) |
Add a radiation camera sensor loading all properties from the camera library.
This method loads camera intrinsic parameters (resolution, field of view, sensor size) and spectral response data from the camera library XML file. The camera is created with the specified position and viewing direction.
Available cameras can be found in plugins/radiation/camera_library/camera_library.xml. The library includes cameras such as: Canon_20D, Nikon_D700, Nikon_D50, iPhone11, iPhone12ProMAX.
Each camera in the library defines spectral bands (typically "red", "green", and "blue" for RGB cameras). If these bands do not already exist in the radiation model, they will be automatically created with emission disabled and scattering depth set to 3.
| [in] | camera_label | A label that will be used to refer to the camera instance. |
| [in] | library_camera_label | Label of the camera in the library (e.g., "Canon_20D", "iPhone11"). |
| [in] | position | Cartesian (x,y,z) location of the camera sensor. |
| [in] | lookat | Cartesian (x,y,z) position at which the camera is pointed. |
| [in] | antialiasing_samples | Number of ray samples per pixel (minimum 1). |
Definition at line 133 of file RadiationCamera.cpp.
| void RadiationModel::addRadiationCameraFromLibrary | ( | const std::string & | camera_label, |
| const std::string & | library_camera_label, | ||
| const helios::vec3 & | position, | ||
| const helios::vec3 & | lookat, | ||
| uint | antialiasing_samples, | ||
| const std::vector< std::string > & | band_labels | ||
| ) |
Add a radiation camera sensor loading all properties from the camera library with custom band names.
This overload allows specifying custom band labels instead of using the default labels from the camera library XML file. This is useful when you want to use different band names than those defined in the library (e.g., using "R", "G", "B" instead of "red", "green", "blue").
The custom band labels are mapped to the spectral responses in the order they appear in the camera library XML file. For example, if the XML defines spectral responses in order "red", "green", "blue" and you provide band_labels = {"R", "G", "B"}, then "R" will use the "red" spectral response, "G" will use "green", and "B" will use "blue".
| [in] | camera_label | A label that will be used to refer to the camera instance. |
| [in] | library_camera_label | Label of the camera in the library (e.g., "Canon_20D", "iPhone11"). |
| [in] | position | Cartesian (x,y,z) location of the camera sensor. |
| [in] | lookat | Cartesian (x,y,z) position at which the camera is pointed. |
| [in] | antialiasing_samples | Number of ray samples per pixel (minimum 1). |
| [in] | band_labels | Custom band labels to use. Must have the same number of elements as there are spectral responses defined in the camera library entry. The order must correspond to the order of spectral_response elements in the XML. |
Definition at line 138 of file RadiationCamera.cpp.
| uint RadiationModel::addRectangleRadiationSource | ( | const helios::vec3 & | position, |
| const helios::vec2 & | size, | ||
| const helios::vec3 & | rotation_rad | ||
| ) |
Add planar rectangular radiation source.
| [in] | position | (x,y,z) position of the center of the rectangular radiation source |
| [in] | size | Length (.x) and width (.y) of rectangular source |
| [in] | rotation_rad | Rotation of the source in radians about the x- y- and z- axes (the sign of the rotation angle follows right-hand rule) |
Definition at line 1096 of file RadiationModel.cpp.
| void RadiationModel::addSIFCamera | ( | const std::string & | camera_label, |
| const std::vector< std::string > & | emission_band_labels, | ||
| const helios::vec3 & | position, | ||
| const helios::SphericalCoord & | viewing_direction, | ||
| const SIFCameraProperties & | camera_properties, | ||
| uint | antialiasing_samples | ||
| ) |
Add a solar-induced chlorophyll fluorescence (SIF) camera sensor using a spherical viewing direction.
Same as the lookat-based overload; see that method's documentation for details.
| [in] | camera_label | A label used to refer to this camera. |
| [in] | emission_band_labels | Labels of radiation bands to include as image channels. |
| [in] | position | Cartesian (x,y,z) location of the camera sensor. |
| [in] | viewing_direction | Spherical direction in which the camera is pointed. |
| [in] | camera_properties | SIFCameraProperties struct. |
| [in] | antialiasing_samples | Number of ray samples per pixel. |
Definition at line 943 of file RadiationModel.cpp.
| void RadiationModel::addSIFCamera | ( | const std::string & | camera_label, |
| const std::vector< std::string > & | emission_band_labels, | ||
| const helios::vec3 & | position, | ||
| const helios::vec3 & | lookat, | ||
| const SIFCameraProperties & | camera_properties, | ||
| uint | antialiasing_samples | ||
| ) |
Add a solar-induced chlorophyll fluorescence (SIF) camera sensor.
Creates a camera whose per-band flux is sourced from the Fluspect-B leaf fluorescence model (Vilfan et al. 2016) rather than from scattered scene radiation. Geometry, spectral-response, and per-band per-pixel output work exactly like a regular radiation camera — only the emission physics differs.
Each band in emission_band_labels must already exist (added via addRadiationBand prior to calling this method). Those bands are flagged internally as SIF-emitting and will use Fluspect-B-derived emission instead of Stefan-Boltzmann.
Helios auto-creates internal radiation bands covering the Fluspect-B excitation range (400-750 nm) at the resolution specified by camera_properties.excitation_bin_width_nm, reusing a single excitation band set across cameras with matching bin widths.
Each emission band is bound to exactly one excitation bin width — the one from the first camera that flags it. Re-flagging the same band with a different bin width from a subsequent camera raises a helios_runtime_error. If you need two different excitation resolutions on the same scene, use disjoint emission bands for each resolution.
The excitation-band scattering depth is controlled by camera_properties.excitation_scattering_depth (default 0). At depth 0, every ray that hits a leaf is treated as fully absorbed regardless of reflectivity and transmissivity — fast, but over-estimates APAR in the NIR excitation range where leaf rho+tau is large. Set >=1 to include inter-leaf scattering in APAR. When multiple SIF cameras share an excitation bin width, the highest requested scattering depth applies to the shared excitation bands.
O(N_leaves * N_excitation_bands), where N_excitation_bands = ceil(350 / bin_width_nm). For 1 M primitives at 10 nm bin width, this is ~140 MB of float storage plus the corresponding per-band GPU ray-trace buffers. Choose a coarser bin width for very large canopies.| [in] | camera_label | A label used to refer to this camera. |
| [in] | emission_band_labels | Labels of radiation bands to include as image channels. Each must have been added via addRadiationBand() with appropriate wavelength bounds and scattering depth for the SIF measurement. |
| [in] | position | Cartesian (x,y,z) location of the camera sensor. |
| [in] | lookat | Cartesian (x,y,z) position at which the camera is pointed. |
| [in] | camera_properties | SIFCameraProperties struct with intrinsic camera parameters and excitation_bin_width_nm. |
| [in] | antialiasing_samples | Number of ray samples per pixel (minimum 1). |
Definition at line 852 of file RadiationModel.cpp.
| uint RadiationModel::addSphereRadiationSource | ( | const helios::vec3 & | position, |
| float | radius | ||
| ) |
Add an external source of radiation that emits from the surface of a sphere.
| [in] | position | (x,y,z) position of the center of the sphere radiation source |
| [in] | radius | Radius of the sphere radiation source |
Definition at line 1026 of file RadiationModel.cpp.
| uint RadiationModel::addSunSphereRadiationSource | ( | ) |
Add a sphere radiation source that models the sun assuming the default direction of (0,0,1)
Definition at line 1057 of file RadiationModel.cpp.
| uint RadiationModel::addSunSphereRadiationSource | ( | const helios::SphericalCoord & | sun_direction | ) |
Add a sphere radiation source that models the sun.
| [in] | sun_direction | Spherical coordinate pointing towards the sun |
Definition at line 1061 of file RadiationModel.cpp.
| uint RadiationModel::addSunSphereRadiationSource | ( | const helios::vec3 & | sun_direction | ) |
Add a sphere radiation source that models the sun.
| [in] | sun_direction | Unit vector pointing towards the sun |
Definition at line 1065 of file RadiationModel.cpp.
| void RadiationModel::applyCameraColorCorrectionMatrix | ( | const std::string & | camera_label, |
| const std::string & | red_band_label, | ||
| const std::string & | green_band_label, | ||
| const std::string & | blue_band_label, | ||
| const std::string & | ccm_file_path | ||
| ) |
Apply pre-computed color correction matrix to camera data.
| [in] | camera_label | Label of the camera to apply color correction to |
| [in] | red_band_label | Label for red channel band data |
| [in] | green_band_label | Label for green channel band data |
| [in] | blue_band_label | Label for blue channel band data |
| [in] | ccm_file_path | Path to XML file containing color correction matrix |
Definition at line 5456 of file RadiationModel.cpp.
| void RadiationModel::applyCameraImageCorrections | ( | const std::string & | cameralabel, |
| const std::string & | red_band_label, | ||
| const std::string & | green_band_label, | ||
| const std::string & | blue_band_label, | ||
| float | saturation_adjustment = 1.f, |
||
| float | brightness_adjustment = 1.f, |
||
| float | contrast_adjustment = 1.f |
||
| ) |
Apply camera image corrections including brightness, contrast, saturation, and gamma compression.
This only applies to RGB cameras. This pipeline applies post-processing steps including brightness/contrast adjustment, saturation adjustment, and gamma compression. The parameters are saved to camera metadata if metadata export is enabled.
| [in] | cameralabel | Label of camera to be used for processing |
| [in] | red_band_label | Label of the red band |
| [in] | green_band_label | Label of the green band |
| [in] | blue_band_label | Label of the blue band |
| [in] | saturation_adjustment | [optional] Adjustment factor for saturation (default is 1.0, which means no adjustment) |
| [in] | brightness_adjustment | [optional] Adjustment factor for brightness (default is 1.0, which means no adjustment) |
| [in] | contrast_adjustment | [optional] Adjustment factor for contrast (default is 1.0, which means no adjustment) |
Definition at line 3043 of file RadiationCamera.cpp.
| void RadiationModel::applyImageProcessingPipeline | ( | const std::string & | cameralabel, |
| const std::string & | red_band_label, | ||
| const std::string & | green_band_label, | ||
| const std::string & | blue_band_label, | ||
| float | saturation_adjustment = 1.f, |
||
| float | brightness_adjustment = 1.f, |
||
| float | contrast_adjustment = 1.f, |
||
| float | gain_adjustment = 1.f |
||
| ) |
Definition at line 3083 of file RadiationCamera.cpp.
| std::string RadiationModel::autoCalibrateCameraImage | ( | const std::string & | camera_label, |
| const std::string & | red_band_label, | ||
| const std::string & | green_band_label, | ||
| const std::string & | blue_band_label, | ||
| const std::string & | output_file_path, | ||
| bool | print_quality_report = false, |
||
| ColorCorrectionAlgorithm | algorithm = ColorCorrectionAlgorithm::MATRIX_3X3_AUTO, |
||
| const std::string & | ccm_export_file_path = "" |
||
| ) |
Auto-calibrate camera image using colorboard reference values.
| [in] | camera_label | Label of the camera that generated the image |
| [in] | red_band_label | Label for red channel band data |
| [in] | green_band_label | Label for green channel band data |
| [in] | blue_band_label | Label for blue channel band data |
| [in] | output_file_path | Path where corrected image will be written |
| [in] | print_quality_report | If true, prints calibration quality metrics to console |
| [in] | algorithm | Color correction algorithm to use (defaults to 3x3 matrix with auto-fallback) |
| [in] | ccm_export_file_path | Optional path to export the computed color correction matrix to XML file |
Definition at line 4750 of file RadiationModel.cpp.
| void RadiationModel::blendSpectra | ( | const std::string & | new_spectrum_label, |
| const std::vector< std::string > & | spectrum_labels, | ||
| const std::vector< float > & | weights | ||
| ) | const |
Blend one or more spectra together into a new spectrum.
| [in] | new_spectrum_label | Label for new spectrum global data, which is created by blending the input spectra. |
| [in] | spectrum_labels | Vector of global data labels for spectra to be blended. |
| [in] | weights | Vector of weights for each spectrum to be blended. The weights must sum to 1.0. |
Definition at line 1673 of file RadiationModel.cpp.
| void RadiationModel::blendSpectraRandomly | ( | const std::string & | new_spectrum_label, |
| const std::vector< std::string > & | spectrum_labels | ||
| ) | const |
Blend one or more spectra together into a new spectrum, with random weights assigned to each input spectrum.
| [in] | new_spectrum_label | Label for new spectrum global data, which is created by blending the input spectra. |
| [in] | spectrum_labels | Vector of global data labels for spectra to be blended. |
Definition at line 1747 of file RadiationModel.cpp.
| float RadiationModel::calculateGtheta | ( | helios::Context * | context, |
| helios::vec3 | view_direction | ||
| ) |
Calculate G(theta) (i.e., projected area fraction) for a group of primitives given a certain viewing direction.
| [in] | context | Pointer to Helios context |
| [in] | view_direction | Viewing direction for projected area |
Definition at line 4574 of file RadiationModel.cpp.
| void RadiationModel::calibrateCamera | ( | const std::string & | orginalcameralabel, |
| const std::vector< std::string > & | sourcelabels, | ||
| const std::vector< std::string > & | cameraresponselabels, | ||
| const std::vector< std::string > & | bandlabels, | ||
| const float | scalefactor, | ||
| const std::vector< std::vector< float > > & | truevalues, | ||
| const std::string & | calibratedmark | ||
| ) |
Calibrate camera.
| [in] | orginalcameralabel | Label of camera to be used for simulation |
| [in] | sourcelabels | Labels of source fluxes |
| [in] | cameraresponselabels | Labels of camera spectral responses |
| [in] | bandlabels | Labels of radiation bands |
| [in] | scalefactor | Scale factor for calibrated camera spectral response |
| [in] | truevalues | True image values of the color board |
| [in] | calibratedmark | Mark of the calibrated camera spectral response |
Definition at line 2929 of file RadiationCamera.cpp.
| void RadiationModel::calibrateCamera | ( | const std::string & | originalcameralabel, |
| const float | scalefactor, | ||
| const std::vector< std::vector< float > > & | truevalues, | ||
| const std::string & | calibratedmark | ||
| ) |
Calibrate camera.
| [in] | originalcameralabel | Label of camera to be used for simulation |
| [in] | scalefactor | Scale factor for calibrated camera spectral response |
| [in] | truevalues | True image values of the color board |
| [in] | calibratedmark | Mark of the calibrated camera spectral response |
Definition at line 2966 of file RadiationCamera.cpp.
| void RadiationModel::copyRadiationBand | ( | const std::string & | old_label, |
| const std::string & | new_label | ||
| ) |
Copy a spectral radiation band based on a previously created band.
| [in] | old_label | Label of old radiation band to be copied |
| [in] | new_label | Label of new radiation band to be created |
Definition at line 375 of file RadiationModel.cpp.
| void RadiationModel::copyRadiationBand | ( | const std::string & | old_label, |
| const std::string & | new_label, | ||
| float | wavelength_min, | ||
| float | wavelength_max | ||
| ) |
Copy a spectral radiation band based on a previously created band and explicitly set new band wavelength range.
| [in] | old_label | Label of old radiation band to be copied |
| [in] | new_label | Label of new radiation band to be created |
| [in] | wavelength_min | Lower bounding wavelength for wave band |
| [in] | wavelength_max | Upper bounding wavelength for wave band |
Definition at line 386 of file RadiationModel.cpp.
|
static |
Create RadiationModel with custom backend (for testing)
| context | Helios context |
| backend | Pre-initialized backend to use |
INTERNAL TEST-ONLY: Allows test suite to inject shared VulkanDevice. Not for production use - use default constructor instead.
Definition at line 116 of file RadiationModel.cpp.
| void RadiationModel::deleteRadiationSource | ( | uint | sourceID | ) |
Delete an existing radiation source (any type)
| [in] | sourceID | Identifier of radiation source |
Definition at line 1158 of file RadiationModel.cpp.
| void RadiationModel::disableCameraLensFlare | ( | const std::string & | camera_label | ) |
Disable lens flare rendering for a camera.
| [in] | camera_label | Label for the camera to disable lens flare for. |
Definition at line 4617 of file RadiationCamera.cpp.
| void RadiationModel::disableCameraModelVisualization | ( | ) |
Remove the 3D model of the camera from the Context.
Definition at line 1385 of file RadiationModel.cpp.
| void RadiationModel::disableEmission | ( | const std::string & | label | ) |
Disable emission calculations for all primitives in this band.
| [in] | label | Label used to reference the band |
Definition at line 414 of file RadiationModel.cpp.
| void RadiationModel::disableLightModelVisualization | ( | ) |
Remove the 3D model of the light source from the Context.
Definition at line 1369 of file RadiationModel.cpp.
| void RadiationModel::disableMessages | ( | ) |
Disable/silence status messages.
Definition at line 151 of file RadiationModel.cpp.
| bool RadiationModel::doesBandExist | ( | const std::string & | label | ) | const |
Check if a radiation band exists based on its label.
| [in] | label | Label used to reference the band |
Definition at line 406 of file RadiationModel.cpp.
| void RadiationModel::enableCameraLensFlare | ( | const std::string & | camera_label | ) |
Enable lens flare rendering for a camera.
Enables physically-based lens flare effects including ghost reflections and starburst diffraction patterns. Lens flare is applied as a post-processing step after the main radiation calculations.
| [in] | camera_label | Label for the camera to enable lens flare for. |
Definition at line 4610 of file RadiationCamera.cpp.
| void RadiationModel::enableCameraMetadata | ( | const std::string & | camera_label | ) |
Enable automatic JSON metadata file writing for a camera.
| [in] | camera_label | Label for the camera to enable metadata writing for. |
Definition at line 4425 of file RadiationCamera.cpp.
| void RadiationModel::enableCameraMetadata | ( | const std::vector< std::string > & | camera_labels | ) |
Enable automatic JSON metadata file writing for multiple cameras.
| [in] | camera_labels | Vector of camera labels to enable metadata writing for. |
Definition at line 4449 of file RadiationCamera.cpp.
| void RadiationModel::enableCameraModelVisualization | ( | ) |
Add a 3D model of the camera to the Context for visualization purposes.
Definition at line 1376 of file RadiationModel.cpp.
| void RadiationModel::enableEmission | ( | const std::string & | label | ) |
Enable emission calculations for all primitives in this band.
| [in] | label | Label used to reference the band |
Definition at line 423 of file RadiationModel.cpp.
| void RadiationModel::enableLightModelVisualization | ( | ) |
Add a 3D model of the light source (rectangular, disk, and sphere) to the Context for visualization purposes.
Definition at line 1360 of file RadiationModel.cpp.
| void RadiationModel::enableMessages | ( | ) |
Enable status messages.
Definition at line 155 of file RadiationModel.cpp.
| void RadiationModel::enforcePeriodicBoundary | ( | const std::string & | boundary | ) |
Use a periodic boundary condition in one or more lateral directions.
| [in] | boundary | Lateral direction to enforce periodic boundary - choices are "x" (periodic only in x-direction), "y" (periodic only in y-direction), or "xy" (periodic in both x- and y-directions). |
Definition at line 1935 of file RadiationModel.cpp.
| void RadiationModel::exportColorCorrectionMatrixXML | ( | const std::string & | file_path, |
| const std::string & | camera_label, | ||
| const std::vector< std::vector< float > > & | matrix, | ||
| const std::string & | source_image_path, | ||
| const std::string & | colorboard_type, | ||
| float | average_delta_e | ||
| ) |
Helper function to export color correction matrix to XML file (public for testing)
Definition at line 4596 of file RadiationModel.cpp.
| std::vector< std::string > RadiationModel::getAllCameraLabels | ( | ) |
Get the labels for all radiation cameras that have been added to the radiation model.
Definition at line 522 of file RadiationCamera.cpp.
| std::string RadiationModel::getBackendName | ( | ) | const |
Get the name of the active ray tracing backend (e.g., "OptiX 8.1", "Vulkan Compute")
Definition at line 159 of file RadiationModel.cpp.
| LensFlareProperties RadiationModel::getCameraLensFlareProperties | ( | const std::string & | camera_label | ) | const |
Get the current lens flare properties for a camera.
| [in] | camera_label | Label for the camera to get properties for. |
Definition at line 4659 of file RadiationCamera.cpp.
| helios::vec3 RadiationModel::getCameraLookat | ( | const std::string & | camera_label | ) | const |
Get the position the radiation camera is pointed toward (used to calculate camera orientation)
| [in] | camera_label | Label for the camera to be set. |
Definition at line 405 of file RadiationCamera.cpp.
| CameraMetadata RadiationModel::getCameraMetadata | ( | const std::string & | camera_label | ) | const |
Get the current metadata for a camera.
| [in] | camera_label | Label for the camera to get metadata for. |
Definition at line 4456 of file RadiationCamera.cpp.
| helios::SphericalCoord RadiationModel::getCameraOrientation | ( | const std::string & | camera_label | ) | const |
Get the orientation of the radiation camera based on a spherical coordinate.
| [in] | camera_label | Label for the camera to be set. |
Definition at line 426 of file RadiationCamera.cpp.
| CameraProperties RadiationModel::getCameraParameters | ( | const std::string & | camera_label | ) | const |
Get the intrinsic parameters of an existing radiation camera.
This method returns the current intrinsic optical and geometric parameters of a camera including resolution, horizontal field of view, lens diameter, focal plane distance, sensor width, model name, and the auto-calculated FOV aspect ratio.
| [in] | camera_label | Label identifying the camera to query. Camera must exist. |
Definition at line 447 of file RadiationCamera.cpp.
| std::vector< float > RadiationModel::getCameraPixelData | ( | const std::string & | camera_label, |
| const std::string & | band_label | ||
| ) |
Get camera pixel data for a specific band.
Definition at line 5531 of file RadiationModel.cpp.
| helios::vec3 RadiationModel::getCameraPosition | ( | const std::string & | camera_label | ) | const |
Get the position of the radiation camera.
| [in] | camera_label | Label for the camera to be set. |
Definition at line 384 of file RadiationCamera.cpp.
| float RadiationModel::getCameraResponseScale | ( | const std::string & | orginalcameralabel, |
| const std::vector< std::string > & | cameraresponselabels, | ||
| const std::vector< std::string > & | bandlabels, | ||
| const std::vector< std::string > & | sourcelabels, | ||
| helios::vec2 & | wavelengthrange, | ||
| const std::vector< std::vector< float > > & | truevalues | ||
| ) |
Get the scale factor of the camera response for a given camera.
| [in] | orginalcameralabel | Label of camera to be used for simulation |
| [in] | cameraresponselabels | Vector of labels of camera spectral responses |
| [in] | bandlabels | Vector of labels of radiation bands to be used for simulation |
| [in] | sourcelabels | Vector of labels of source spectra to be used for simulation |
| [in] | wavelengthrange | Wavelength range of the camera |
| [in] | truevalues | True image values of the color board |
Definition at line 1070 of file RadiationCamera.cpp.
| float RadiationModel::getDiffuseFlux | ( | const std::string & | band_label | ) | const |
Get the diffuse flux for a given band.
| [in] | band_label | Label used to reference the band |
Definition at line 1327 of file RadiationModel.cpp.
| float RadiationModel::getSkyEnergy | ( | ) |
Get the radiative energy lost to the sky (surroundings)
Definition at line 4537 of file RadiationModel.cpp.
| float RadiationModel::getSourceFlux | ( | uint | source_ID, |
| const std::string & | band_label | ||
| ) | const |
Get the flux of radiation source for this band.
| [in] | source_ID | Identifier of radiation source |
| [in] | band_label | Label used to reference the band |
Definition at line 1223 of file RadiationModel.cpp.
| helios::vec3 RadiationModel::getSourcePosition | ( | uint | source_ID | ) | const |
Get the position/direction of radiation source.
| [in] | source_ID | Identifier of radiation source |
Definition at line 1912 of file RadiationModel.cpp.
| std::vector< float > RadiationModel::getTotalAbsorbedFlux | ( | ) |
Get the total absorbed radiation flux summed over all bands for each primitive.
Definition at line 4549 of file RadiationModel.cpp.
| float RadiationModel::integrateSourceSpectrum | ( | uint | source_ID, |
| float | wavelength_min, | ||
| float | wavelength_max | ||
| ) | const |
Integrate a source spectral distribution between two wavelength bounds.
| [in] | source_ID | Identifier of a radiation source. |
| [in] | wavelength_min | Wavelength for lower bounds of integration |
| [in] | wavelength_max | Wavelength for upper bounds of integration |
Definition at line 1634 of file RadiationModel.cpp.
| float RadiationModel::integrateSpectrum | ( | const std::vector< helios::vec2 > & | object_spectrum | ) | const |
Integrate a spectral distribution across all wavelengths.
| [in] | object_spectrum | Vector containing spectral data. Each index of "spectrum" gives the wavelength (.x) and spectral intensity/reflectivity (.y). |
Definition at line 1555 of file RadiationModel.cpp.
| float RadiationModel::integrateSpectrum | ( | const std::vector< helios::vec2 > & | object_spectrum, |
| const std::vector< helios::vec2 > & | camera_spectrum | ||
| ) | const |
Integrate the product of surface spectral data and camera spectral response across all wavelengths.
| [in] | object_spectrum | Vector containing surface spectral data. Each index of "spectrum" gives the wavelength (.x) and spectral intensity/reflectivity (.y). |
| [in] | camera_spectrum | Vector containing camera spectral response data. Each index of "spectrum" gives the wavelength (.x) and spectral intensity/reflectivity (.y). |
Definition at line 1601 of file RadiationModel.cpp.
| float RadiationModel::integrateSpectrum | ( | const std::vector< helios::vec2 > & | object_spectrum, |
| float | wavelength_min, | ||
| float | wavelength_max | ||
| ) | const |
Integrate a spectral distribution between two wavelength bounds.
| [in] | object_spectrum | Vector containing spectral data. Each index of "spectrum" gives the wavelength (.x) and spectral intensity/reflectivity (.y). |
| [in] | wavelength_min | Wavelength for lower bounds of integration |
| [in] | wavelength_max | Wavelength for upper bounds of integration |
| float RadiationModel::integrateSpectrum | ( | uint | source_ID, |
| const std::vector< helios::vec2 > & | object_spectrum, | ||
| const std::vector< helios::vec2 > & | camera_spectrum | ||
| ) | const |
Integrate the product of a radiation source spectral distribution, surface spectral data, and camera spectral response across all wavelengths.
| [in] | source_ID | Identifier of a radiation source. |
| [in] | object_spectrum | Vector containing surface spectral data. Each index of "spectrum" gives the wavelength (.x) and spectral intensity/reflectivity (.y). |
| [in] | camera_spectrum | Vector containing camera spectral response data. Each index of "spectrum" gives the wavelength (.x) and spectral intensity/reflectivity (.y). |
Definition at line 1562 of file RadiationModel.cpp.
| float RadiationModel::integrateSpectrum | ( | uint | source_ID, |
| const std::vector< helios::vec2 > & | object_spectrum, | ||
| float | wavelength_min, | ||
| float | wavelength_max | ||
| ) | const |
Integrate the product of a radiation source spectral distribution with specified spectral data between two wavelength bounds.
| [in] | source_ID | Identifier of a radiation source. |
| [in] | object_spectrum | Vector containing spectral data. Each index of "spectrum" gives the wavelength (.x) and spectral intensity/reflectivity (.y). |
| [in] | wavelength_min | Wavelength for lower bounds of integration |
| [in] | wavelength_max | Wavelength for upper bounds of integration |
| void RadiationModel::interpolateSpectrumFromObjectData | ( | const std::vector< uint > & | object_IDs, |
| const std::vector< std::string > & | spectra, | ||
| const std::vector< float > & | values, | ||
| const std::string & | object_data_query_label, | ||
| const std::string & | primitive_data_radprop_label | ||
| ) |
Configure automatic spectral interpolation based on object data values.
This function sets up automatic interpolation between different spectra based on the value of an object data field. When updateRadiativeProperties() is called, for each object specified, it will query the value of the object data field specified by object_data_query_label, perform nearest-neighbor interpolation to find the closest spectrum from the spectra vector, and set the primitive data field specified by primitive_data_radprop_label to the label of the selected spectrum for all primitives belonging to that object.
| [in] | object_IDs | Vector of object IDs to apply interpolation to |
| [in] | spectra | Vector of global data labels containing spectral data (type std::vector<helios::vec2>). Each label must reference valid global data. |
| [in] | values | Vector of object data values mapping to each spectrum. Must be the same length as spectra vector. |
| [in] | object_data_query_label | Name of existing object data field to query for interpolation (e.g., "age") |
| [in] | primitive_data_radprop_label | Name of primitive data field to set with interpolated spectrum label (e.g., "reflectivity_spectrum" or "transmissivity_spectrum") |
Definition at line 1826 of file RadiationModel.cpp.
| void RadiationModel::interpolateSpectrumFromPrimitiveData | ( | const std::vector< uint > & | primitive_UUIDs, |
| const std::vector< std::string > & | spectra, | ||
| const std::vector< float > & | values, | ||
| const std::string & | primitive_data_query_label, | ||
| const std::string & | primitive_data_radprop_label | ||
| ) |
Configure automatic spectral interpolation based on primitive data values.
This function sets up automatic interpolation between different spectra based on the value of a primitive data field. When updateRadiativeProperties() is called, for each primitive specified, it will query the value of the primitive data field specified by primitive_data_query_label, perform nearest-neighbor interpolation to find the closest spectrum from the spectra vector, and set the primitive data field specified by primitive_data_radprop_label to the label of the selected spectrum.
| [in] | primitive_UUIDs | Vector of primitive UUIDs to apply interpolation to |
| [in] | spectra | Vector of global data labels containing spectral data (type std::vector<helios::vec2>). Each label must reference valid global data. |
| [in] | values | Vector of primitive data values mapping to each spectrum. Must be the same length as spectra vector. |
| [in] | primitive_data_query_label | Name of existing primitive data field to query for interpolation (e.g., "age") |
| [in] | primitive_data_radprop_label | Name of primitive data field to set with interpolated spectrum label (e.g., "reflectivity_spectrum" or "transmissivity_spectrum") |
Definition at line 1762 of file RadiationModel.cpp.
| bool RadiationModel::isCameraLensFlareEnabled | ( | const std::string & | camera_label | ) | const |
Check if lens flare rendering is enabled for a camera.
| [in] | camera_label | Label for the camera to check. |
Definition at line 4624 of file RadiationCamera.cpp.
|
static |
Check if the GPU ray tracing backend is available.
Attempts to initialize the GPU backend (Vulkan or OptiX). If initialization succeeds, the backend is functional. If it fails (e.g., no GPU, no driver, CI runner without hardware), returns false.
Also returns false if the environment variable HELIOS_NO_GPU is set to a non-zero value, allowing local simulation of headless CI environments.
Definition at line 125 of file RadiationModel.cpp.
| bool RadiationModel::isSIFCamera | ( | const std::string & | camera_label | ) | const |
Check whether a camera was added via addSIFCamera (vs. addRadiationCamera).
| [in] | camera_label | Label of the camera. |
Definition at line 950 of file RadiationModel.cpp.
| std::vector< std::vector< float > > RadiationModel::loadColorCorrectionMatrixXML | ( | const std::string & | file_path, |
| std::string & | camera_label_out | ||
| ) |
Helper function to load color correction matrix from XML file (public for testing)
Definition at line 4651 of file RadiationModel.cpp.
| void RadiationModel::optionalOutputPrimitiveData | ( | const char * | label | ) |
Add optional output primitive data values to the Context.
| [in] | label | Name of primitive data (e.g., "reflectivity", "transmissivity") |
Definition at line 166 of file RadiationModel.cpp.
| void RadiationModel::runBand | ( | const std::string & | label | ) |
Run the simulation for a single radiative band.
| [in] | label | Label used to reference the band (e.g., "PAR") |
Definition at line 3391 of file RadiationModel.cpp.
| void RadiationModel::runBand | ( | const std::vector< std::string > & | labels | ) |
Run the simulation for a multiple radiative bands.
| [in] | labels | Label used to reference the band (e.g., "PAR") |
Definition at line 3396 of file RadiationModel.cpp.
| void RadiationModel::runRadiationImaging | ( | const std::string & | cameralabel, |
| const std::vector< std::string > & | sourcelabels, | ||
| const std::vector< std::string > & | bandlabels, | ||
| const std::vector< std::string > & | cameraresponselabels, | ||
| helios::vec2 | wavelengthrange, | ||
| float | fluxscale = 1, |
||
| float | diffusefactor = 0.0005, |
||
| uint | scatteringdepth = 4 |
||
| ) |
Run radiation imaging simulation.
| [in] | cameralabel | Label of camera to be used for simulation |
| [in] | sourcelabels | Vector of labels of source spectra to be used for simulation |
| [in] | bandlabels | Vector of labels of radiation bands to be used for simulation |
| [in] | cameraresponselabels | Vector of labels of camera spectral responses |
| [in] | wavelengthrange | Wavelength range of spectra |
| [in] | fluxscale | Scale factor for source flux |
| [in] | diffusefactor | Diffuse factor for diffuse radiation |
| [in] | scatteringdepth | Number of scattering events to simulate |
Definition at line 987 of file RadiationCamera.cpp.
| void RadiationModel::runRadiationImaging | ( | const std::vector< std::string > & | cameralabels, |
| const std::vector< std::string > & | sourcelabels, | ||
| const std::vector< std::string > & | bandlabels, | ||
| const std::vector< std::string > & | cameraresponselabels, | ||
| helios::vec2 | wavelengthrange, | ||
| float | fluxscale = 1, |
||
| float | diffusefactor = 0.0005, |
||
| uint | scatteringdepth = 4 |
||
| ) |
Run radiation imaging simulation.
| [in] | cameralabels | Vector of camera labels to be used for simulation |
| [in] | sourcelabels | Vector of labels of source spectra to be used for simulation |
| [in] | bandlabels | Vector of labels of radiation bands to be used for simulation |
| [in] | cameraresponselabels | Vector of labels of camera spectral responses |
| [in] | wavelengthrange | Wavelength range of spectra |
| [in] | fluxscale | Scale factor for source flux |
| [in] | diffusefactor | Diffuse factor for diffuse radiation |
| [in] | scatteringdepth | Number of scattering events to simulate |
Definition at line 1027 of file RadiationCamera.cpp.
| void RadiationModel::scaleSpectrum | ( | const std::string & | existing_global_data_label, |
| const std::string & | new_global_data_label, | ||
| float | scale_factor | ||
| ) | const |
Scale an entire spectrum by a constant factor. Creates new global data for scaled spectrum.
| [in] | existing_global_data_label | Label of global data containing spectral data (type of vec2). Each index of the global data gives the wavelength (.x) and spectral intensity/reflectivity/transmissivity (.y). |
| [in] | new_global_data_label | Label of new global data to be created containing scaled spectral data (type of vec2). |
| [in] | scale_factor | Scaling factor. |
Definition at line 1645 of file RadiationModel.cpp.
| void RadiationModel::scaleSpectrum | ( | const std::string & | global_data_label, |
| float | scale_factor | ||
| ) | const |
Scale an entire spectrum by a constant factor. Performs scaling in-place.
| [in] | global_data_label | Label of global data containing spectral data (type of vec2). Each index of the global data gives the wavelength (.x) and spectral intensity/reflectivity/transmissivity (.y). |
| [in] | scale_factor | Scaling factor. |
Definition at line 1656 of file RadiationModel.cpp.
| void RadiationModel::scaleSpectrumRandomly | ( | const std::string & | existing_global_data_label, |
| const std::string & | new_global_data_label, | ||
| float | minimum_scale_factor, | ||
| float | maximum_scale_factor | ||
| ) | const |
Scale an entire spectrum by a random factor following a uniform distribution.
| [in] | existing_global_data_label | Label of global data containing spectral data (type of vec2). Each index of the global data gives the wavelength (.x) and spectral intensity/reflectivity/transmissivity (.y). |
| [in] | new_global_data_label | Label of new global data to be created containing scaled spectral data (type of vec2). |
| [in] | minimum_scale_factor | Scaling factor minimum value in uniform distribution. |
| [in] | maximum_scale_factor | Scaling factor maximum value in uniform distribution. |
Definition at line 1667 of file RadiationModel.cpp.
|
static |
Self-test.
Definition at line 70 of file selfTest.cpp.
| void RadiationModel::setCameraCalibration | ( | CameraCalibration * | CameraCalibration | ) |
Definition at line 865 of file RadiationCamera.cpp.
| void RadiationModel::setCameraLensFlareProperties | ( | const std::string & | camera_label, |
| const LensFlareProperties & | properties | ||
| ) |
Set lens flare rendering properties for a camera.
| [in] | camera_label | Label for the camera to configure. |
| [in] | properties | LensFlareProperties struct containing the desired settings. |
Definition at line 4631 of file RadiationCamera.cpp.
| void RadiationModel::setCameraLookat | ( | const std::string & | camera_label, |
| const helios::vec3 & | lookat | ||
| ) |
Set the position the radiation camera is pointed toward (used to calculate camera orientation)
| [in] | camera_label | Label for the camera to be set. |
| [in] | lookat | Cartesian coordinate of location camera is pointed toward. |
Definition at line 393 of file RadiationCamera.cpp.
| void RadiationModel::setCameraMetadata | ( | const std::string & | camera_label, |
| const CameraMetadata & | metadata | ||
| ) |
Set metadata for a camera to be automatically written with images.
| [in] | camera_label | Label for the camera to set metadata for. |
| [in] | metadata | CameraMetadata struct containing metadata to be written with camera images. |
Definition at line 4469 of file RadiationCamera.cpp.
| void RadiationModel::setCameraOrientation | ( | const std::string & | camera_label, |
| const helios::SphericalCoord & | direction | ||
| ) |
Set the orientation of the radiation camera based on a spherical coordinate.
| [in] | camera_label | Label for the camera to be set. |
| [in] | direction | Spherical coordinate defining the orientation of the camera (elevation and azimuth angles in radians). |
Definition at line 435 of file RadiationCamera.cpp.
| void RadiationModel::setCameraOrientation | ( | const std::string & | camera_label, |
| const helios::vec3 & | direction | ||
| ) |
Set the orientation of the radiation camera based on a Cartesian vector.
| [in] | camera_label | Label for the camera to be set. |
| [in] | direction | Cartesian vector defining the orientation of the camera. |
Definition at line 414 of file RadiationCamera.cpp.
| void RadiationModel::setCameraPixelData | ( | const std::string & | camera_label, |
| const std::string & | band_label, | ||
| const std::vector< float > & | pixel_data | ||
| ) |
Set camera pixel data for a specific band.
Definition at line 5544 of file RadiationModel.cpp.
| void RadiationModel::setCameraPosition | ( | const std::string & | camera_label, |
| const helios::vec3 & | position | ||
| ) |
Set the position of the radiation camera.
| [in] | camera_label | Label for the camera to be set. |
| [in] | position | Cartesian coordinate of camera position. |
Definition at line 370 of file RadiationCamera.cpp.
| void RadiationModel::setCameraSpectralResponse | ( | const std::string & | camera_label, |
| const std::string & | band_label, | ||
| const std::string & | global_data | ||
| ) |
Set the spectral response of a camera band based on reference to global data. This function version uses all the global data array to calculate the spectral response.
| [in] | camera_label | Label for the camera to be set. |
| [in] | band_label | Label for the radiation band. |
| [in] | global_data | Label for global data containing camera spectral response data. This should be of type vec2 and contain wavelength-quantum efficiency pairs. |
Definition at line 97 of file RadiationCamera.cpp.
| void RadiationModel::setCameraSpectralResponseFromLibrary | ( | const std::string & | camera_label, |
| const std::string & | camera_library_name | ||
| ) |
Set the camera spectral response based on a camera available in the standard camera spectral library (radiation/spectral_data/camera_spectral_library.xml).
Consult the documentation for available cameras in the library, or examine the file radiation/spectral_data/camera_spectral_library.xml. The naming convention is that the response data for the band starts with the camera model (e.g., "iPhone11") followed by an underscore, then the band label. In order for the response to be applied to the camera, the bands must all exist. For example, for iPhone11, there must exist bands "red", "green", and "blue".
| [in] | camera_label | Label for the camera to be set. |
| [in] | camera_library_name | Name of the camera in the standard camera spectral library (e.g., "iPhone11", "NikonD700", etc.). |
Definition at line 109 of file RadiationCamera.cpp.
| void RadiationModel::setDiffuseRadiationExtinctionCoeff | ( | const std::string & | label, |
| float | K, | ||
| const helios::SphericalCoord & | peak_dir | ||
| ) |
Extinction coefficient of diffuse ambient radiation.
The angular distribution of diffuse ambient radiation is computed according to N = Psi^-K, where Psi is the angle between the distribution peak (usually the sun direction) and the ambient direction, and K is the extinction coefficient. When K=0 the ambient distribution is uniform, which is the default setting
| [in] | label | Label used to reference the radiative band |
| [in] | K | Extinction coefficient value |
| [in] | peak_dir | Spherical direction of the peak in diffuse radiation (elevation and azimuth angles in radians, this is usually the sun direction) |
Definition at line 196 of file RadiationModel.cpp.
| void RadiationModel::setDiffuseRadiationExtinctionCoeff | ( | const std::string & | label, |
| float | K, | ||
| const helios::vec3 & | peak_dir | ||
| ) |
Extinction coefficient of diffuse ambient radiation.
The angular distribution of diffuse ambient radiation is computed according to N = Psi^-K, where Psi is the angle between the distribution peak (usually the sun direction) and the ambient direction, and K is the extinction coefficient. When K=0 the ambient distribution is uniform, which is the default setting
| [in] | label | Label used to reference the radiative band |
| [in] | K | Extinction coefficient value |
| [in] | peak_dir | Unit vector pointing in the direction of the peak in diffuse radiation (this is usually the sun direction) |
Definition at line 200 of file RadiationModel.cpp.
| void RadiationModel::setDiffuseRadiationFlux | ( | const std::string & | label, |
| float | flux | ||
| ) |
Diffuse (ambient) radiation flux.
Diffuse component of radiation incident on a horizontal surface above all geometry in the domain.
| [in] | label | Label used to reference the band |
| [in] | flux | Radiative flux |
Definition at line 189 of file RadiationModel.cpp.
| void RadiationModel::setDiffuseRayCount | ( | const std::string & | label, |
| size_t | N | ||
| ) |
Sets variable diffuseRayCount, the number of rays to be used in diffuse (ambient) radiation model.
| [in] | label | Label used to reference the band |
| [in] | N | Number of rays |
Definition at line 182 of file RadiationModel.cpp.
| void RadiationModel::setDiffuseSpectrum | ( | const std::string & | spectrum_label | ) |
Set the spectral distribution of diffuse ambient radiation for all bands based on global data of wavelength-intensity pairs.
| [in] | spectrum_label | Label of global data containing spectral intensity data (type of vec2). Each index of the global data gives the wavelength (.x) and spectral intensity (.y). |
Definition at line 1302 of file RadiationModel.cpp.
| void RadiationModel::setDiffuseSpectrumIntegral | ( | const std::string & | band_label, |
| float | spectrum_integral | ||
| ) |
Set the integral of the diffuse spectral flux distribution across all possible wavelengths (=∫Sdλ)
| [in] | band_label | Label used to reference the band |
| [in] | spectrum_integral | Integration of source spectral flux distribution across all possible wavelengths (=∫Sdλ) |
Definition at line 284 of file RadiationModel.cpp.
| void RadiationModel::setDiffuseSpectrumIntegral | ( | const std::string & | band_label, |
| float | spectrum_integral, | ||
| float | wavelength_min, | ||
| float | wavelength_max | ||
| ) |
Scale the source spectral flux distribution based on a prescribed integral between two wavelengths (=∫Sdλ)
| [in] | band_label | Label used to reference the band |
| [in] | spectrum_integral | Integration of source spectral flux distribution between two wavelengths (=∫Sdλ) |
| [in] | wavelength_min | Lower bounding wavelength for wave band |
| [in] | wavelength_max | Upper bounding wavelength for wave band |
Definition at line 304 of file RadiationModel.cpp.
| void RadiationModel::setDiffuseSpectrumIntegral | ( | float | spectrum_integral | ) |
Scale the global diffuse spectrum so its integral equals the specified value (=∫Sdλ)
Scales the global diffuse spectrum (set via setDiffuseSpectrum()) so that its integral over all wavelengths equals the specified value. The scaled spectrum is applied to all existing radiation bands and will be inherited by any bands created subsequently. This should be called after setDiffuseSpectrum().
| [in] | spectrum_integral | Desired integration of spectral flux distribution across all wavelengths (=∫Sdλ) |
Definition at line 234 of file RadiationModel.cpp.
| void RadiationModel::setDiffuseSpectrumIntegral | ( | float | spectrum_integral, |
| float | wavelength_min, | ||
| float | wavelength_max | ||
| ) |
Scale the global diffuse spectrum based on a prescribed integral between two wavelengths (=∫Sdλ)
Scales the global diffuse spectrum (set via setDiffuseSpectrum()) so that its integral between the specified wavelengths equals the given value. The entire spectrum is scaled uniformly. The scaled spectrum is applied to all existing radiation bands and will be inherited by any bands created subsequently.
| [in] | spectrum_integral | Desired integration of spectral flux distribution between the specified wavelengths (=∫Sdλ) |
| [in] | wavelength_min | Lower bounding wavelength for integration range (nm) |
| [in] | wavelength_max | Upper bounding wavelength for integration range (nm) |
Definition at line 259 of file RadiationModel.cpp.
| void RadiationModel::setDirectRayCount | ( | const std::string & | label, |
| size_t | N | ||
| ) |
Sets variable directRayCount, the number of rays to be used in direct radiation model.
| [in] | label | Label used to reference the band |
| [in] | N | Number of rays |
Definition at line 175 of file RadiationModel.cpp.
| void RadiationModel::setMinScatterEnergy | ( | const std::string & | label, |
| uint | energy | ||
| ) |
Set the energy threshold used to terminate scattering iterations. Scattering iterations are terminated when the maximum to-be-scattered energy among all primitives is less than "energy".
| [in] | label | Label used to reference the band |
| [in] | energy | Energy threshold |
Definition at line 1927 of file RadiationModel.cpp.
| void RadiationModel::setPadValue | ( | const std::string & | cameralabel, |
| const std::vector< std::string > & | bandlabels, | ||
| const std::vector< float > & | padvalues | ||
| ) |
Set padding value for pixels do not have valid values.
| [in] | cameralabel | Label of target camera |
| [in] | bandlabels | Vector of labels of radiation bands to be used for simulation |
| [in] | padvalues | Vector of padding values for each band |
Definition at line 2907 of file RadiationCamera.cpp.
| void RadiationModel::setScatteringDepth | ( | const std::string & | label, |
| uint | depth | ||
| ) |
Set the number of scattering iterations for a certain band.
| [in] | label | Label used to reference the band |
| [in] | depth | Number of scattering iterations (depth=0 turns scattering off) |
Definition at line 1919 of file RadiationModel.cpp.
| void RadiationModel::setSourceFlux | ( | const std::vector< uint > & | source_ID, |
| const std::string & | band_label, | ||
| float | flux | ||
| ) |
Set the flux of multiple radiation sources for this band.
| [in] | source_ID | Vector of radiation source identifiers |
| [in] | band_label | Label used to reference the band |
| [in] | flux | Radiative flux normal to the direction of radiation propagation |
Definition at line 1217 of file RadiationModel.cpp.
| void RadiationModel::setSourceFlux | ( | uint | source_ID, |
| const std::string & | band_label, | ||
| float | flux | ||
| ) |
Set the flux of radiation source for this band.
| [in] | source_ID | Identifier of radiation source |
| [in] | band_label | Label used to reference the band |
| [in] | flux | Radiative flux normal to the direction of radiation propagation |
Definition at line 1204 of file RadiationModel.cpp.
| void RadiationModel::setSourcePosition | ( | uint | source_ID, |
| const helios::SphericalCoord & | position | ||
| ) |
Set the position/direction of radiation source based on a spherical vector.
| [in] | source_ID | Identifier of radiation source |
| [in] | position | If point source - (radius,elevation,azimuth) position of the radiation source (elevation and azimuth angles in radians). If collimated source - (elevation,azimuth) vector pointing toward the source (elevation and azimuth angles in radians, radius is ignored). |
Definition at line 1908 of file RadiationModel.cpp.
| void RadiationModel::setSourcePosition | ( | uint | source_ID, |
| const helios::vec3 & | position | ||
| ) |
Set the position/direction of radiation source based on a Cartesian vector.
| [in] | source_ID | Identifier of radiation source |
| [in] | position | If point source - (x,y,z) position of the radiation source. If collimated source - (nx,ny,nz) unit vector pointing toward the source. |
Definition at line 1889 of file RadiationModel.cpp.
| void RadiationModel::setSourceSpectrum | ( | const std::vector< uint > & | source_ID, |
| const std::string & | spectrum_label | ||
| ) |
Set the spectral distribution of multiple radiation sources based on global data of wavelength-intensity pairs.
| [in] | source_ID | Vector of radiation source identifiers. |
| [in] | spectrum_label | Label of global data containing spectral intensity data (type of vec2). Each index of the global data gives the wavelength (.x) and spectral intensity (.y). |
Definition at line 1296 of file RadiationModel.cpp.
| void RadiationModel::setSourceSpectrum | ( | const std::vector< uint > & | source_ID, |
| const std::vector< helios::vec2 > & | spectrum | ||
| ) |
Set the spectral distribution of multiple radiation sources according to a vector of wavelength-intensity pairs.
| [in] | source_ID | Vector of radiation source identifiers. |
| [in] | spectrum | Vector containing spectral intensity data. Each index of "spectrum" gives the wavelength (.x) and spectral intensity (.y). |
Definition at line 1275 of file RadiationModel.cpp.
| void RadiationModel::setSourceSpectrum | ( | uint | source_ID, |
| const std::string & | spectrum_label | ||
| ) |
Set the spectral distribution of a radiation source based on global data of wavelength-intensity pairs.
| [in] | source_ID | Identifier of radiation source. |
| [in] | spectrum_label | Label of global data containing spectral intensity data (type of vec2). Each index of the global data gives the wavelength (.x) and spectral intensity (.y). |
Definition at line 1281 of file RadiationModel.cpp.
| void RadiationModel::setSourceSpectrum | ( | uint | source_ID, |
| const std::vector< helios::vec2 > & | spectrum | ||
| ) |
Set the spectral distribution of a radiation source according to a vector of wavelength-intensity pairs.
| [in] | source_ID | Identifier of radiation source. |
| [in] | spectrum | Vector containing spectral intensity data. Each index of "spectrum" gives the wavelength (.x) and spectral intensity (.y). |
Definition at line 1248 of file RadiationModel.cpp.
| void RadiationModel::setSourceSpectrumIntegral | ( | uint | source_ID, |
| float | source_integral | ||
| ) |
Set the integral of the source spectral flux distribution across all possible wavelengths (=∫Sdλ)
| [in] | source_ID | ID of source |
| [in] | source_integral | Integration of source spectral flux distribution across all possible wavelengths (=∫Sdλ) |
Definition at line 1169 of file RadiationModel.cpp.
| void RadiationModel::setSourceSpectrumIntegral | ( | uint | source_ID, |
| float | source_integral, | ||
| float | wavelength_min, | ||
| float | wavelength_max | ||
| ) |
Scale the source spectral flux distribution based on a prescribed integral between two wavelengths (=∫Sdλ)
| [in] | source_ID | ID of source |
| [in] | source_integral | Integration of source spectral flux distribution between two wavelengths (=∫Sdλ) |
| [in] | wavelength_min | Lower bounding wavelength for wave band |
| [in] | wavelength_max | Upper bounding wavelength for wave band |
Definition at line 1184 of file RadiationModel.cpp.
| void RadiationModel::updateCameraParameters | ( | const std::string & | camera_label, |
| const CameraProperties & | camera_properties | ||
| ) |
Update intrinsic parameters of an existing radiation camera.
This method updates the intrinsic optical and geometric parameters of an existing camera. The camera position, lookat direction, and spectral bands are preserved. All fields in CameraProperties can be updated including resolution, HFOV, lens diameter, focal plane distance, sensor width, and model name. If resolution changes, pixel buffers will be reallocated on the next call to runRadiationImaging().
| [in] | camera_label | Label identifying the camera to update. Camera must already exist. |
| [in] | camera_properties | CameraProperties struct containing the new intrinsic parameters. |
Definition at line 478 of file RadiationCamera.cpp.
| void RadiationModel::updateCameraResponse | ( | const std::string & | orginalcameralabel, |
| const std::vector< std::string > & | sourcelabels_raw, | ||
| const std::vector< std::string > & | cameraresponselabels, | ||
| helios::vec2 & | wavelengthrange, | ||
| const std::vector< std::vector< float > > & | truevalues, | ||
| const std::string & | calibratedmark | ||
| ) |
Update the camera response for a given camera based on color board.
| [in] | orginalcameralabel | Label of camera to be used for simulation |
| [in] | sourcelabels_raw | Vector of labels of source spectra to be used for simulation |
| [in] | cameraresponselabels | Vector of labels of camera spectral responses |
| [in] | wavelengthrange | Wavelength range of the camera |
| [in] | truevalues | True image values of the color board |
| [in] | calibratedmark | Mark of the calibrated camera |
Definition at line 870 of file RadiationCamera.cpp.
| void RadiationModel::updateGeometry | ( | ) |
Adds all geometric primitives from the Context to OptiX.
This function should be called anytime Context geometry is created or modified
Definition at line 1956 of file RadiationModel.cpp.
| void RadiationModel::updateGeometry | ( | const std::vector< uint > & | UUIDs | ) |
Adds certain geometric primitives from the Context to OptiX as specified by a list of UUIDs.
This function should be called anytime Context geometry is created or modified
| [in] | UUIDs | Vector of universal unique identifiers of Context primitives to be updated |
Definition at line 1961 of file RadiationModel.cpp.
| std::string RadiationModel::writeCameraImage | ( | const std::string & | camera, |
| const std::vector< std::string > & | bands, | ||
| const std::string & | imagefile_base, | ||
| const std::string & | image_path = "./", |
||
| int | frame = -1, |
||
| float | flux_to_pixel_conversion = 1.f |
||
| ) |
Write camera data for one or more bands to a JPEG image.
| [in] | camera | Label for camera to be queried |
| [in] | bands | Vector of labels for radiative bands to be written |
| [in] | imagefile_base | Name for base of output image JPEG files (will also include the camera label and a frame number in the file name) |
| [in] | image_path | [optional] Path to directory where images should be saved. By default, it will be placed in the current working directory. |
| [in] | frame | [optional] A frame count number to be appended to the output image file (e.g., camera_thermal_00001.jpeg). By default, the frame count will be omitted from the file name. This value must be less than or equal to 99,999. |
| [in] | flux_to_pixel_conversion | [optional] A factor to convert radiative flux to 8-bit pixel values (0-255). By default, this value is 1.0, which means that the pixel values will be equal to the radiative flux. If the radiative flux is very large or very small, it may be necessary to scale the flux to a more appropriate range for the image. |
Definition at line 532 of file RadiationCamera.cpp.
| void RadiationModel::writeCameraImageData | ( | const std::string & | camera, |
| const std::string & | band, | ||
| const std::string & | imagefile_base, | ||
| const std::string & | image_path = "./", |
||
| int | frame = -1 |
||
| ) |
Write camera data for one band to an ASCII text file.
| [in] | camera | Label for camera to be queried |
| [in] | band | Label for radiative band to be written |
| [in] | imagefile_base | Name for base of output image JPEG files (will also include the camera label and a frame number in the file name) |
| [in] | image_path | [optional] Path to directory where images should be saved. By default, it will be placed in the current working directory. |
| [in] | frame | [optional] A frame count number to be appended to the output image file (e.g., camera_thermal_00001.jpeg). By default, the frame count will be omitted from the file name. This value must be less than or equal to 99,999. |
Definition at line 692 of file RadiationCamera.cpp.
| void RadiationModel::writeCameraImageDataEXR | ( | const std::string & | camera, |
| const std::string & | band, | ||
| const std::string & | imagefile_base, | ||
| const std::string & | image_path = "./", |
||
| int | frame = -1 |
||
| ) |
Write camera pixel data to an EXR file with lossless float compression.
| [in] | camera | Label for camera to be queried |
| [in] | band | Label for radiative band to be written |
| [in] | imagefile_base | Name for base of output image files (will also include the camera label and a frame number in the file name) |
| [in] | image_path | [optional] Path to directory where images should be saved. By default, it will be placed in the current working directory. |
| [in] | frame | [optional] A frame count number to be appended to the output image file (e.g., camera_thermal_00001.exr). By default, the frame count will be omitted from the file name. This value must be less than or equal to 99,999. |
Definition at line 757 of file RadiationCamera.cpp.
| void RadiationModel::writeCameraImageDataEXR | ( | const std::string & | camera, |
| const std::vector< std::string > & | bands, | ||
| const std::string & | imagefile_base, | ||
| const std::string & | image_path = "./", |
||
| int | frame = -1 |
||
| ) |
Write multi-band camera pixel data to a single EXR file with lossless float compression.
| [in] | camera | Label for camera to be queried |
| [in] | bands | Labels for radiative bands to be written as separate channels in the EXR file |
| [in] | imagefile_base | Name for base of output image files (will also include the camera label and a frame number in the file name) |
| [in] | image_path | [optional] Path to directory where images should be saved. By default, it will be placed in the current working directory. |
| [in] | frame | [optional] A frame count number to be appended to the output image file (e.g., camera_thermal_00001.exr). By default, the frame count will be omitted from the file name. This value must be less than or equal to 99,999. |
Definition at line 805 of file RadiationCamera.cpp.
| void RadiationModel::writeDepthImageData | ( | const std::string & | cameralabel, |
| const std::string & | imagefile_base, | ||
| const std::string & | image_path = "./", |
||
| int | frame = -1 |
||
| ) |
Write depth image data to text file.
| [in] | cameralabel | Label of target camera |
| [in] | imagefile_base | Name for base of output image JPEG files (will also include the camera label and a frame number in the file name) |
| [in] | image_path | [optional] Path to directory where images should be saved. By default, it will be placed in the current working directory. |
| [in] | frame | [optional] A frame count number to be appended to the output image file (e.g., camera_depth_00001.txt). By default, the frame count will be omitted from the file name. This value must be less than or equal to 99,999. |
Definition at line 1276 of file RadiationCamera.cpp.
| void RadiationModel::writeDepthImageDataEXR | ( | const std::string & | cameralabel, |
| const std::string & | imagefile_base, | ||
| const std::string & | image_path = "./", |
||
| int | frame = -1 |
||
| ) |
Write depth image data to an EXR file with lossless float compression.
| [in] | cameralabel | Label of target camera |
| [in] | imagefile_base | Name for base of output image files (will also include the camera label and a frame number in the file name) |
| [in] | image_path | [optional] Path to directory where images should be saved. By default, it will be placed in the current working directory. |
| [in] | frame | [optional] A frame count number to be appended to the output image file (e.g., camera_depth_00001.exr). By default, the frame count will be omitted from the file name. This value must be less than or equal to 99,999. |
Definition at line 1331 of file RadiationCamera.cpp.
| void RadiationModel::writeImageBoundingBoxes | ( | const std::string & | cameralabel, |
| const std::string & | primitive_data_label, | ||
| const uint & | object_class_ID, | ||
| const std::string & | image_file, | ||
| const std::string & | classes_txt_file = "classes.txt", |
||
| const std::string & | image_path = "./" |
||
| ) |
Write bounding boxes based on primitive data labels (Ultralytic's YOLO format). Primitive data must have type of 'uint' or 'int'.
| [in] | cameralabel | Label of target camera |
| [in] | primitive_data_label | Name of the primitive data label. Primitive data must have type of 'uint' or 'int'. |
| [in] | object_class_ID | Object class ID to write for the labels in this group. |
| [in] | image_file | Name for base of output files (will also include the camera label and a frame number in the file name) |
| [in] | classes_txt_file | [optional] Name of text file to write class names. By default, it is "classes.txt". |
| [in] | image_path | [optional] Path to directory where images should be saved. By default, it will be placed in the current working directory. |
Definition at line 1659 of file RadiationCamera.cpp.
| void RadiationModel::writeImageBoundingBoxes | ( | const std::string & | cameralabel, |
| const std::string & | primitive_data_label, | ||
| uint | object_class_ID, | ||
| const std::string & | imagefile_base, | ||
| const std::string & | image_path = "./", |
||
| bool | append_label_file = false, |
||
| int | frame = -1 |
||
| ) |
Write bounding boxes based on primitive data labels (Ultralytic's YOLO format). Primitive data must have type of 'uint' or 'int'.
| [in] | cameralabel | Label of target camera |
| [in] | primitive_data_label | Name of the primitive data label. Primitive data must have type of 'uint' or 'int'. |
| [in] | object_class_ID | Object class ID to write for the labels in this group. |
| [in] | imagefile_base | Name for base of output files (will also include the camera label and a frame number in the file name) |
| [in] | image_path | [optional] Path to directory where images should be saved. By default, it will be placed in the current working directory. |
| [in] | append_label_file | [optional] If true, the label file will be appended to the existing file. If false, the label file will be overwritten. By default, it is false. |
| [in] | frame | [optional] A frame count number to be appended to the output file (e.g., camera_thermal_00001.txt). By default, the frame count will be omitted from the file name. This value must be less than or equal to 99,999. |
Definition at line 1443 of file RadiationCamera.cpp.
| void RadiationModel::writeImageBoundingBoxes | ( | const std::string & | cameralabel, |
| const std::vector< std::string > & | primitive_data_label, | ||
| const std::vector< uint > & | object_class_ID, | ||
| const std::string & | image_file, | ||
| const std::string & | classes_txt_file = "classes.txt", |
||
| const std::string & | image_path = "./" |
||
| ) |
Write bounding boxes based on primitive data labels (Ultralytic's YOLO format). Primitive data must have type of 'uint' or 'int'.
| [in] | cameralabel | Label of target camera |
| [in] | primitive_data_label | Name of the primitive data label. Primitive data must have type of 'uint' or 'int'. |
| [in] | object_class_ID | Object class ID to write for the labels in this group. |
| [in] | image_file | Name for base of output files (will also include the camera label and a frame number in the file name) |
| [in] | classes_txt_file | [optional] Name of text file to write class names. By default, it is "classes.txt". |
| [in] | image_path | [optional] Path to directory where images should be saved. By default, it will be placed in the current working directory. |
Definition at line 1663 of file RadiationCamera.cpp.
| void RadiationModel::writeImageBoundingBoxes_ObjectData | ( | const std::string & | cameralabel, |
| const std::string & | object_data_label, | ||
| const uint & | object_class_ID, | ||
| const std::string & | image_file, | ||
| const std::string & | classes_txt_file = "classes.txt", |
||
| const std::string & | image_path = "./" |
||
| ) |
Write bounding boxes based on object data labels (Ultralytic's YOLO format). Object data must have type of 'uint' or 'int'.
| [in] | cameralabel | Label of target camera |
| [in] | object_data_label | Name of the object data label. Object data must have type of 'uint' or 'int'. |
| [in] | object_class_ID | Object class ID to write for the labels in this group. |
| [in] | image_file | Name for base of output files (will also include the camera label and a frame number in the file name) |
| [in] | image_path | [optional] Path to directory where images should be saved. By default, it will be placed in the current working directory. |
| [in] | classes_txt_file | [optional] Name of text file to write class names. By default, it is "classes.txt". |
Definition at line 1779 of file RadiationCamera.cpp.
| void RadiationModel::writeImageBoundingBoxes_ObjectData | ( | const std::string & | cameralabel, |
| const std::string & | object_data_label, | ||
| uint | object_class_ID, | ||
| const std::string & | imagefile_base, | ||
| const std::string & | image_path = "./", |
||
| bool | append_label_file = false, |
||
| int | frame = -1 |
||
| ) |
Write bounding boxes based on object data labels (Ultralytic's YOLO format). Object data must have type of 'uint' or 'int'.
| [in] | cameralabel | Label of target camera |
| [in] | object_data_label | Name of the object data label. Object data must have type of 'uint' or 'int'. |
| [in] | object_class_ID | Object class ID to write for the labels in this group. |
| [in] | imagefile_base | Name for base of output files (will also include the camera label and a frame number in the file name) |
| [in] | image_path | [optional] Path to directory where images should be saved. By default, it will be placed in the current working directory. |
| [in] | append_label_file | [optional] If true, the label file will be appended to the existing file. If false, the label file will be overwritten. By default, it is false. |
| [in] | frame | [optional] A frame count number to be appended to the output file (e.g., camera_thermal_00001.txt). By default, the frame count will be omitted from the file name. This value must be less than or equal to 99,999. |
Definition at line 1547 of file RadiationCamera.cpp.
| void RadiationModel::writeImageBoundingBoxes_ObjectData | ( | const std::string & | cameralabel, |
| const std::vector< std::string > & | object_data_label, | ||
| const std::vector< uint > & | object_class_ID, | ||
| const std::string & | image_file, | ||
| const std::string & | classes_txt_file = "classes.txt", |
||
| const std::string & | image_path = "./" |
||
| ) |
Write bounding boxes based on object data labels (Ultralytic's YOLO format). Object data must have type of 'uint' or 'int'.
| [in] | cameralabel | Label of target camera |
| [in] | object_data_label | Name of the object data label. Object data must have type of 'uint' or 'int'. |
| [in] | object_class_ID | Object class ID to write for the labels in this group. |
| [in] | image_file | Name for base of output files (will also include the camera label and a frame number in the file name) |
| [in] | image_path | [optional] Path to directory where images should be saved. By default, it will be placed in the current working directory. |
| [in] | classes_txt_file | [optional] Name of text file to write class names. By default, it is "classes.txt". |
Definition at line 1784 of file RadiationCamera.cpp.
| void RadiationModel::writeImageSegmentationMasks | ( | const std::string & | cameralabel, |
| const std::string & | primitive_data_label, | ||
| const uint & | object_class_ID, | ||
| const std::string & | json_filename, | ||
| const std::string & | image_file, | ||
| const std::vector< std::string > & | data_attribute_labels = {}, |
||
| bool | append_file = false |
||
| ) |
Write segmentation masks for primitive data in COCO JSON format. Primitive data must have type of 'uint' or 'int'.
| [in] | cameralabel | Label of target camera |
| [in] | primitive_data_label | Name of the primitive data label. Object data must have type of 'uint' or 'int'. |
| [in] | object_class_ID | Object class ID to write for the labels in this group. |
| [in] | json_filename | Name of the output JSON file. Can include a relative path. If no extension is provided, ".json" will be added. |
| [in] | image_file | Name of the image file corresponding to these labels |
| [in] | data_attribute_labels | [optional] Vector of primitive or object data labels to calculate mean values within each mask and write as attributes. If empty or data doesn't exist, no attributes are added. By default, it is an empty vector. |
| [in] | append_file | [optional] If true, the data will be appended to the existing COCO JSON file. If false, a new file will be created. By default, it is false. |
Definition at line 2318 of file RadiationCamera.cpp.
| void RadiationModel::writeImageSegmentationMasks | ( | const std::string & | cameralabel, |
| const std::vector< std::string > & | primitive_data_label, | ||
| const std::vector< uint > & | object_class_ID, | ||
| const std::string & | json_filename, | ||
| const std::string & | image_file, | ||
| const std::vector< std::string > & | data_attribute_labels = {}, |
||
| bool | append_file = false |
||
| ) |
Write segmentation masks for primitive data in COCO JSON format. Primitive data must have type of 'uint' or 'int'.
| [in] | cameralabel | Label of target camera |
| [in] | primitive_data_label | Name of the primitive data label. Object data must have type of 'uint' or 'int'. |
| [in] | object_class_ID | Object class ID to write for the labels in this group. |
| [in] | json_filename | Name of the output JSON file. Can include a relative path. If no extension is provided, ".json" will be added. |
| [in] | image_file | Name of the image file corresponding to these labels |
| [in] | data_attribute_labels | [optional] Vector of primitive or object data labels to calculate mean values within each mask and write as attributes. If empty or data doesn't exist, no attributes are added. By default, it is an empty vector. |
| [in] | append_file | [optional] If true, the data will be appended to the existing COCO JSON file. If false, a new file will be created. By default, it is false. |
Definition at line 2323 of file RadiationCamera.cpp.
| void RadiationModel::writeImageSegmentationMasks_ObjectData | ( | const std::string & | cameralabel, |
| const std::string & | object_data_label, | ||
| const uint & | object_class_ID, | ||
| const std::string & | json_filename, | ||
| const std::string & | image_file, | ||
| const std::vector< std::string > & | data_attribute_labels = {}, |
||
| bool | append_file = false |
||
| ) |
Write segmentation masks for object data in COCO JSON format. Object data must have type of 'uint' or 'int'.
| [in] | cameralabel | Label of target camera |
| [in] | object_data_label | Name of the object data label. Object data must have type of 'uint' or 'int'. |
| [in] | object_class_ID | Object class ID to write for the labels in this group. |
| [in] | json_filename | Name of the output JSON file. Can include a relative path. If no extension is provided, ".json" will be added. |
| [in] | image_file | Name of the image file corresponding to these labels |
| [in] | data_attribute_labels | [optional] Vector of primitive or object data labels to calculate mean values within each mask and write as attributes. If empty or data doesn't exist, no attributes are added. By default, it is an empty vector. |
| [in] | append_file | [optional] If true, the data will be appended to the existing COCO JSON file. If false, a new file will be created. By default, it is false. |
Definition at line 2579 of file RadiationCamera.cpp.
| void RadiationModel::writeImageSegmentationMasks_ObjectData | ( | const std::string & | cameralabel, |
| const std::vector< std::string > & | object_data_label, | ||
| const std::vector< uint > & | object_class_ID, | ||
| const std::string & | json_filename, | ||
| const std::string & | image_file, | ||
| const std::vector< std::string > & | data_attribute_labels = {}, |
||
| bool | append_file = false |
||
| ) |
Write segmentation masks for object data in COCO JSON format. Object data must have type of 'uint' or 'int'.
| [in] | cameralabel | Label of target camera |
| [in] | object_data_label | Name of the object data label. Object data must have type of 'uint' or 'int'. |
| [in] | object_class_ID | Object class ID to write for the labels in this group. |
| [in] | json_filename | Name of the output JSON file. Can include a relative path. If no extension is provided, ".json" will be added. |
| [in] | image_file | Name of the image file corresponding to these labels |
| [in] | data_attribute_labels | [optional] Vector of primitive or object data labels to calculate mean values within each mask and write as attributes. If empty or data doesn't exist, no attributes are added. By default, it is an empty vector. |
| [in] | append_file | [optional] If true, the data will be appended to the existing COCO JSON file. If false, a new file will be created. By default, it is false. |
Definition at line 2584 of file RadiationCamera.cpp.
| std::string RadiationModel::writeNormCameraImage | ( | const std::string & | camera, |
| const std::vector< std::string > & | bands, | ||
| const std::string & | imagefile_base, | ||
| const std::string & | image_path = "./", |
||
| int | frame = -1 |
||
| ) |
Write normalized camera data (maximum value is 1) for one or more bands to a JPEG image.
| [in] | camera | Label for camera to be queried |
| [in] | bands | Vector of labels for radiative bands to be written |
| [in] | imagefile_base | Name for base of output image JPEG files (will also include the camera label and a frame number in the file name) |
| [in] | image_path | Path to directory where images should be saved |
| [in] | frame | [optional] A frame count number to be appended to the output image file (e.g., camera_thermal_00001.jpeg). By default, the frame count will be omitted from the file name. This value must be less than or equal to 99,999. |
Definition at line 658 of file RadiationCamera.cpp.
| void RadiationModel::writeNormDepthImage | ( | const std::string & | cameralabel, |
| const std::string & | imagefile_base, | ||
| float | max_depth, | ||
| const std::string & | image_path = "./", |
||
| int | frame = -1 |
||
| ) |
Write depth image file, with grayscale normalized to the minimum and maximum depth values.
| [in] | cameralabel | Label of target camera |
| [in] | imagefile_base | Name for base of output image JPEG files (will also include the camera label and a frame number in the file name) |
| [in] | max_depth | Maximum depth value for normalization (e.g., the depth of the sky) |
| [in] | image_path | [optional] Path to directory where images should be saved. By default, it will be placed in the current working directory. |
| [in] | frame | [optional] A frame count number to be appended to the output image file (e.g., camera_depth_00001.txt). By default, the frame count will be omitted from the file name. This value must be less than or equal to 99,999. |
Definition at line 1373 of file RadiationCamera.cpp.
| void RadiationModel::writeObjectDataLabelMap | ( | const std::string & | cameralabel, |
| const std::string & | object_data_label, | ||
| const std::string & | imagefile_base, | ||
| const std::string & | image_path = "./", |
||
| int | frame = -1, |
||
| float | padvalue = NAN |
||
| ) |
Write image pixel labels to text file based on object data. Object data must have type 'float', 'double', 'uint', or 'int'.
| [in] | cameralabel | Label of target camera |
| [in] | object_data_label | Name of the object data label |
| [in] | imagefile_base | Name for base of output image JPEG files (will also include the camera label and a frame number in the file name) |
| [in] | image_path | [optional] Path to directory where images should be saved. By default, it will be placed in the current working directory. |
| [in] | frame | [optional] A frame count number to be appended to the output file (e.g., camera_thermal_00001.txt). By default, the frame count will be omitted from the file name. This value must be less than or equal to 99,999. |
| [in] | padvalue | Pad value for the empty pixels |
Definition at line 1183 of file RadiationCamera.cpp.
| void RadiationModel::writePrimitiveDataLabelMap | ( | const std::string & | cameralabel, |
| const std::string & | primitive_data_label, | ||
| const std::string & | imagefile_base, | ||
| const std::string & | image_path = "./", |
||
| int | frame = -1, |
||
| float | padvalue = NAN |
||
| ) |
Write image pixel labels to text file based on primitive data. Primitive data must have type 'float', 'double', 'uint', or 'int'.
| [in] | cameralabel | Label of target camera |
| [in] | primitive_data_label | Name of the primitive data label |
| [in] | imagefile_base | Name for base of output image JPEG files (will also include the camera label and a frame number in the file name) |
| [in] | image_path | [optional] Path to directory where images should be saved. By default, it will be placed in the current working directory. |
| [in] | frame | [optional] A frame count number to be appended to the output file (e.g., camera_thermal_00001.txt). By default, the frame count will be omitted from the file name. This value must be less than or equal to 99,999. |
| [in] | padvalue | Pad value for the empty pixels |
Definition at line 1095 of file RadiationCamera.cpp.