CDImageInitail<TPixel> |
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.
Methods |
Border Mode |
CDImageInitial<TPixel>::BorderMode
EVisPad BorderMode()CDImageInitial<TPixel>::SetBorderModeReturns the default border mode as EVisPad enumaerated constant.
void SetBorderMode(EVisPad evispad)Set the default border mode.
Argument Description evispad border mode
Copy and Convert |
CDImageInitial<TPixel>::CopyFull
void CopyFull(CVisImageBase& imagebase)CDImageInitial<TPixel>::IntensityFromRGBAEqual 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
bool IntensityFromRGBA(CVisImageBase& imagebase)Create an intensity image from a RGBA image.
Argument Description imagebase input RGBA image
History |
CDImageInitial<TPixel>::AddToHistory
void AddToHistory(const CString& sHistory)CDImageInitial<TPixel>::ClearHistoryAdd a string to the history.
void ClearHistory
Clear the history.CDImageInitial<TPixel>::History
const CString History() constReturn the history.
CDImageInitial<TPixel>::HistoryEnable
bool HistoryEnable()CDImageInitial<TPixel>::SetHistoryReturn a flag, which indicates if it is possible to add information to the history.
void SetHistory(const CString& sHistory)Set the history. Use AddToHistory() to update the history.
Argument Description SHistory History string
CDImageInitial<TPixel>::SetHistoryEnable
Set history enable flag.
Argument | Description |
fHistory | History flag |
Resolution |
CDImageInitial<TPixel>::SetXResolution
Sets the pixel resolution (meters/pixel) in the x direction.
Argument | Description |
dXResolution | pixel resolution in x |
Sets the pixel resolution (meters/pixel) in the y direction.
Argument | Description |
dYResolution | pixel resolution in y |
Sets the pixel resolution (meters/pixel) in the z direction.
Argument | Description |
dZResolution | pixel resolution in z |
Miscellaneous |
CDImageInitial<TPixel>::CopyInitialAttributes
Copies the attributes in this class from the input image to the current
image.
Argument | Description |
image | input image |
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