Struct e57::ImageWriter
source · pub struct ImageWriter<'a, T: Read + Write + Seek> { /* private fields */ }Expand description
Defines a new image and writes it into an E57 file.
Implementations§
source§impl<'a, T: Read + Write + Seek> ImageWriter<'a, T>
impl<'a, T: Read + Write + Seek> ImageWriter<'a, T>
sourcepub fn set_name(&mut self, value: &str)
pub fn set_name(&mut self, value: &str)
Set optional user-defined name for the image. Not set by default.
sourcepub fn set_description(&mut self, value: &str)
pub fn set_description(&mut self, value: &str)
Set optional user-defined description for the image. Not set by default.
sourcepub fn set_pointcloud_guid(&mut self, value: &str)
pub fn set_pointcloud_guid(&mut self, value: &str)
Set optional GUID of the point cloud that is connected to this image. Not set by default.
sourcepub fn set_transform(&mut self, value: Transform)
pub fn set_transform(&mut self, value: Transform)
Set optional transformation to convert data from the local image coordinates to the file-level coordinate system. By default this is not set, meaning the image has no transformation.
sourcepub fn set_acquisition(&mut self, value: DateTime)
pub fn set_acquisition(&mut self, value: DateTime)
Set optional start date and time when the images was captured. Not set by default.
sourcepub fn set_sensor_vendor(&mut self, value: &str)
pub fn set_sensor_vendor(&mut self, value: &str)
Set optional name of the manufacturer for the sensor used to capture the image. Not set by default.
sourcepub fn set_sensor_model(&mut self, value: &str)
pub fn set_sensor_model(&mut self, value: &str)
Set optional model name of the sensor used for capturing the image. Not set by default.
sourcepub fn set_sensor_serial(&mut self, value: &str)
pub fn set_sensor_serial(&mut self, value: &str)
Set optional serial number of the sensor used for capturing the image. Not set by default.
sourcepub fn add_visual_reference(
&mut self,
format: ImageFormat,
image: &mut dyn Read,
properties: VisualReferenceImageProperties,
mask: Option<&mut dyn Read>,
) -> Result<()>
pub fn add_visual_reference( &mut self, format: ImageFormat, image: &mut dyn Read, properties: VisualReferenceImageProperties, mask: Option<&mut dyn Read>, ) -> Result<()>
Adds an optional visual reference image, also known as preview image.
See also VisualReferenceImageProperties struct for more details.
The optional PNG mask image can be used to indicate valid/invalid
pixels in the image, for example if the image is not rectangular.
The mask must have the same size as the actual image.
Non-zero-valued pixels mark valid pixel locations and
zero-valued pixels mark invalid pixels.
sourcepub fn add_pinhole(
&mut self,
format: ImageFormat,
image: &mut dyn Read,
properties: PinholeImageProperties,
mask: Option<&mut dyn Read>,
) -> Result<()>
pub fn add_pinhole( &mut self, format: ImageFormat, image: &mut dyn Read, properties: PinholeImageProperties, mask: Option<&mut dyn Read>, ) -> Result<()>
Adds pinhole image data.
Width and height must match the actual binary PNG or JPEG image.
See also PinholeImageProperties struct for more details.
The optional PNG mask image can be used to indicate valid/invalid
pixels in the image, for example if the image is not rectangular.
The mask must have the same size as the actual image.
Non-zero-valued pixels mark valid pixel locations and
zero-valued pixels mark invalid pixels.
sourcepub fn add_spherical(
&mut self,
format: ImageFormat,
image: &mut dyn Read,
properties: SphericalImageProperties,
mask: Option<&mut dyn Read>,
) -> Result<()>
pub fn add_spherical( &mut self, format: ImageFormat, image: &mut dyn Read, properties: SphericalImageProperties, mask: Option<&mut dyn Read>, ) -> Result<()>
Adds spherical image data.
See also SphericalImageProperties struct for more details.
The optional PNG mask image can be used to indicate valid/invalid
pixels in the image, for example if the image is not rectangular.
The mask must have the same size as the actual image.
Non-zero-valued pixels mark valid pixel locations and
zero-valued pixels mark invalid pixels.
sourcepub fn add_cylindrical(
&mut self,
format: ImageFormat,
image_data: &mut dyn Read,
properties: CylindricalImageProperties,
mask_data: Option<&mut dyn Read>,
) -> Result<()>
pub fn add_cylindrical( &mut self, format: ImageFormat, image_data: &mut dyn Read, properties: CylindricalImageProperties, mask_data: Option<&mut dyn Read>, ) -> Result<()>
Adds cylindrical image data.
See also CylindricalImageProperties struct for more details.
The optional PNG mask image can be used to indicate valid/invalid
pixels in the image, for example if the image is not rectangular.
The mask must have the same size as the actual image.
Non-zero-valued pixels mark valid pixel locations and
zero-valued pixels mark invalid pixels.
sourcepub fn finalize(&mut self) -> Result<()>
pub fn finalize(&mut self) -> Result<()>
Must be called after image is complete to finishing adding the new image. Binary image and mask data is directly written into the E57 file earlier, but the XML metadata will be only added to the E57 if you call finalize. Skipping the finalize call after you added image or mask data means that the data will be part of the E57 file but is never referenced by its XML header section.