dmIImageInfo Class Reference

Daim image document interface. More...

#include <CCI_Info.h>

Inherits dmIDocument.

Inherited by dmINFO.

List of all members.

Public Member Functions

bool Select (bool active)
 Select the document as the default image document for processing instructions.
bool Refresh ()
 Refresh the display (if any).
bool SetModified (bool modified)
 Mark document as modified [Notify].
bool KillMask ()
 Kill/Remove the current Mask.
bool SetMask (const dmRegion &region, dm_int operation=0)
 Set the current mask associated to the image.
bool GetMask (dmRegion &region)
 Get a copy of the current mask.
bool HasMask ()
 Check if there is an valid current mask.
bool KillRoi ()
 Kill/Remove the current ROI.
bool SetROI (const dmRegion &rgn)
 Use rgn as the current ROI.
bool GetROI (dmRegion &rgn)
 Get a copy of current ROI.
bool HasROI ()
 Check if there is any ROI currently active.
bool RoiToMask ()
 Transform the active roi into current mask.
bool MaskToRoi ()
 Transform the current mask into active roi.
dmImageBuffer * GetImageBuffer ()
 Return the image buffer See daim_processing for description of buffers.
dmImage * GetImage ()
 Return the current image.
const char_t * GetTitle ()
 Return the current title of the document.
const char_t * GetPath ()
 Return the current url of the document. see dmIDocument::OpenDocument for a description of url specification.
bool RestoreFromBuffer ()
 Restore the image with the content of the buffer See daim_processing for description of buffers.
bool SaveToBuffer ()
 Save whole image to the buffer See daim_processing for description of buffers.
bool SetImageData (const dmImageData &data, bool create_copy)
 Set image pixels data.
bool GetImageData (dmImageData &data)
 Get image pixels data.
bool NewDocument (EPixelFormat format, dm_uint width, dm_uint height)
 Create a new image document.
bool SetImageFormat (EPixelFormat format)
 Change the format of the image.
dmToolManager * SelectManager (const char_t *name, dm_uint flags)
 Select the active manager flags is a combination of the following values:
  • DM_Manager_Select : activate the manager in the foreground
  • DM_Manager_Create : create the manager if it does not exists.

bool SaveSelection (const char_t *path)
 Save image part corresponding to the current roi.
bool AddListener (cci_object *listener, dm_uint evtMask, dm_uint flags)
 Add an event listener to the attached manager.
bool RemoveListener (cci_object *listener, dm_uint evtMask, dm_uint flags)
 Remove an event listener from he attached manager.
EPixelFormat GetImageFormat ()
 Return the pixel format of the image.
bool SetUnits (dm_real unitsperpixel, dm_real aspectratio, CONST char_t *unitname, CONST char_t *unitlabel, dm_bool setdefaults)
 Set units for the current document.
bool SelectImage (cci_object *imagelist, dm_uint index)
 Replace the current image with the buffer at index.
bool StoreImage (cci_object *imagelist, dm_uint index, dm_int format=0)
 Store current image at buffer index index.
bool Duplicate (cci_object *sourceinfo, dm_bool useselection)
 Duplicate image.
bool SetRectRoi (dm_int left, dm_int top, dm_int right, dm_int bottom)
 Set rectangular ROI.
bool CopyRect (cci_object *sourceinfo, dm_int top, dm_int left, dm_int right, dm_int bottom)
 Duplicate a rectangular area of the source image.


Detailed Description

Daim image document interface.

Interface for image document.


Member Function Documentation

bool dmIImageInfo::AddListener cci_object *  listener,
dm_uint  evtMask,
dm_uint  flags
[inline]
 

Add an event listener to the attached manager.

See also:
dmIEventListener::AddListener() for a description of the parameer

bool dmIImageInfo::GetImageData dmImageData data  )  [inline]
 

Get image pixels data.

Parameters:
data A dmImageData object that will hold pixels buffer infos.
Note:
Any transformation involving buffer reallocation will result in invalid data !

bool dmIImageInfo::Refresh  )  [inline]
 

Refresh the display (if any).

Note that this method only redraw the document. If more updating is required ( like some processing instructions ) use the dmIDocument::Update method.

bool dmIImageInfo::RemoveListener cci_object *  listener,
dm_uint  evtMask,
dm_uint  flags
[inline]
 

Remove an event listener from he attached manager.

See also:
dmIEventListener::RemoveListener() for a description of the parameters

bool dmIImageInfo::SetImageData const dmImageData data,
bool  create_copy
[inline]
 

Set image pixels data.

Parameters:
data A dmImageData object holding pixels buffer infos.
create_copy If set to true: create a copy of the passed data. If set to false: do not create a copy of the input data. Instead, create a handle pointing to the input pixels buffer. USE WITH CAUTION, as deallocating the buffer while still in use by the dmIImageInfo object may cause very weirds and bad things append !!
Note:
Any transformation involving buffer reallocation will break the link between input data and the internal handle.

bool dmIImageInfo::SetUnits dm_real  unitsperpixel,
dm_real  aspectratio,
CONST char_t *  unitname,
CONST char_t *  unitlabel,
dm_bool  setdefaults
[inline]
 

Set units for the current document.

This method can be invoked as service to set defaults units, in this case setdefaults is ignored.


Generated on Tue May 9 12:34:57 2006 for Daim Library Module Set by  doxygen 1.4.6-NO