dng_image Class Reference

Base class for holding image data in DNG SDK. See dng_simple_image for derived class most often used in DNG SDK. More...

#include <dng_image.h>

Inheritance diagram for dng_image:

dng_simple_image

List of all members.


Public Types

enum  edge_option { edge_none, edge_zero, edge_repeat, edge_repeat_zero_last }
 How to handle requests to get image areas outside the image bounds. More...

Public Member Functions

virtual dng_imageClone () const
const dng_rect & Bounds () const
 Getter method for bounds of an image.
dng_point Size () const
 Getter method for size of an image.
uint32 Width () const
 Getter method for width of an image.
uint32 Height () const
 Getter method for height of an image.
uint32 Planes () const
 Getter method for number of planes in an image.
uint32 PixelType () const
virtual void SetPixelType (uint32 pixelType)
uint32 PixelSize () const
uint32 PixelRange () const
virtual dng_rect RepeatingTile () const
 Getter for best "tile stride" for accessing image.
void Get (dng_pixel_buffer &buffer, edge_option edgeOption=edge_none, uint32 repeatV=1, uint32 repeatH=1) const
void Put (const dng_pixel_buffer &buffer)
virtual void Trim (const dng_rect &r)
virtual void Rotate (const dng_orientation &orientation)
void CopyArea (const dng_image &src, const dng_rect &area, uint32 srcPlane, uint32 dstPlane, uint32 planes)
void CopyArea (const dng_image &src, const dng_rect &area, uint32 plane, uint32 planes)
bool EqualArea (const dng_image &rhs, const dng_rect &area, uint32 plane, uint32 planes) const
void SetConstant_uint8 (uint8 value, const dng_rect &area)
void SetConstant_uint8 (uint8 value)
void SetConstant_uint16 (uint16 value, const dng_rect &area)
void SetConstant_uint16 (uint16 value)
void SetConstant_int16 (int16 value, const dng_rect &area)
void SetConstant_int16 (int16 value)
void SetConstant_uint32 (uint32 value, const dng_rect &area)
void SetConstant_uint32 (uint32 value)
void SetConstant_real32 (real32 value, const dng_rect &area)
void SetConstant_real32 (real32 value)
virtual void GetRepeat (dng_pixel_buffer &buffer, const dng_rect &srcArea, const dng_rect &dstArea) const

Protected Member Functions

 dng_image (const dng_rect &bounds, uint32 planes, uint32 pixelType)
virtual void AcquireTileBuffer (dng_tile_buffer &buffer, const dng_rect &area, bool dirty) const
virtual void ReleaseTileBuffer (dng_tile_buffer &buffer) const
virtual void DoGet (dng_pixel_buffer &buffer) const
virtual void DoPut (const dng_pixel_buffer &buffer)
void GetEdge (dng_pixel_buffer &buffer, edge_option edgeOption, const dng_rect &srcArea, const dng_rect &dstArea) const
virtual void SetConstant (uint32 value, const dng_rect &area)

Protected Attributes

dng_rect fBounds
uint32 fPlanes
uint32 fPixelType

Friends

class dng_tile_buffer

Detailed Description

Base class for holding image data in DNG SDK. See dng_simple_image for derived class most often used in DNG SDK.

Member Enumeration Documentation

How to handle requests to get image areas outside the image bounds.

Enumerator:
edge_none  Leave edge pixels unchanged.
edge_zero  Pad with zeros.
edge_repeat  Repeat edge pixels.
edge_repeat_zero_last  Repeat edge pixels, except for last plane which is zero padded.


Member Function Documentation

void dng_image::CopyArea ( const dng_image src,
const dng_rect &  area,
uint32  plane,
uint32  planes 
) [inline]

Copy image data from an area of one image to same area of another.

Parameters:
src Image to copy from.
area Rectangle of images to copy.
plane Plane to start copying in src and this.
planes Number of planes to copy.

References CopyArea().

void dng_image::CopyArea ( const dng_image src,
const dng_rect &  area,
uint32  srcPlane,
uint32  dstPlane,
uint32  planes 
)

Copy image data from an area of one image to same area of another.

Parameters:
src Image to copy from.
area Rectangle of images to copy.
srcPlane Plane to start copying in src.
dstPlane Plane to start copying in this.
planes Number of planes to copy.

References dng_pixel_buffer::CopyArea().

Referenced by CopyArea().

bool dng_image::EqualArea ( const dng_image rhs,
const dng_rect &  area,
uint32  plane,
uint32  planes 
) const

Return true if the contents of an area of the image are the same as those of another.

Parameters:
rhs Image to compare against.
area Rectangle of image to test.
plane Plane to start comparing.
planes Number of planes to compare.

References dng_pixel_buffer::EqualArea().

void dng_image::Get ( dng_pixel_buffer buffer,
edge_option  edgeOption = edge_none,
uint32  repeatV = 1,
uint32  repeatH = 1 
) const

Get a pixel buffer of data on image with proper edge padding.

Parameters:
buffer Receives resulting pixel buffer.
edgeOption edge_option describing how to pad edges.
repeatV Amount of repeated padding needed in vertical for edge_repeat and edge_repeat_zero_last edgeOption cases.
repeatH Amount of repeated padding needed in horizontal for edge_repeat and edge_repeat_zero_last edgeOption cases.

References dng_pixel_buffer::DirtyPixel(), and edge_none.

Referenced by dng_mosaic_info::InterpolateGeneric(), and dng_filter_task::Process().

uint32 dng_image::PixelRange (  )  const

Getter for pixel range. For unsigned types, range is 0 to return value. For signed types, range is return value - 0x8000U. For ttFloat type, pixel range is 0.0 to 1.0 and this routine returns 1.

uint32 dng_image::PixelSize (  )  const

Getter for pixel size.

Return values:
Size,in bytes, of pixel type for this image .

References PixelType().

Referenced by dng_mosaic_info::InterpolateGeneric(), and SetPixelType().

uint32 dng_image::PixelType (  )  const [inline]

Getter for pixel type.

Return values:
See dng_tagtypes.h . Valid values are ttByte, ttShort, ttSShort, ttLong, ttFloat .

Referenced by dng_mosaic_info::InterpolateGeneric(), PixelSize(), dng_render::Render(), and dng_image_writer::WriteTIFFWithProfile().

void dng_image::Put ( const dng_pixel_buffer buffer  ) 

Put a pixel buffer into image.

Parameters:
buffer Pixel buffer to copy from.

References dng_pixel_buffer::ConstPixel(), and Planes().

Referenced by dng_mosaic_info::InterpolateGeneric(), and dng_filter_task::Process().

void dng_image::Rotate ( const dng_orientation &  orientation  )  [virtual]

Rotate image to reflect given orientation change.

Parameters:
orientation Directive to rotate image in a certain way.

Reimplemented in dng_simple_image.

References ThrowProgramError().

void dng_image::SetPixelType ( uint32  pixelType  )  [virtual]

Setter for pixel type.

Parameters:
pixelType The new pixel type .

Reimplemented in dng_simple_image.

References PixelSize(), and ThrowProgramError().

void dng_image::Trim ( const dng_rect &  r  )  [virtual]

Shrink bounds of image to given rectangle.

Parameters:
r Rectangle to crop to.

Reimplemented in dng_simple_image.

References Bounds(), and ThrowProgramError().


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