CDImageInitail<TPixel>

Class Description

This DIVA image class contains a number general non image analysis functions, which are used by other image classes. CDImageInitial is a templated class derived from CDVisImage and the template takes a single argument specifying the pixel type (TPixel).

Constructors/Destructor

CDImageInitial (void)

Default constructor. The image parameters are uninitialized and the instance is unusable until an image array is assigned.
CDImageInitial
    (int width, int height,
     int nbands = 1,
     int imopts = evisimoptDefault,
     BYTE *pbData = 0)

CDImageInitial
    (SIZE size,
     int nbands = 1,
     int imopts = evisimoptDefault,
     BYTE *pbData = 0)

CDImageInitial
    (const RECT& rect,
     int nbands = 1,
     int imopts = evisimoptDefault,
     BYTE *pbData = 0)

CDImageInitial
    (const CVisShape& shape,
     int imopts = evisimoptDefault,
     BYTE *pbData = 0)

Construct an image with the specified dimensions, number of bands, and options.

If pbData is zero, allocate the memory needed. If pbData is not zero, use the memory it points to.
CDImageInitial
    (CVisMemBlock& memblock,
     int width, int height,
     int nbands = 1,
     int imopts = evisimoptDefault)

CDImageInitial
    (CVisMemBlock& memblock,
     SIZE size,
     int nbands = 1,
     int imopts = evisimoptDefault)

CDImageInitial
    (CVisMemBlock& memblock,
     const RECT& rect,
     int nbands = 1,
     int imopts = evisimoptDefault)

CDImageInitial
    (CVisMemBlock& memblock,
     const CVisShape& shape,
     int imopts = evisimoptDefault)

Construct an image with the specified dimensions, number of bands, and options.

No new memory is allocated. The image points to the memblock supplied.
CDImageInitial
    (const CDImageInitial<TPixel>& imageSrc)

Construct an image from another image.
 
Argument Description
width width of image
height height of image
rect reference to a RECT structure
shape reference to a CVisShape instance specifying image properties
memblock reference to a MemBlock instance
imageSrc reference to an Image instance
nbands number of bands in image
imopts EVisImOpt image options. Options can be OR'ed.

Top

Methods

Border Mode

CDImageInitial<TPixel>::BorderMode

EVisPad BorderMode()

Returns the default border mode as EVisPad enumaerated constant.
 

CDImageInitial<TPixel>::SetBorderMode
void SetBorderMode(EVisPad evispad)

Set the default border mode.
 
Argument Description
evispad border mode

Top
 

Copy and Convert

CDImageInitial<TPixel>::CopyFull

void CopyFull(CVisImageBase& imagebase)

Equal to Copy(), beside it creates a copy of the full input image independent of the ROI.

bool CopyFull(CVisImageBase& imagebase, EVisNormalize evisnormalize)

Converts/Copy the the full input image to the format of the current image. The function dos not support RGBA to Gray image, use IntensityFromRGBA for this conversion. The function is only coping the attributes, which are copied by Alias().
 
Argument Description
imagebase image to copy
evisnormalize EVisNormalize constant indicating have to copy the pixels

CDImageInitial<TPixel>::IntensityFromRGBA
bool IntensityFromRGBA(CVisImageBase& imagebase)

Create an intensity image from a RGBA image.
 
Argument Description
imagebase input RGBA image

Top


History

CDImageInitial<TPixel>::AddToHistory
 

void AddToHistory(const CString& sHistory)

Add a string to the history.
 

CDImageInitial<TPixel>::ClearHistory
void ClearHistory
Clear the history.
CDImageInitial<TPixel>::History
const CString History() const

Return the history.

Top


CDImageInitial<TPixel>::HistoryEnable

bool HistoryEnable()

Return a flag, which indicates if it is possible to add information to the history.
 
 

CDImageInitial<TPixel>::SetHistory
void SetHistory(const CString& sHistory)

Set the history. Use AddToHistory() to update the history.
 
Argument Description
SHistory History string


CDImageInitial<TPixel>::SetHistoryEnable

Resolution 

CDImageInitial<TPixel>::SetXResolution

CDImageInitial<TPixel>::SetYResolution CDImageInitial<TPixel>::SetZResolution CDImageInitial<TPixel>::XResolution CDImageInitial<TPixel>::YResolution CDImageInitial<TPixel>::ZResolution

Miscellaneous 

CDImageInitial<TPixel>::CopyInitialAttributes

CDImageInitial<TPixel>::SizeofPixel
int SizeofPixel()

Return the size of a TPixel in bytes.


Copyright, 1999
Section for Image Analysis
Department of Mathematical Modelling
Technical University of Denmark
DK-2800 Lyngby

Authors: Rune Fisker

Last updated:  May 26 1999