Microscopy Image Browser 2.91
MIB
Loading...
Searching...
No Matches
mibUpdatePixSizeAndResolution.m File Reference

Calculate update resolution fields in the imageData.img_info(ImageDescription) or recalculate physical size of voxels. More...

Functions

function [ img_info , pixSize ] = mibUpdatePixSizeAndResolution (img_info, pixSize)
 Calculate update resolution fields in the imageData.img_info(ImageDescription) or recalculate physical size of voxels.
 

Detailed Description

Calculate update resolution fields in the imageData.img_info(ImageDescription) or recalculate physical size of voxels.

Function Documentation

◆ mibUpdatePixSizeAndResolution()

function [ img_info , pixSize ] = mibUpdatePixSizeAndResolution ( img_info,
pixSize )

Calculate update resolution fields in the imageData.img_info(ImageDescription) or recalculate physical size of voxels.

  • If BoundingBox information exist in the imageData.img_info(ImageDescription) the function recalculates the imageData.pixSize based on information from the BoundingBox.
  • If BoundingBox is missing, but imageData.img_info(XResolution) is present the imageData.pixSize recalculated based on XResolution and YResolution information
  • If both BoundingBox and XResolution is missing, the resolution is recalculated based on imageData.pixSize
Attention
requres Width, Height, Depth fields in img_info
Parameters
img_infoinformation about the dataset, an instance of the containers.Map class
pixSizea structure (imageData.pixSize) with diminsions of voxels,
.x .y .z .t .tunits .units
the fields are
  • .x - physical width of a pixel
  • .y - physical height of a pixel
  • .z - physical depthness of a pixel
  • .t - time between the frames for 2D movies
  • .tunits - time units
  • .units - physical units for x, y, z. Possible values: [m, cm, mm, um, nm]
Return values
img_infoupdated imageData.img_info
pixSizeupdated imageData.pixSize
Generated fields of pixSize:

References max, mibCalculatePixSizes(), mibCalculateResolution(), and min.

Referenced by mibCropObjectsController.cropBtn_Callback(), mibCropObjectsController.generatePatches(), mibController.menuFileExamples_Callback(), mibLoadImages(), and mibImage.updateServiceMetadata().

Here is the call graph for this function:
Here is the caller graph for this function: