convert_coordinates_window_to_imageT_convert_coordinates_window_to_imageConvertCoordinatesWindowToImageConvertCoordinatesWindowToImageconvert_coordinates_window_to_image (Operator)

Name

convert_coordinates_window_to_imageT_convert_coordinates_window_to_imageConvertCoordinatesWindowToImageConvertCoordinatesWindowToImageconvert_coordinates_window_to_image — Konvertieren von Fensterkoordinaten in Bildkoordinaten

Signatur

convert_coordinates_window_to_image( : : WindowHandle, RowWindow, ColumnWindow : RowImage, ColumnImage)

Herror T_convert_coordinates_window_to_image(const Htuple WindowHandle, const Htuple RowWindow, const Htuple ColumnWindow, Htuple* RowImage, Htuple* ColumnImage)

void ConvertCoordinatesWindowToImage(const HTuple& WindowHandle, const HTuple& RowWindow, const HTuple& ColumnWindow, HTuple* RowImage, HTuple* ColumnImage)

void HWindow::ConvertCoordinatesWindowToImage(const HTuple& RowWindow, const HTuple& ColumnWindow, HTuple* RowImage, HTuple* ColumnImage) const

void HWindow::ConvertCoordinatesWindowToImage(double RowWindow, double ColumnWindow, double* RowImage, double* ColumnImage) const

static void HOperatorSet.ConvertCoordinatesWindowToImage(HTuple windowHandle, HTuple rowWindow, HTuple columnWindow, out HTuple rowImage, out HTuple columnImage)

void HWindow.ConvertCoordinatesWindowToImage(HTuple rowWindow, HTuple columnWindow, out HTuple rowImage, out HTuple columnImage)

void HWindow.ConvertCoordinatesWindowToImage(double rowWindow, double columnWindow, out double rowImage, out double columnImage)

def convert_coordinates_window_to_image(window_handle: HHandle, row_window: MaybeSequence[float], column_window: MaybeSequence[float]) -> Tuple[Sequence[float], Sequence[float]]

def convert_coordinates_window_to_image_s(window_handle: HHandle, row_window: MaybeSequence[float], column_window: MaybeSequence[float]) -> Tuple[float, float]

Beschreibung

convert_coordinates_window_to_imageconvert_coordinates_window_to_imageConvertCoordinatesWindowToImageConvertCoordinatesWindowToImageConvertCoordinatesWindowToImageconvert_coordinates_window_to_image konvertiert Fensterkoordinaten RowWindowRowWindowRowWindowRowWindowrowWindowrow_window und ColumnWindowColumnWindowColumnWindowColumnWindowcolumnWindowcolumn_window in Bildkoordinaten RowImageRowImageRowImageRowImagerowImagerow_image und ColumnImageColumnImageColumnImageColumnImagecolumnImagecolumn_image basierend auf dem Bildausschnitt und der Fenstergröße des durch WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle gegebenen Fensters.

Ausführungsinformationen

Parameter

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (input_control)  window HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Fenster-Handle.

RowWindowRowWindowRowWindowRowWindowrowWindowrow_window (input_control)  coordinates.y(-array) HTupleMaybeSequence[float]HTupleHtuple (real) (double) (double) (double)

Zeile (Y) in Fensterkoordinaten.

ColumnWindowColumnWindowColumnWindowColumnWindowcolumnWindowcolumn_window (input_control)  coordinates.x(-array) HTupleMaybeSequence[float]HTupleHtuple (real) (double) (double) (double)

Spalte (X) in Fensterkoordinaten.

RowImageRowImageRowImageRowImagerowImagerow_image (output_control)  coordinates.y(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Zeile in Bildkoordinaten.

ColumnImageColumnImageColumnImageColumnImagecolumnImagecolumn_image (output_control)  coordinates.x(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Spalte in Bildkoordinaten.

Beispiel (HDevelop)

read_image (Image, 'printer_chip/printer_chip_01')
dev_get_window (WindowHandle)
get_window_extents (WindowHandle, Row, Column, Width, Height)
dev_set_part (450, 300, 750, 600)
dev_display (Image)
*
* Generate rectangle in image coordinates
Row := [474, 746]
Column := [314, 589]
gen_rectangle1 (Rectangle1, Row[0], Column[0], Row[1], Column[1])
* Convert rectangle corner points to window coordinates
convert_coordinates_image_to_window (WindowHandle, Row[[0,1,0,1]], \
    Column[[0,0,1,1]], RowWindow, ColumnWindow)
*
* Window center in window coordinates
WindowCenterRow := Height/2-1
WindowCenterColumn := Width/2-1
* Convert window center to image coordinates
convert_coordinates_window_to_image (WindowHandle, WindowCenterRow, \
    WindowCenterColumn, RowImage, ColumnImage)
*
* Display all points in image coordinates
dev_display (Image)
disp_cross (WindowHandle, Row[[0,1,0,1]], Column[[0,0,1,1]], 6, rad(45))
disp_cross (WindowHandle, RowImage, ColumnImage, 6, 0)

Ergebnis

convert_coordinates_window_to_imageconvert_coordinates_window_to_imageConvertCoordinatesWindowToImageConvertCoordinatesWindowToImageConvertCoordinatesWindowToImageconvert_coordinates_window_to_image liefert den Wert TRUE, falls das Fenster gültig ist. Ansonsten wird eine Fehlerbehandlung durchgeführt.

Vorgänger

set_window_extentsset_window_extentsSetWindowExtentsSetWindowExtentsSetWindowExtentsset_window_extents, set_partset_partSetPartSetPartSetPartset_part

Siehe auch

convert_coordinates_image_to_windowconvert_coordinates_image_to_windowConvertCoordinatesImageToWindowConvertCoordinatesImageToWindowConvertCoordinatesImageToWindowconvert_coordinates_image_to_window

Modul

Foundation