pub struct ResolutionLevel {
pub level: u32,
pub size_x: u32,
pub size_y: u32,
pub downsample_x: f64,
pub downsample_y: f64,
pub tile_width: Option<u32>,
pub tile_height: Option<u32>,
pub size_z: Option<u32>,
}Expand description
Geometry of one resolution level of an image.
Fields§
§level: u32Level index: 0 is full resolution, larger is more downsampled (--level).
size_x: u32Width in pixels.
size_y: u32Height in pixels.
downsample_x: f64Level-0 width over this level’s width (1 for level 0; 2, 4, … for a halving pyramid).
downsample_y: f64Level-0 height over this level’s height.
tile_width: Option<u32>Width of the tiles (subblocks, chunks) the level is stored in, when it is tiled: region reads aligned to this grid decode each tile once.
tile_height: Option<u32>Height of the stored tiles.
size_z: Option<u32>Number of z planes at this level, when it differs from the image’s size_z (Imaris
downsamples z as well).
Implementations§
Source§impl ResolutionLevel
impl ResolutionLevel
Sourcepub fn new(
level: u32,
size_x: u32,
size_y: u32,
base_x: u32,
base_y: u32,
) -> Self
pub fn new( level: u32, size_x: u32, size_y: u32, base_x: u32, base_y: u32, ) -> Self
Level level of size_x × size_y pixels in an image whose level 0 is
base_x × base_y; downsampling factors are the size ratios, snapped to the power of
two 2^k when the level is level 0 halved k times (rounding either way: within one
pixel of base / 2^k).
Trait Implementations§
Source§impl Clone for ResolutionLevel
impl Clone for ResolutionLevel
Source§impl Debug for ResolutionLevel
impl Debug for ResolutionLevel
Source§impl<'de> Deserialize<'de> for ResolutionLevel
impl<'de> Deserialize<'de> for ResolutionLevel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for ResolutionLevel
impl JsonSchema for ResolutionLevel
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for ResolutionLevel
impl PartialEq for ResolutionLevel
Source§impl Serialize for ResolutionLevel
impl Serialize for ResolutionLevel
impl StructuralPartialEq for ResolutionLevel
Auto Trait Implementations§
impl Freeze for ResolutionLevel
impl RefUnwindSafe for ResolutionLevel
impl Send for ResolutionLevel
impl Sync for ResolutionLevel
impl Unpin for ResolutionLevel
impl UnsafeUnpin for ResolutionLevel
impl UnwindSafe for ResolutionLevel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more