DIPlib Documentation - ©1995-2008 Quantitative Imaging Group, Delft University of Technology.

ImageFileInformationNew

Allocate an Image File Information structure (in dipIO)

SYNOPSIS

dip_Error dipio_ImageFileInformationNew ( newImInfo, name, filetype, datatype, dims, resources )

FUNCTION

Allocates a dipio_ImageFileInformation structure. It must be freed through ImageFileInformationFree, unless a resources parameter is given, in which case it will be freed automatically when freeing the resources. This structure is usually allocated by ImageFileGetInfo.

This function will fill out some of the values in the structure with the values given on the command line. All of these can be 0.

ARGUMENTS

Data typeNameDescription
dipio_ImageFileInformation *newImInfoOutput structure
dip_StringnameInitial value for name
dip_StringfiletypeInitial value for filetype
dip_DataTypedatatypeInitial value for datatype
dip_IntegerArraydimsInitial value for dimensions
dip_ResourcesresourcesResources tracking structure. See ResourcesNew

The structure dipio_ImageFileInformation contains the following elements:

Data typeNameDescription
dip_StringnameFile name
dip_StringfiletypeFile format string
dip_DataTypedatatypeData type of image
dip_intsigbitsSignificant bits
dip_IntegerArraydimensionsDimensions of image
dipio_PhotometricInterpretationphotometricColor space
dip_PhysicalDimensionsphysDimsPhysical dimensions structure. See PhysicalDimensionsNew
dip_intnumberOfImagesNumber of images in a TIFF file. If filetype is not "TIFF", this number is not set
dip_StringArrayhistoryHistory tags
dip_ResourcesresourcesResource tracking; all elements within this structure are tracked here

The enumerator dipio_PhotometricInterpretation contains the following constants:

NameDescription
DIPIO_PHM_GREYVALUENo colour information present; it's a grey-value image.
DIPIO_PHM_RGBRGB image (the first three planes are red, green and blue)
DIPIO_PHM_RGB_NONLINEARNon-linear R'G'B' image (RGB channels to the power of 0.4)
DIPIO_PHM_CMYCMY image (the first three planes are cyan, magenta and yellow)
DIPIO_PHM_CMYKCMYK image (the first four planes are cyan, magenta, yellow and black)
DIPIO_PHM_CIELUVCIE L*u'v' image (the first three planes are luminosity, u* and v*)
DIPIO_PHM_CIELABCIE L*a*b* image (the first three planes are luminosity, a* and b*)
DIPIO_PHM_CIEXYZCIE XYZ (the first three planes are X, Y and Z)
DIPIO_PHM_CIEYXYCIE Yxy (the first three planes are Y, x and y)
DIPIO_PHM_HCVHCV image (the first three planes are hue, chroma and value)
DIPIO_PHM_HSVHSV image (the first three planes are hue, saturation and value)
DIPIO_PHM_DEFAULTSame as DIPIO_PHM_GREYVALUE
DIPIO_PHM_GENERICAnything can be coded in the channels; the same as DIPIO_PHM_CMYK

Most file formats support only some of these.

SEE ALSO

ImageFileInformationFree, ImageFileGetInfo, PhysicalDimensionsNew

DIPlib on-line documentation | Function reference | Global function index