Skip to content

Commit

Permalink
cutesy import changes..
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenThornquist committed Jul 2, 2024
1 parent 2ca5fea commit bac9060
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 53 deletions.
42 changes: 22 additions & 20 deletions src/data/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,30 @@ mod intensity;
mod flim;
mod utils;

pub (crate) use intensity::siff::SiffFrame;

pub (crate) use intensity::siff::load_array as load_array_intensity;
pub (crate) use intensity::siff::load_array_registered as load_array_intensity_registered;
pub (crate) use intensity::siff::sum_mask as sum_intensity_mask;
pub (crate) use intensity::siff::sum_mask_registered as sum_intensity_mask_registered;
pub (crate) use intensity::siff::sum_masks as sum_intensity_masks;
pub (crate) use intensity::siff::sum_masks_registered as sum_intensity_masks_registered;

pub (crate) use flim::histogram::load_histogram as load_histogram;
pub (crate) use flim::histogram::load_histogram_mask as load_histogram_mask;
pub (crate) use flim::histogram::load_histogram_mask_registered as load_histogram_mask_registered;
pub (crate) use flim::empirical_lifetime::load_flim_empirical_and_intensity_arrays
pub mod load {
pub (crate) use super::intensity::siff::SiffFrame;

pub (crate) use super::intensity::siff::load_array as load_array_intensity;
pub (crate) use super::intensity::siff::load_array_registered as load_array_intensity_registered;
pub (crate) use super::intensity::siff::sum_mask as sum_intensity_mask;
pub (crate) use super::intensity::siff::sum_mask_registered as sum_intensity_mask_registered;
pub (crate) use super::intensity::siff::sum_masks as sum_intensity_masks;
pub (crate) use super::intensity::siff::sum_masks_registered as sum_intensity_masks_registered;

pub (crate) use super::flim::histogram::load_histogram as load_histogram;
pub (crate) use super::flim::histogram::load_histogram_mask as load_histogram_mask;
pub (crate) use super::flim::histogram::load_histogram_mask_registered as load_histogram_mask_registered;
pub (crate) use super::flim::empirical_lifetime::load_flim_empirical_and_intensity_arrays
as load_flim_empirical_and_intensity_arrays;
pub (crate) use flim::empirical_lifetime::load_flim_empirical_and_intensity_arrays_registered
pub (crate) use super::flim::empirical_lifetime::load_flim_empirical_and_intensity_arrays_registered
as load_flim_empirical_and_intensity_arrays_registered;
pub (crate) use flim::empirical_lifetime::sum_lifetime_intensity_mask;
pub (crate) use flim::empirical_lifetime::sum_lifetime_intensity_mask_registered;
pub (crate) use flim::empirical_lifetime::sum_lifetime_intensity_masks;
pub (crate) use flim::empirical_lifetime::sum_lifetime_intensity_masks_registered;
pub (crate) use flim::load_array_tau_d;
pub (crate) use flim::load_array_tau_d_registered;
pub (crate) use super::flim::empirical_lifetime::sum_lifetime_intensity_mask;
pub (crate) use super::flim::empirical_lifetime::sum_lifetime_intensity_mask_registered;
pub (crate) use super::flim::empirical_lifetime::sum_lifetime_intensity_masks;
pub (crate) use super::flim::empirical_lifetime::sum_lifetime_intensity_masks_registered;
pub (crate) use super::flim::load_array_tau_d;
pub (crate) use super::flim::load_array_tau_d_registered;
}

pub (crate) use dimensions::{Dimensions, DimensionsError, roll};

Expand Down
2 changes: 1 addition & 1 deletion src/data/image/flim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use crate::{
tiff::{Tag, TiffTagID::{Siff, StripByteCounts, StripOffsets}, IFD}, CorrosiffError,
};

use super::load_array_intensity;
use super::load::load_array_intensity;

#[binrw::parser(reader)]
fn _load_tau_d_raw<T : Into<u64>>(
Expand Down
10 changes: 10 additions & 0 deletions src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,16 @@ pub fn get_epoch_timestamps_both<I : IFD, ReaderT : Read + Seek>(
Ok(vec_out)
}

pub mod getters{
pub use super::{
get_experiment_timestamps,
get_epoch_timestamps_laser,
get_epoch_timestamps_system,
get_appended_text,
get_epoch_timestamps_both,
};
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down
35 changes: 3 additions & 32 deletions src/siffreader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ use std::{
collections::HashMap,
fmt::Display,
fs::File,
io::Result as IOResult,
io::Write,
io::Seek,
path::{Path, PathBuf}
};

use binrw::BinWrite;
use binrw::io::BufReader;
use itertools::izip;
use ndarray::prelude::*;
Expand All @@ -22,10 +20,7 @@ use rayon::prelude::*;
// these deeper in the module?
use crate::{
TiffMode,
utils::{
parallelize_op,
FramesError,
},
utils::{parallelize_op,FramesError,},
CorrosiffError,
tiff::{
FileFormat,
Expand All @@ -34,35 +29,11 @@ use crate::{
dimensions_consistent,
},
data::image::{
SiffFrame,
load_array_intensity,
load_array_intensity_registered,
load_array_tau_d,
load_array_tau_d_registered,
sum_intensity_mask,
sum_intensity_mask_registered,
sum_intensity_masks,
sum_intensity_masks_registered,
load_flim_empirical_and_intensity_arrays,
load_flim_empirical_and_intensity_arrays_registered,
sum_lifetime_intensity_mask,
sum_lifetime_intensity_mask_registered,
sum_lifetime_intensity_masks,
sum_lifetime_intensity_masks_registered,
load_histogram,
load_histogram_mask,
load_histogram_mask_registered,
load::*,
DimensionsError,
Dimensions,
},
metadata::{
FrameMetadata,
get_experiment_timestamps,
get_epoch_timestamps_laser,
get_epoch_timestamps_system,
get_epoch_timestamps_both,
get_appended_text,
}
metadata::{FrameMetadata,getters::*,},
};

pub type RegistrationDict = HashMap<u64, (i32, i32)>;
Expand Down

0 comments on commit bac9060

Please sign in to comment.