Skip to content

Commit

Permalink
Reorder attribute definitions in ImfStandardAttributes.h in functiona…
Browse files Browse the repository at this point in the history
…l groupings

Signed-off-by: Joseph Goldstone <[email protected]>
  • Loading branch information
JGoldstone committed Apr 12, 2023
1 parent 71a7141 commit 0368f5c
Showing 1 changed file with 111 additions and 115 deletions.
226 changes: 111 additions & 115 deletions src/lib/OpenEXR/ImfStandardAttributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,42 +79,47 @@
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT

//
// chromaticities -- for RGB images, specifies the CIE (x,y)
// chromaticities of the primaries and the white point
// originalDataWindow -- if application software crops an image, then it
// should save the data window of the original, un-cropped image in the
// originalDataWindow attribute.
//

IMF_STD_ATTRIBUTE_DEF (chromaticities, Chromaticities, Chromaticities)
IMF_STD_ATTRIBUTE_DEF (
originalDataWindow, OriginalDataWindow, IMATH_NAMESPACE::Box2i)

// worldToCamera -- for images generated by 3D computer graphics rendering,
// a matrix that transforms 3D points from the world to the camera coordinate
// space of the renderer.
//
// whiteLuminance -- for RGB images, defines the luminance, in Nits
// (candelas per square meter) of the RGB value (1.0, 1.0, 1.0).
//
// If the chromaticities and the whiteLuminance of an RGB image are
// known, then it is possible to convert the image's pixels from RGB
// to CIE XYZ tristimulus values (see function RGBtoXYZ() in header
// file ImfChromaticities.h).
// The camera coordinate space is left-handed. Its origin indicates the
// location of the camera. The positive x and y axes correspond to the
// "right" and "up" directions in the rendered image. The positive z
// axis indicates the camera's viewing direction. (Objects in front of
// the camera have positive z coordinates.)
//
// Camera coordinate space in OpenEXR is the same as in Pixar's Renderman.
//

IMF_STD_ATTRIBUTE_DEF (whiteLuminance, WhiteLuminance, float)
IMF_STD_ATTRIBUTE_DEF (worldToCamera, WorldToCamera, IMATH_NAMESPACE::M44f)

//
// adoptedNeutral -- specifies the CIE (x,y) coordinates that should
// be considered neutral during color rendering. Pixels in the image
// file whose (x,y) coordinates match the adoptedNeutral value should
// be mapped to neutral values on the display.
// worldToNDC -- for images generated by 3D computer graphics rendering, a
// matrix that transforms 3D points from the world to the Normalized Device
// Coordinate (NDC) space of the renderer.
//

IMF_STD_ATTRIBUTE_DEF (adoptedNeutral, AdoptedNeutral, IMATH_NAMESPACE::V2f)

// NDC is a 2D coordinate space that corresponds to the image plane, with
// positive x and pointing to the right and y positive pointing down. The
// coordinates (0, 0) and (1, 1) correspond to the upper left and lower right
// corners of the OpenEXR display window.
//
// renderingTransform, lookModTransform -- specify the names of the
// CTL functions that implements the intended color rendering and look
// modification transforms for this image.
// To transform a 3D point in word space into a 2D point in NDC space,
// multiply the 3D point by the worldToNDC matrix and discard the z
// coordinate.
//
// NDC space in OpenEXR is the same as in Pixar's Renderman.
//

IMF_STD_ATTRIBUTE_DEF (renderingTransform, RenderingTransform, std::string)
IMF_STD_ATTRIBUTE_DEF (lookModTransform, LookModTransform, std::string)
IMF_STD_ATTRIBUTE_DEF (worldToNDC, WorldToNDC, IMATH_NAMESPACE::M44f)

//
// xDensity -- horizontal output density, in pixels per inch.
Expand All @@ -123,6 +128,42 @@ IMF_STD_ATTRIBUTE_DEF (lookModTransform, LookModTransform, std::string)

IMF_STD_ATTRIBUTE_DEF (xDensity, XDensity, float)

//
// longitude, latitude, altitude -- for images of real objects, the
// location where the image was recorded. Longitude and latitude are
// in degrees east of Greenwich and north of the equator. Altitude
// is in meters above sea level. For example, Kathmandu, Nepal is
// at longitude 85.317, latitude 27.717, altitude 1305.
//

IMF_STD_ATTRIBUTE_DEF (longitude, Longitude, float)
IMF_STD_ATTRIBUTE_DEF (latitude, Latitude, float)
IMF_STD_ATTRIBUTE_DEF (altitude, Altitude, float)

//
// isoSpeed -- the ISO speed of the film or image sensor
// that was used to record the image
//

IMF_STD_ATTRIBUTE_DEF (isoSpeed, IsoSpeed, float)

// exposure -- exposure time, in seconds

IMF_STD_ATTRIBUTE_DEF (expTime, ExpTime, float)

//
// aperture -- the camera's lens aperture, in f-stops (focal length
// of the lens divided by the diameter of the iris opening)
//

IMF_STD_ATTRIBUTE_DEF (aperture, Aperture, float)

//
// focus -- the camera's focus distance, in meters
//

IMF_STD_ATTRIBUTE_DEF (focus, Focus, float)

//
// owner -- name of the owner of the image
//
Expand All @@ -147,7 +188,6 @@ IMF_STD_ATTRIBUTE_DEF (comments, Comments, std::string)
// 01, 02, ... 31), hh is the hour (2 digits, 00, 01, ... 23), mm
// is the minute, and ss is the second (2 digits, 00, 01, ... 59).
//
//

IMF_STD_ATTRIBUTE_DEF (capDate, CapDate, std::string)

Expand All @@ -161,65 +201,83 @@ IMF_STD_ATTRIBUTE_DEF (capDate, CapDate, std::string)
IMF_STD_ATTRIBUTE_DEF (utcOffset, UtcOffset, float)

//
// longitude, latitude, altitude -- for images of real objects, the
// location where the image was recorded. Longitude and latitude are
// in degrees east of Greenwich and north of the equator. Altitude
// is in meters above sea level. For example, Kathmandu, Nepal is
// at longitude 85.317, latitude 27.717, altitude 1305.
// keyCode -- for motion picture film frames. Identifies film
// manufacturer, film type, film roll and frame position within
// the roll.
//

IMF_STD_ATTRIBUTE_DEF (longitude, Longitude, float)
IMF_STD_ATTRIBUTE_DEF (latitude, Latitude, float)
IMF_STD_ATTRIBUTE_DEF (altitude, Altitude, float)
IMF_STD_ATTRIBUTE_DEF (keyCode, KeyCode, KeyCode)

//
// focus -- the camera's focus distance, in meters
// timeCode -- time and control code
//

IMF_STD_ATTRIBUTE_DEF (focus, Focus, float)
IMF_STD_ATTRIBUTE_DEF (timeCode, TimeCode, TimeCode)

//
// exposure -- exposure time, in seconds
// framesPerSecond -- defines the nominal playback frame rate for image
// sequences, in frames per second. Every image in a sequence should
// have a framesPerSecond attribute, and the attribute value should be
// the same for all images in the sequence. If an image sequence has
// no framesPerSecond attribute, playback software should assume that
// the frame rate for the sequence is 24 frames per second.
//
// In order to allow exact representation of NTSC frame and field rates,
// framesPerSecond is stored as a rational number. A rational number is
// a pair of integers, n and d, that represents the value n/d.
//
// For the exact values of commonly used frame rates, please see header
// file ImfFramesPerSecond.h.
//

IMF_STD_ATTRIBUTE_DEF (expTime, ExpTime, float)
IMF_STD_ATTRIBUTE_DEF (framesPerSecond, FramesPerSecond, Rational)

//
// aperture -- the camera's lens aperture, in f-stops (focal length
// of the lens divided by the diameter of the iris opening)
// chromaticities -- for RGB images, specifies the CIE (x,y)
// chromaticities of the primaries and the white point
//

IMF_STD_ATTRIBUTE_DEF (aperture, Aperture, float)
IMF_STD_ATTRIBUTE_DEF (chromaticities, Chromaticities, Chromaticities)

//
// isoSpeed -- the ISO speed of the film or image sensor
// that was used to record the image
// whiteLuminance -- for RGB images, defines the luminance, in Nits
// (candelas per square meter) of the RGB value (1.0, 1.0, 1.0).
//
// If the chromaticities and the whiteLuminance of an RGB image are
// known, then it is possible to convert the image's pixels from RGB
// to CIE XYZ tristimulus values (see function RGBtoXYZ() in header
// file ImfChromaticities.h).
//
//

IMF_STD_ATTRIBUTE_DEF (isoSpeed, IsoSpeed, float)
IMF_STD_ATTRIBUTE_DEF (whiteLuminance, WhiteLuminance, float)

//
// envmap -- if this attribute is present, the image represents
// an environment map. The attribute's value defines how 3D
// directions are mapped to 2D pixel locations. For details
// see header file ImfEnvmap.h
// adoptedNeutral -- specifies the CIE (x,y) coordinates that should
// be considered neutral during color rendering. Pixels in the image
// file whose (x,y) coordinates match the adoptedNeutral value should
// be mapped to neutral values on the display.
//

IMF_STD_ATTRIBUTE_DEF (envmap, Envmap, Envmap)
IMF_STD_ATTRIBUTE_DEF (adoptedNeutral, AdoptedNeutral, IMATH_NAMESPACE::V2f)

//
// keyCode -- for motion picture film frames. Identifies film
// manufacturer, film type, film roll and frame position within
// the roll.
// renderingTransform, lookModTransform -- specify the names of the
// CTL functions that implements the intended color rendering and look
// modification transforms for this image.
//

IMF_STD_ATTRIBUTE_DEF (keyCode, KeyCode, KeyCode)
IMF_STD_ATTRIBUTE_DEF (renderingTransform, RenderingTransform, std::string)
IMF_STD_ATTRIBUTE_DEF (lookModTransform, LookModTransform, std::string)

//
// timeCode -- time and control code
// envmap -- if this attribute is present, the image represents
// an environment map. The attribute's value defines how 3D
// directions are mapped to 2D pixel locations. For details
// see header file ImfEnvmap.h
//

IMF_STD_ATTRIBUTE_DEF (timeCode, TimeCode, TimeCode)
IMF_STD_ATTRIBUTE_DEF (envmap, Envmap, Envmap)

//
// wrapmodes -- determines how texture map images are extrapolated.
Expand Down Expand Up @@ -251,24 +309,6 @@ IMF_STD_ATTRIBUTE_DEF (timeCode, TimeCode, TimeCode)

IMF_STD_ATTRIBUTE_DEF (wrapmodes, Wrapmodes, std::string)

//
// framesPerSecond -- defines the nominal playback frame rate for image
// sequences, in frames per second. Every image in a sequence should
// have a framesPerSecond attribute, and the attribute value should be
// the same for all images in the sequence. If an image sequence has
// no framesPerSecond attribute, playback software should assume that
// the frame rate for the sequence is 24 frames per second.
//
// In order to allow exact representation of NTSC frame and field rates,
// framesPerSecond is stored as a rational number. A rational number is
// a pair of integers, n and d, that represents the value n/d.
//
// For the exact values of commonly used frame rates, please see header
// file ImfFramesPerSecond.h.
//

IMF_STD_ATTRIBUTE_DEF (framesPerSecond, FramesPerSecond, Rational)

//
// multiView -- defines the view names for multi-view image files.
// A multi-view image contains two or more views of the same scene,
Expand All @@ -282,41 +322,6 @@ IMF_STD_ATTRIBUTE_DEF (framesPerSecond, FramesPerSecond, Rational)

IMF_STD_ATTRIBUTE_DEF (multiView, MultiView, StringVector)

//
// worldToCamera -- for images generated by 3D computer graphics rendering,
// a matrix that transforms 3D points from the world to the camera coordinate
// space of the renderer.
//
// The camera coordinate space is left-handed. Its origin indicates the
// location of the camera. The positive x and y axes correspond to the
// "right" and "up" directions in the rendered image. The positive z
// axis indicates the camera's viewing direction. (Objects in front of
// the camera have positive z coordinates.)
//
// Camera coordinate space in OpenEXR is the same as in Pixar's Renderman.
//

IMF_STD_ATTRIBUTE_DEF (worldToCamera, WorldToCamera, IMATH_NAMESPACE::M44f)

//
// worldToNDC -- for images generated by 3D computer graphics rendering, a
// matrix that transforms 3D points from the world to the Normalized Device
// Coordinate (NDC) space of the renderer.
//
// NDC is a 2D coordinate space that corresponds to the image plane, with
// positive x and pointing to the right and y positive pointing down. The
// coordinates (0, 0) and (1, 1) correspond to the upper left and lower right
// corners of the OpenEXR display window.
//
// To transform a 3D point in word space into a 2D point in NDC space,
// multiply the 3D point by the worldToNDC matrix and discard the z
// coordinate.
//
// NDC space in OpenEXR is the same as in Pixar's Renderman.
//

IMF_STD_ATTRIBUTE_DEF (worldToNDC, WorldToNDC, IMATH_NAMESPACE::M44f)

//
// deepImageState -- specifies whether the pixels in a deep image are
// sorted and non-overlapping.
Expand All @@ -332,15 +337,6 @@ IMF_STD_ATTRIBUTE_DEF (worldToNDC, WorldToNDC, IMATH_NAMESPACE::M44f)

IMF_STD_ATTRIBUTE_DEF (deepImageState, DeepImageState, DeepImageState)

//
// originalDataWindow -- if application software crops an image, then it
// should save the data window of the original, un-cropped image in the
// originalDataWindow attribute.
//

IMF_STD_ATTRIBUTE_DEF (
originalDataWindow, OriginalDataWindow, IMATH_NAMESPACE::Box2i)

//
// dwaCompressionLevel -- sets the quality level for images compressed
// with the DWAA or DWAB method.
Expand Down

0 comments on commit 0368f5c

Please sign in to comment.