overpaint_grayoverpaint_grayOverpaintGrayOverpaintGray (Operator)
Name
overpaint_grayoverpaint_grayOverpaintGrayOverpaintGray
— Überschreibt die Grauwerte eines Bildes.
Signatur
Beschreibung
overpaint_grayoverpaint_grayOverpaintGrayOverpaintGrayOverpaintGray
zeichnet die Grauwerte des Bildes aus
ImageSourceImageSourceImageSourceImageSourceimageSource
in das Bild in ImageDestinationImageDestinationImageDestinationImageDestinationimageDestination
ein. Kopiert werden nur die Grauwerte aus dem Definitionsbereich
von ImageSourceImageSourceImageSourceImageSourceimageSource
(siehe reduce_domainreduce_domainReduceDomainReduceDomainReduceDomain
).
Als Alternative zu overpaint_grayoverpaint_grayOverpaintGrayOverpaintGrayOverpaintGray
zeichnet der Operator
paint_graypaint_grayPaintGrayPaintGrayPaintGray
die Grauwerte nicht direkt in ImageDestinationImageDestinationImageDestinationImageDestinationimageDestination
ein, sondern gibt das Ergebnis in einem neu erzeugten Bild zurück.
Achtung
overpaint_grayoverpaint_grayOverpaintGrayOverpaintGrayOverpaintGray
verändert den Inhalt eines bereits bestehenden Bildes
(ImageDestinationImageDestinationImageDestinationImageDestinationimageDestination
). Zudem können aber auch andere Bildobjekte
betroffen sein: Wenn man z.B. ImageDestinationImageDestinationImageDestinationImageDestinationimageDestination
mit Hilfe von
copy_objcopy_objCopyObjCopyObjCopyObj
aus einem anderen Bildobjekt erzeugt hat (oder umgekehrt),
wird auch dessen Bildmatrix überschrieben. Deshalb sollte
overpaint_grayoverpaint_grayOverpaintGrayOverpaintGrayOverpaintGray
nur zum Einzeichnen in neu erzeugte Bildobjekte
verwendet werden. Typische Operatoren hierfür sind z.B.
gen_image_constgen_image_constGenImageConstGenImageConstGenImageConst
(erzeugt ein neues Bild mit angegebener Größe),
gen_image_protogen_image_protoGenImageProtoGenImageProtoGenImageProto
(erzeugt ein Bild mit der Größe eines angegebenen
Prototyp-Bildes) oder copy_imagecopy_imageCopyImageCopyImageCopyImage
(erzeugt ein Bild als Kopie eines
angegebenen Bildes).
Ausführungsinformationen
- Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
- Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
- Wird ohne Parallelisierung verarbeitet.
Dieser Operator modifiziert den Zustand des folgenden Eingabeparameters:
Während der Ausführung dieses Operators muss der Zugriff auf den Wert dieses Parameters synchronisiert werden, wenn er über mehrere Threads hinweg verwendet wird.
Parameter
ImageDestinationImageDestinationImageDestinationImageDestinationimageDestination
(input_object, Zustand wird modifiziert) (multichannel-)image →
objectHImageHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)
Eingabebild, in das eingezeichnet werden soll.
ImageSourceImageSourceImageSourceImageSourceimageSource
(input_object) (multichannel-)image →
objectHImageHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)
Eingabebild, das die zusätzlichen Grauwerte liefert.
Beispiel (HDevelop)
* Copy a circular part of the image 'monkey' into a new image (New1):
read_image(Image,'monkey')
gen_circle(Circle,200,200,150)
reduce_domain(Image,Circle,Mask)
* New image with black (0) background
gen_image_proto(Image,New1,0.0)
* Copy a part of the image 'monkey' into New1
overpaint_gray(New1,Mask)
Beispiel (C)
/* Copy a circular part of the image 'monkey' into a new image (New1): */
read_image(&Image,"monkey");
gen_circle(&Circle,200.0,200.0,150.0);
reduce_domain(Image,Circle,&Mask);
/* New image with black (0) background */
gen_image_proto(Image,&New1,0.0);
/* Copy a part of the image 'monkey' into New1 */
overpaint_gray(New1,Mask);
Beispiel (HDevelop)
* Copy a circular part of the image 'monkey' into a new image (New1):
read_image(Image,'monkey')
gen_circle(Circle,200,200,150)
reduce_domain(Image,Circle,Mask)
* New image with black (0) background
gen_image_proto(Image,New1,0.0)
* Copy a part of the image 'monkey' into New1
overpaint_gray(New1,Mask)
Beispiel (HDevelop)
* Copy a circular part of the image 'monkey' into a new image (New1):
read_image(Image,'monkey')
gen_circle(Circle,200,200,150)
reduce_domain(Image,Circle,Mask)
* New image with black (0) background
gen_image_proto(Image,New1,0.0)
* Copy a part of the image 'monkey' into New1
overpaint_gray(New1,Mask)
Beispiel (HDevelop)
* Copy a circular part of the image 'monkey' into a new image (New1):
read_image(Image,'monkey')
gen_circle(Circle,200,200,150)
reduce_domain(Image,Circle,Mask)
* New image with black (0) background
gen_image_proto(Image,New1,0.0)
* Copy a part of the image 'monkey' into New1
overpaint_gray(New1,Mask)
Ergebnis
Sind die Parameterwerte korrekt, liefert overpaint_grayoverpaint_grayOverpaintGrayOverpaintGrayOverpaintGray
den Wert 2 (H_MSG_TRUE). Gegebenenfalls wird eine Fehlerbehandlung
durchgeführt.
Vorgänger
read_imageread_imageReadImageReadImageReadImage
,
gen_image_constgen_image_constGenImageConstGenImageConstGenImageConst
,
gen_image_protogen_image_protoGenImageProtoGenImageProtoGenImageProto
Alternativen
get_image_pointer1get_image_pointer1GetImagePointer1GetImagePointer1GetImagePointer1
,
paint_graypaint_grayPaintGrayPaintGrayPaintGray
,
set_grayvalset_grayvalSetGrayvalSetGrayvalSetGrayval
,
copy_imagecopy_imageCopyImageCopyImageCopyImage
Siehe auch
paint_regionpaint_regionPaintRegionPaintRegionPaintRegion
,
overpaint_regionoverpaint_regionOverpaintRegionOverpaintRegionOverpaintRegion
Modul
Foundation