Allocates a new Physical Dimensions structure
#include "dip_support.h"
dip_Error dip_PhysicalDimensionsNew ( newPhysDims, dimensionality, dims, orig, dimUnit, intensity, offset, intensUnit, resources )
This function allocates a new Physical Dimensions structure.
A physical dimensions structure contains information about the physical dimensions of the data (of dimensionality dimension) in an image. It describes the position (orig) and size (dims) of a pixel in world coordinates and physical units (dimUnits), as well as the scaling (intensity) and offset (offset) of the pixel intensity in physical units (intensUnit).
Note that the initial values assigned by this function assume an isotropic pixel size. These values can be changed within the structure generated if this is not the case.
Data type | Name | Description |
dip_PhysicalDimensions * | newPhysDims | Pointer to a new Physical Dimensions data structure |
dip_int | dimensionality | Dimensionality of the image |
dip_float | dims | Initial value for dimensions along all axes |
dip_float | orig | Initial value for origin along all axes |
char * | dimUnit | Initial value for dimensionUnits along all axes |
dip_float | intensity | Initial value for intensity |
dip_float | offset | Initial value for offset |
char * | intensUnit | Initial value for intensityUnit |
dip_Resources | resources | Resources tracking structure. See ResourcesNew |
The structure dip_PhysicalDimensions contains the following elements:
Data type | Name | Description |
dip_FloatArray | dimensions | Dimensions of a pixel along each grid axis |
dip_FloatArray | origin | Coordinates of the origin in physical units |
dip_StringArray | dimensionUnits | Units for dimensions and origin |
dip_float | intensity | Intensity scaling in physical units |
dip_float | offset | Offset for intensity in physical units |
dip_String | intensityUnit | Units for intensity and offset |
dip_Resources | resources | Resource tracking; all elements within this structure are tracked here |
PhysicalDimensionsFree, PhysicalDimensionsCopy, PhysicalDimensionsIsIsotropic
DIPlib on-line documentation | Function reference | Global function index