CFx SDK Documentation  2022 SP0
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
OdGiMonochromaticRasterTransformer Class Reference

#include <GiRasterWrappers.h>

Inheritance diagram for OdGiMonochromaticRasterTransformer:
OdGiGrayscaleRasterTransformer OdGiInversionRasterTransformer OdGiRasterImageWrapper OdGiRasterImageParam OdGiRasterImage OdRxObject

Public Member Functions

 OdGiMonochromaticRasterTransformer ()
 
virtual ~OdGiMonochromaticRasterTransformer ()
 
OdRxObjectPtr clone () const
 
void copyFrom (const OdRxObject *pSource)
 
void setThreshold (OdUInt8 treshold)
 
int threshold () const
 
- Public Member Functions inherited from OdGiGrayscaleRasterTransformer
 OdGiGrayscaleRasterTransformer ()
 
virtual ~OdGiGrayscaleRasterTransformer ()
 
- Public Member Functions inherited from OdGiInversionRasterTransformer
 OdGiInversionRasterTransformer ()
 
virtual ~OdGiInversionRasterTransformer ()
 
ODCOLORREF color (OdUInt32 colorIndex) const
 
void paletteData (OdUInt8 *bytes) const
 
void scanLines (OdUInt8 *scnLines, OdUInt32 firstScanline, OdUInt32 numLines=1) const
 
const OdUInt8scanLines () const
 
- Public Member Functions inherited from OdGiRasterImageWrapper
 OdGiRasterImageWrapper ()
 
virtual ~OdGiRasterImageWrapper ()
 
void setOriginal (const OdGiRasterImage *pOrig)
 
const OdGiRasterImageoriginal () const
 
OdGiRasterImagePtr cloneOriginal () const
 
OdUInt32 pixelWidth () const
 
OdUInt32 pixelHeight () const
 
Units defaultResolution (double &xPelsPerUnit, double &yPelsPerUnit) const
 
OdUInt32 colorDepth () const
 
OdUInt32 numColors () const
 
OdUInt32 paletteDataSize () const
 
OdUInt32 scanLineSize () const
 
PixelFormatInfo pixelFormat () const
 
OdUInt32 scanLinesAlignment () const
 
int transparentColor () const
 
ImageSource imageSource () const
 
const OdStringsourceFileName () const
 
TransparencyMode transparencyMode () const
 
OdUInt32 supportedParams () const
 
void setImageSource (ImageSource source)
 
void setSourceFileName (const OdString &fileName)
 
void setTransparencyMode (TransparencyMode mode)
 
voidimp () const
 
- Public Member Functions inherited from OdGiRasterImageParam
 ODRX_DECLARE_MEMBERS (OdGiRasterImageParam)
 
- Public Member Functions inherited from OdGiRasterImage
 ODRX_DECLARE_MEMBERS (OdGiRasterImage)
 
OdSmartPtr< OdGiRasterImagechangeImageSource (ImageSource source, const OdChar *pFileName=NULL)
 
OdSmartPtr< OdGiRasterImagechangeSourceFileName (const OdString &fileName)
 
OdSmartPtr< OdGiRasterImagechangeTransparencyMode (TransparencyMode mode)
 
OdSmartPtr< OdGiRasterImageconvert (bool convertPaletteToRGB, double brightness=50.0, double contrast=50.0, double fade=0.0, ODCOLORREF backgroundColor=0, bool flipX=false, bool flipY=false, bool rotate90=false, const OdGiRasterImage *pDestDesc=0, bool transparency=false) const
 
virtual OdSmartPtr< OdGiRasterImagecrop (OdUInt32 x, OdUInt32 y, OdUInt32 width, OdUInt32 height) const
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Static Public Member Functions

static OdGiRasterImagePtr createObject (const OdGiRasterImage *pOrig, int threshold=127)
 
- Static Public Member Functions inherited from OdGiGrayscaleRasterTransformer
static OdGiRasterImagePtr createObject (const OdGiRasterImage *pOrig)
 
- Static Public Member Functions inherited from OdGiInversionRasterTransformer
static OdGiRasterImagePtr createObject (const OdGiRasterImage *pOrig)
 
- Static Public Member Functions inherited from OdGiRasterImage
static OdUInt32 calcBMPScanLineSize (OdUInt32 pixelWidth, int colorDepth)
 
static OdUInt32 calcColorMask (OdUInt8 numColorBits, OdUInt8 colorOffset=0)
 
- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Protected Member Functions

virtual ODCOLORREF colorXform (ODCOLORREF color) const
 

Additional Inherited Members

- Public Types inherited from OdGiRasterImageParam
enum  ParamType { kImageSource = (1 << 0) , kTransparencyMode = (1 << 1) , kSourceFileName = (1 << 2) }
 
- Public Types inherited from OdGiRasterImage
enum  Units {
  kNone = 0 , kMillimeter , kCentimeter , kMeter ,
  kKilometer , kInch , kFoot , kYard ,
  kMile , kMicroinches , kMils , kAngstroms ,
  kNanometers , kMicrons , kDecimeters , kDekameters ,
  kHectometers , kGigameters , kAstronomical , kLightYears ,
  kParsecs
}
 
enum  ImageSource {
  kUndefinedSource = -1 , kFromDwg = 0 , kFromOleObject = 1 , kFromRender = 2 ,
  kFromUnderlay = 10 , kFromImageBGRA32 = 11 , kFromPdfUnderlay = kFromOleObject , kFromFile = kFromDwg
}
 
enum  TransparencyMode { kTransparencyDef = -1 , kTransparencyOff = 0 , kTransparency1Bit = 1 , kTransparency8Bit = 2 }
 
typedef struct OdGiRasterImage::tagPixelFormatInfo PixelFormatInfo
 

Detailed Description

This raster image transformer class converts image colors into monochrome.

Corresponding C++ library: TD_Gi

Remarks
Transforming an image does not affect the orignal.

<group OdGi_Classes>

Definition at line 1193 of file GiRasterWrappers.h.

Constructor & Destructor Documentation

◆ OdGiMonochromaticRasterTransformer()

OdGiMonochromaticRasterTransformer::OdGiMonochromaticRasterTransformer ( )

◆ ~OdGiMonochromaticRasterTransformer()

virtual OdGiMonochromaticRasterTransformer::~OdGiMonochromaticRasterTransformer ( )
virtual

Member Function Documentation

◆ clone()

OdRxObjectPtr OdGiMonochromaticRasterTransformer::clone ( ) const
virtual

Creates a clone of this object, and returns a pointer to the clone.

Reimplemented from OdGiGrayscaleRasterTransformer.

◆ colorXform()

virtual ODCOLORREF OdGiMonochromaticRasterTransformer::colorXform ( ODCOLORREF  color) const
protectedvirtual

Reimplemented from OdGiGrayscaleRasterTransformer.

◆ copyFrom()

void OdGiMonochromaticRasterTransformer::copyFrom ( const OdRxObject pSource)
virtual

Copies data of a source object to the current object.

Parameters
pSource[in] Input source object.

Reimplemented from OdGiGrayscaleRasterTransformer.

◆ createObject()

static OdGiRasterImagePtr OdGiMonochromaticRasterTransformer::createObject ( const OdGiRasterImage pOrig,
int  threshold = 127 
)
static

Creates a new monochromatic image transformer.

Parameters
pOrig[in] Original raster image pointer.
threshold[in] Threshold between light and dark image components.

◆ setThreshold()

void OdGiMonochromaticRasterTransformer::setThreshold ( OdUInt8  treshold)
inline

Sets a threshold value to this object.

Parameters
treshold[in] Input threshold value.

Definition at line 1221 of file GiRasterWrappers.h.

◆ threshold()

int OdGiMonochromaticRasterTransformer::threshold ( ) const
inline

Returns the threshold value of this object.

Definition at line 1225 of file GiRasterWrappers.h.


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