pub struct Properties { /* private fields */ }
Expand description

This struct defines an inferface to the various properties of the various formats.

These properties are also available as a HashMap<String, String> which can be obtained with the OpenSlide::get_properties() method. However, this way of interacting with the property values is not ideal, hence this struct. Motivation:

  • Get the values with fitting types in stead of Strings, ready to be used straight away.
  • Every property is easier to document.
  • More convenient naming (arguable).

Many formats implements openslide properties (openslide.<property> in the HashMap returned by the OpenSlide::get_properties() method), and many formats also implements some Tiff properties (openslide.<property> in the HashMap returned by the OpenSlide::get_properties() method). Then there are properties that are unique to each format (it may be the same properties, but with different naming conventions etc.). This interface gives the programmer access to all (known) properties (if some exists and are not implemented here, this is a bug). If some property does not exist for some slide, the method for this property returns None. What properties that are available to each slide is somewhat arbitrary (or, at least unknown to the author of this library per now), so in order to discover available properties, you can print the result of the OpenSlide::get_properties() method, or use the Properties::print_available() method (recommended).

Implementations§

Initialises a new Properties struct.

This is done by submitting a property_map, which is obtained from the OpenSlide::get_properties() method, but this is abstracted away from the user, and happens automatically when defining an OpenSlide struct.

Print available properties (key, value) (where the value is not None).

OpenSlide properties

Slide vendor

Quickhash 1

Micrometer (microns) per pixel in the x direction.

Micrometer (microns) per pixel in the y direction.

Objective power

Comment

Number of zoom levels

Vector of level-dependent properties. The position in the returned vector corresponds to the zoom level.

Tiff properties

Model name

Resolution in the x direction

Resolution in the y direction

Resolution unit (e.g. centimeter or inch)

Aperio properties

Slide filename

Slide image id

ScanScope id

Date of creation (mm/dd/yy)

Time of creation (hh:mm:ss)

User

ICC profile

Parmset

Slide height

Slide width

Micrometer per pixel

Line camera skew

Line area offset in horizontal(?) direction

Line area offset in vertical(?) direction

Focus offset

Scan stripe width

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Sets value as a parameter of self.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.