Struct riscan_pro::Project
[−]
[src]
pub struct Project { pub path: PathBuf, pub camera_calibrations: HashMap<String, CameraCalibration>, pub mount_calibrations: HashMap<String, MountCalibration>, pub scan_positions: HashMap<String, ScanPosition>, pub pop: Projective3<f64>, }
A RiSCAN Pro project.
These are always created by pointing at a path, either the .RiSCAN
path or the project.rsp
in that directory:
use riscan_pro::Project; let project1 = Project::from_path("data/project.RiSCAN").unwrap(); let project2 = Project::from_path("data/project.RiSCAN/project.rsp").unwrap(); assert_eq!(project1, project2);
Fields
path: PathBuf
The path to the project rsp file.
camera_calibrations: HashMap<String, CameraCalibration>
The camera calibrations, by name.
mount_calibrations: HashMap<String, MountCalibration>
The camera mount calibrations, by name.
scan_positions: HashMap<String, ScanPosition>
The scan positions, by name.
pop: Projective3<f64>
The project's own position.
Methods
impl Project
[src]
fn from_path<P: AsRef<Path>>(path: P) -> Result<Project>
[src]
Creates a project from a filesystem path.
This path can be either the .RiSCAN
directory or the contained project.rsp
.
Examples
use riscan_pro::Project; let project = Project::from_path("data/project.RiSCAN").unwrap();
fn scan_position_from_path<P: AsRef<Path>>(
&self,
path: P
) -> Result<&ScanPosition>
[src]
&self,
path: P
) -> Result<&ScanPosition>
Returns a scan position, as determined by the path.
Examples
use riscan_pro::Project; let project = Project::from_path("data/project.RiSCAN").unwrap(); let scan_position1 = project.scan_positions.get("SP01").unwrap(); let path = "data/project.RiSCAN/SCANS/SP01/SCANPOSIMAGES/SP01 - Image001.csv"; let scan_position2 = project.scan_position_from_path(path).unwrap(); assert_eq!(scan_position1, scan_position2);
Trait Implementations
impl Clone for Project
[src]
fn clone(&self) -> Project
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more