dng_camera_profile Class Reference

Container for DNG camera color profile and calibration data. More...

#include <dng_camera_profile.h>

List of all members.


Public Member Functions

void SetName (const char *name)
const dng_string & Name () const
bool NameIsEmbedded () const
void SetCalibrationIlluminant1 (uint32 light)
void SetCalibrationIlluminant2 (uint32 light)
uint32 CalibrationIlluminant1 () const
uint32 CalibrationIlluminant2 () const
real64 CalibrationTemperature1 () const
real64 CalibrationTemperature2 () const
void SetColorMatrix1 (const dng_matrix &m)
void SetColorMatrix2 (const dng_matrix &m)
bool HasColorMatrix1 () const
 Predicate to test if first camera matrix is set.
bool HasColorMatrix2 () const
 Predicate to test if second camera matrix is set.
const dng_matrix & ColorMatrix1 () const
 Getter for first of up to two color matrices used for calibrations.
const dng_matrix & ColorMatrix2 () const
 Getter for second of up to two color matrices used for calibrations.
void SetForwardMatrix1 (const dng_matrix &m)
 Setter for first of up to two forward matrices used for calibrations.
void SetForwardMatrix2 (const dng_matrix &m)
 Setter for second of up to two forward matrices used for calibrations.
const dng_matrix & ForwardMatrix1 () const
 Getter for first of up to two forward matrices used for calibrations.
const dng_matrix & ForwardMatrix2 () const
 Getter for second of up to two forward matrices used for calibrations.
void SetReductionMatrix1 (const dng_matrix &m)
void SetReductionMatrix2 (const dng_matrix &m)
const dng_matrix & ReductionMatrix1 () const
 Getter for first of up to two dimensionality reduction hints for four color cameras.
const dng_matrix & ReductionMatrix2 () const
 Getter for second of up to two dimensionality reduction hints for four color cameras.
const dng_fingerprintFingerprint () const
 Getter function from profile fingerprint.
dng_camera_profile_id ProfileID () const
void SetCopyright (const char *copyright)
const dng_string & Copyright () const
void SetEmbedPolicy (uint32 policy)
uint32 EmbedPolicy () const
bool IsLegalToEmbed () const
bool HasHueSatDeltas () const
const dng_hue_sat_map & HueSatDeltas1 () const
void SetHueSatDeltas1 (const dng_hue_sat_map &deltas1)
const dng_hue_sat_map & HueSatDeltas2 () const
void SetHueSatDeltas2 (const dng_hue_sat_map &deltas2)
bool HasLookTable () const
const dng_hue_sat_map & LookTable () const
void SetLookTable (const dng_hue_sat_map &table)
const dng_tone_curve & ToneCurve () const
void SetToneCurve (const dng_tone_curve &curve)
void SetProfileCalibrationSignature (const char *signature)
const dng_string & ProfileCalibrationSignature () const
void SetUniqueCameraModelRestriction (const char *camera)
const dng_string & UniqueCameraModelRestriction () const
void SetWasReadFromDNG (bool state=true)
bool WasReadFromDNG () const
bool IsValid (uint32 channels) const
bool EqualData (const dng_camera_profile &profile) const
void Parse (dng_stream &stream, dng_camera_profile_info &profileInfo)
 Parse profile from dng_camera_profile_info data.
bool ParseExtended (dng_stream &stream)
virtual void SetFourColorBayer ()
 Convert from a three-color to a four-color Bayer profile.
dng_hue_sat_map * HueSatMapForWhite (const dng_xy_coord &white) const
void Stub ()
 Stub out the profile (free memory used by large tables).
bool WasStubbed () const
 Was this profile stubbed?

Static Public Member Functions

static void NormalizeColorMatrix (dng_matrix &m)
 Utility function to normalize the scale of the color matrix.
static void NormalizeForwardMatrix (dng_matrix &m)
 Utility function to normalize the scale of the forward matrix.

Protected Member Functions

void ClearFingerprint ()
void CalculateFingerprint () const

Static Protected Member Functions

static real64 IlluminantToTemperature (uint32 light)
static bool ValidForwardMatrix (const dng_matrix &m)
static void ReadHueSatMap (dng_stream &stream, dng_hue_sat_map &hueSatMap, uint32 hues, uint32 sats, uint32 vals, bool skipSat0)

Protected Attributes

dng_string fName
uint32 fCalibrationIlluminant1
uint32 fCalibrationIlluminant2
dng_matrix fColorMatrix1
dng_matrix fColorMatrix2
dng_matrix fForwardMatrix1
dng_matrix fForwardMatrix2
dng_matrix fReductionMatrix1
dng_matrix fReductionMatrix2
dng_fingerprint fFingerprint
dng_string fCopyright
uint32 fEmbedPolicy
dng_hue_sat_map fHueSatDeltas1
dng_hue_sat_map fHueSatDeltas2
dng_hue_sat_map fLookTable
dng_tone_curve fToneCurve
dng_string fProfileCalibrationSignature
dng_string fUniqueCameraModelRestriction
bool fWasReadFromDNG
bool fWasStubbed

Detailed Description

Container for DNG camera color profile and calibration data.

Member Function Documentation

uint32 dng_camera_profile::CalibrationIlluminant1 (  )  const [inline]

Getter for first of up to two light sources used for calibration. Uses the EXIF encodings for illuminant and is used to distinguish which matrix to use. Corresponds to the DNG CalibrationIlluminant1 tag.

Referenced by CalibrationTemperature1().

uint32 dng_camera_profile::CalibrationIlluminant2 (  )  const [inline]

Getter for second of up to two light sources used for calibration. Uses the EXIF encodings for illuminant and is used to distinguish which matrix to use. Corresponds to the DNG CalibrationIlluminant2 tag.

Referenced by CalibrationTemperature2().

real64 dng_camera_profile::CalibrationTemperature1 (  )  const [inline]

Getter for first of up to two light sources used for calibration, returning result as color temperature.

References CalibrationIlluminant1().

Referenced by dng_color_spec::dng_color_spec(), and HueSatMapForWhite().

real64 dng_camera_profile::CalibrationTemperature2 (  )  const [inline]

Getter for second of up to two light sources used for calibration, returning result as color temperature.

References CalibrationIlluminant2().

Referenced by dng_color_spec::dng_color_spec(), and HueSatMapForWhite().

const dng_string& dng_camera_profile::Copyright (  )  const [inline]

Getter for camera profile copyright.

Return values:
Copyright string for profile.

bool dng_camera_profile::EqualData ( const dng_camera_profile profile  )  const

Predicate to check if two camera profiles are colorwise equal, thus ignores the profile name.

Parameters:
profile Camera profile to compare to.

dng_hue_sat_map * dng_camera_profile::HueSatMapForWhite ( const dng_xy_coord &  white  )  const

Find the hue/sat table to use for a given white point, if any. The calling routine owns the resulting table.

References CalibrationTemperature1(), and CalibrationTemperature2().

bool dng_camera_profile::IsValid ( uint32  channels  )  const

Determines if this a valid profile for this number of color channels?

Return values:
true if the profile is valid.

Referenced by dng_color_spec::dng_color_spec(), dng_info::Parse(), and SetFourColorBayer().

const dng_string& dng_camera_profile::Name (  )  const [inline]

Getter for camera profile name.

Return values:
Name of profile.

Referenced by ProfileID().

bool dng_camera_profile::NameIsEmbedded (  )  const [inline]

Test if this name is embedded.

Return values:
true if the name matches the name of the embedded camera profile.

bool dng_camera_profile::ParseExtended ( dng_stream stream  ) 

Parse from an extended profile stream, which is similar to stand alone TIFF file.

References Parse().

dng_camera_profile_id dng_camera_profile::ProfileID (  )  const [inline]

Getter for camera profile id.

Return values:
ID of profile.

References Fingerprint(), and Name().

void dng_camera_profile::SetCalibrationIlluminant1 ( uint32  light  )  [inline]

Setter for first of up to two light sources used for calibration. Uses the EXIF encodings for illuminant and is used to distinguish which matrix to use. Corresponds to the DNG CalibrationIlluminant1 tag.

Referenced by Parse().

void dng_camera_profile::SetCalibrationIlluminant2 ( uint32  light  )  [inline]

Setter for second of up to two light sources used for calibration. Uses the EXIF encodings for illuminant and is used to distinguish which matrix to use. Corresponds to the DNG CalibrationIlluminant2 tag.

Referenced by Parse().

void dng_camera_profile::SetColorMatrix1 ( const dng_matrix &  m  ) 

Setter for first of up to two color matrices used for reference camera calibrations. These matrices map XYZ values to camera values. The DNG SDK needs to map colors that direction in order to determine the clipping points for highlight recovery logic based on the white point. If cameras were all three-color, the matrix could be stored as a forward matrix. The inverse matrix is requried to support four-color cameras.

References NormalizeColorMatrix().

Referenced by Parse().

void dng_camera_profile::SetColorMatrix2 ( const dng_matrix &  m  ) 

Setter for second of up to two color matrices used for reference camera calibrations. These matrices map XYZ values to camera values. The DNG SDK needs to map colors that direction in order to determine the clipping points for highlight recovery logic based on the white point. If cameras were all three-color, the matrix could be stored as a forward matrix. The inverse matrix is requried to support four-color cameras.

References NormalizeColorMatrix().

Referenced by Parse().

void dng_camera_profile::SetCopyright ( const char *  copyright  )  [inline]

Setter for camera profile copyright.

Parameters:
copyright Copyright string to use for this camera profile.

Referenced by Parse().

void dng_camera_profile::SetName ( const char *  name  )  [inline]

Setter for camera profile name.

Parameters:
name Name to use for this camera profile.

Referenced by Parse().

void dng_camera_profile::SetReductionMatrix1 ( const dng_matrix &  m  ) 

Setter for first of up to two dimensionality reduction hints for four-color cameras. This is an optional matrix that maps four components to three. See Appendix 6 of the DNG 1.1.0 specification.

Referenced by Parse().

void dng_camera_profile::SetReductionMatrix2 ( const dng_matrix &  m  ) 

Setter for second of up to two dimensionality reduction hints for four-color cameras. This is an optional matrix that maps four components to three. See Appendix 6 of the DNG 1.1.0 specification.

Referenced by Parse().

void dng_camera_profile::SetUniqueCameraModelRestriction ( const char *  camera  )  [inline]

Setter for camera unique model name to restrict use of this profile.

Parameters:
camera Camera unique model name designating only camera this profile can be used with. (Empty string for no restriction.)

Referenced by Parse().

const dng_string& dng_camera_profile::UniqueCameraModelRestriction (  )  const [inline]

Getter for camera unique model name to restrict use of this profile.

Return values:
Unique model name of only camera this profile can be used with or empty if no restriction.


The documentation for this class was generated from the following files:

Copyright © 2006-2009 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google