KlassenKlassenKlassenKlassen | | | | Operatoren

paint_regionpaint_regionPaintRegionpaint_regionPaintRegionPaintRegion (Operator)

Name

paint_regionpaint_regionPaintRegionpaint_regionPaintRegionPaintRegion — Zeichnet Regionen in ein Bild ein.

Signatur

paint_region(Region, Image : ImageResult : Grayval, Type : )

Herror paint_region(const Hobject Region, const Hobject Image, Hobject* ImageResult, double Grayval, const char* Type)

Herror T_paint_region(const Hobject Region, const Hobject Image, Hobject* ImageResult, const Htuple Grayval, const Htuple Type)

Herror paint_region(Hobject Region, Hobject Image, Hobject* ImageResult, const HTuple& Grayval, const HTuple& Type)

HImage HRegion::PaintRegion(const HImage& Image, const HTuple& Grayval, const HTuple& Type) const

HImage HRegionArray::PaintRegion(const HImage& Image, const HTuple& Grayval, const HTuple& Type) const

void PaintRegion(const HObject& Region, const HObject& Image, HObject* ImageResult, const HTuple& Grayval, const HTuple& Type)

HImage HImage::PaintRegion(const HRegion& Region, const HTuple& Grayval, const HString& Type) const

HImage HImage::PaintRegion(const HRegion& Region, double Grayval, const HString& Type) const

HImage HImage::PaintRegion(const HRegion& Region, double Grayval, const char* Type) const

HImage HRegion::PaintRegion(const HImage& Image, const HTuple& Grayval, const HString& Type) const

HImage HRegion::PaintRegion(const HImage& Image, double Grayval, const HString& Type) const

HImage HRegion::PaintRegion(const HImage& Image, double Grayval, const char* Type) const

void HOperatorSetX.PaintRegion(
[in] IHUntypedObjectX* Region, [in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*ImageResult, [in] VARIANT Grayval, [in] VARIANT Type)

IHImageX* HImageX.PaintRegion(
[in] IHRegionX* Region, [in] VARIANT Grayval, [in] BSTR Type)

IHImageX* HRegionX.PaintRegion(
[in] IHImageX* Image, [in] VARIANT Grayval, [in] BSTR Type)

static void HOperatorSet.PaintRegion(HObject region, HObject image, out HObject imageResult, HTuple grayval, HTuple type)

HImage HImage.PaintRegion(HRegion region, HTuple grayval, string type)

HImage HImage.PaintRegion(HRegion region, double grayval, string type)

HImage HRegion.PaintRegion(HImage image, HTuple grayval, string type)

HImage HRegion.PaintRegion(HImage image, double grayval, string type)

Beschreibung

paint_regionpaint_regionPaintRegionpaint_regionPaintRegionPaintRegion zeichnet die Regionen aus RegionRegionRegionRegionRegionregion in das Bild ImageImageImageImageImageimage mit den vorgegebenen Grauwerten GrayvalGrayvalGrayvalGrayvalGrayvalgrayval ein und liefert das Ergebnis in ImageResultImageResultImageResultImageResultImageResultimageResult zurück. Die Grauwerte können entweder einmal für jeden Bildkanal, geltend für alle Regionen, definiert werden, oder für jede Region und jeden Bildkanal einzeln. Um Letzteres zu definieren, werden die Kanal-Grauwerte g zu jeder Region gruppiert und zu einem Tupel entsprechend der Reihenfolge der Regionen verknüpft, z.B. für ein dreikanaliges Bild:

  [g(channel1,region1), g(channel2,region1), g(channel3,region1), g(channel1,region2), ... ].

Ist das Eingabebild vom Typ 'direction', werden Grauwerte, die nicht innerhalb des für 'direction'-Bilder erlaubten Wertebereichs liegen, auf den Wert 255 gesetzt, um sie als ungültig zu kennzeichnen. Der Parameter TypeTypeTypeTypeTypetype gibt an, ob die Regionen ausgefüllt ('fill'"fill""fill""fill""fill""fill") oder nur der Rand ('margin'"margin""margin""margin""margin""margin") eingetragen werden soll.

Als Alternative zu paint_regionpaint_regionPaintRegionpaint_regionPaintRegionPaintRegion zeichnet der Operator overpaint_regionoverpaint_regionOverpaintRegionoverpaint_regionOverpaintRegionOverpaintRegion die Regionen direkt in ImageImageImageImageImageimage ein.

Parallelisierung

Parameter

RegionRegionRegionRegionRegionregion (input_object)  region(-array) objectHRegionHRegionHRegionHRegionXHobject

Regionen, die eingezeichnet werden sollen.

ImageImageImageImageImageimage (input_object)  (multichannel-)image objectHImageHImageHImageHImageXHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex)

Bild, in das die Regionen eingezeichnet werden.

ImageResultImageResultImageResultImageResultImageResultimageResult (output_object)  image objectHImageHImageHImageHImageXHobject * (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex)

Bild, in das die Regionen eingezeichnet wurden.

GrayvalGrayvalGrayvalGrayvalGrayvalgrayval (input_control)  number(-array) HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Mit diesen Grauwerten werden die Regionen in ImageResultImageResultImageResultImageResultImageResultimageResult eingetragen.

Defaultwert: 255.0

Wertevorschläge: 0.0, 1.0, 2.0, 5.0, 10.0, 16.0, 32.0, 64.0, 128.0, 253.0, 254.0, 255.0

TypeTypeTypeTypeTypetype (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Regionen ausfüllen oder nur den Rand eintragen.

Defaultwert: 'fill' "fill" "fill" "fill" "fill" "fill"

Werteliste: 'fill'"fill""fill""fill""fill""fill", 'margin'"margin""margin""margin""margin""margin"

Beispiel (HDevelop)

* Paint a rectangle into the image 'monkey'

read_image(Image,'monkey')
gen_rectangle1(Rectangle,100.0,100.0,300.0,300.0)
* paint a white rectangle
paint_region(Rectangle,Image,ImageResult,255.0,'fill')

Beispiel (C)

/* Paint a rectangle into the image 'monkey'  */

read_image(&Image,"monkey");
gen_rectangle1(&Rectangle,100.0,100.0,300.0,300.0);
/* paint a white rectangle */
paint_region(Rectangle,Image,&ImageResult,255.0,"fill");

Beispiel (HDevelop)

* Paint a rectangle into the image 'monkey'

read_image(Image,'monkey')
gen_rectangle1(Rectangle,100.0,100.0,300.0,300.0)
* paint a white rectangle
paint_region(Rectangle,Image,ImageResult,255.0,'fill')

Beispiel (HDevelop)

* Paint a rectangle into the image 'monkey'

read_image(Image,'monkey')
gen_rectangle1(Rectangle,100.0,100.0,300.0,300.0)
* paint a white rectangle
paint_region(Rectangle,Image,ImageResult,255.0,'fill')

Beispiel (HDevelop)

* Paint a rectangle into the image 'monkey'

read_image(Image,'monkey')
gen_rectangle1(Rectangle,100.0,100.0,300.0,300.0)
* paint a white rectangle
paint_region(Rectangle,Image,ImageResult,255.0,'fill')

Beispiel (HDevelop)

* Paint a rectangle into the image 'monkey'

read_image(Image,'monkey')
gen_rectangle1(Rectangle,100.0,100.0,300.0,300.0)
* paint a white rectangle
paint_region(Rectangle,Image,ImageResult,255.0,'fill')

Ergebnis

Sind die Parameterwerte korrekt, dann liefert paint_regionpaint_regionPaintRegionpaint_regionPaintRegionPaintRegion den Wert 2 (H_MSG_TRUE). Das Verhalten bei leerer Eingabe (keine Eingaberegionen vorhanden) lässt sich mittels set_system(::'no_object_result',<Result>:)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>) festlegen. Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

read_imageread_imageReadImageread_imageReadImageReadImage, gen_image_constgen_image_constGenImageConstgen_image_constGenImageConstGenImageConst, gen_image_protogen_image_protoGenImageProtogen_image_protoGenImageProtoGenImageProto, reduce_domainreduce_domainReduceDomainreduce_domainReduceDomainReduceDomain

Alternativen

set_grayvalset_grayvalSetGrayvalset_grayvalSetGrayvalSetGrayval, overpaint_regionoverpaint_regionOverpaintRegionoverpaint_regionOverpaintRegionOverpaintRegion, paint_xldpaint_xldPaintXldpaint_xldPaintXldPaintXld

Siehe auch

reduce_domainreduce_domainReduceDomainreduce_domainReduceDomainReduceDomain, paint_graypaint_grayPaintGraypaint_grayPaintGrayPaintGray, overpaint_grayoverpaint_grayOverpaintGrayoverpaint_grayOverpaintGrayOverpaintGray, set_drawset_drawSetDrawset_drawSetDrawSetDraw, gen_image_constgen_image_constGenImageConstgen_image_constGenImageConstGenImageConst

Modul

Foundation


KlassenKlassenKlassenKlassen | | | | Operatoren