Skip to content

read_contour_xld_arc_inforead_contour_xld_arc_infoReadContourXldArcInfoReadContourXldArcInforead_contour_xld_arc_inforead_contour_xld_arc_info🔗

Short description🔗

read_contour_xld_arc_inforead_contour_xld_arc_infoReadContourXldArcInfoReadContourXldArcInforead_contour_xld_arc_inforead_contour_xld_arc_info — Read XLD contours to a file in ARC/INFO generate format.

Signature🔗

read_contour_xld_arc_info( out xld_cont Contours, filename.read FileName )read_contour_xld_arc_info( : Contours : FileName : )void ReadContourXldArcInfo( HObject* Contours, const HTuple& FileName )static void HOperatorSet.ReadContourXldArcInfo( out HObject contours, HTuple fileName )def read_contour_xld_arc_info( file_name: str ) -> HObject

Herror read_contour_xld_arc_info( Hobject* Contours, const char* FileName )

Herror T_read_contour_xld_arc_info( Hobject* Contours, const Htuple FileName )

void HXLDCont::ReadContourXldArcInfo( const HString& FileName )

void HXLDCont::ReadContourXldArcInfo( const char* FileName )

void HXLDCont::ReadContourXldArcInfo( const wchar_t* FileName ) (Windows only)

void HXLDCont.ReadContourXldArcInfo( string fileName )

Description🔗

read_contour_xld_arc_infoReadContourXldArcInfo reads the lines stored in ARC/INFO generate format in the file FileNamefileNamefile_name, and returns them as XLD contours in Contourscontourscontours. To find the file FileNamefileNamefile_name, all directories contained in the HALCON system variable 'image_dir'"image_dir" (usually this is the content of the environment variable HALCONIMAGES) are searched (see read_imageReadImage). The returned contours are in world coordinates. They can be transformed to the image coordinate system with the operator affine_trans_contour_xldAffineTransContourXld. The necessary transformation matrix can be generated by using read_world_fileReadWorldFile to read the transformation matrix from image to world coordinates, and inverting this matrix by calling hom_mat2d_invertHomMat2dInvert.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

Contourscontourscontours (output_object) xld_cont(-array) → objectobjectHObjectHXLDContHObjectHobject *

Read XLD contours.

FileNamefileNamefile_name (input_control) filename.read → (string)(string)HTuple (HString)HTuple (string)strHtuple (char*)

Name of the ARC/INFO file.

Example🔗

(HDevelop)


* Read the transformation and invert it
read_world_file ('image.tfw', WorldTransformation)
hom_mat2d_invert (WorldTransformation, ImageTransformation)
* Read the image
read_image (Image, 'image.tif')
* Read the line data
read_contour_xld_arc_info (LinesWorld, 'lines.gen')
* Transform the line data to image coordinates
affine_trans_contour_xld (LinesWorld, Lines, ImageTransformation)

Result🔗

If the parameters are correct and the file could be read, the operator read_contour_xld_arc_infoReadContourXldArcInfo returns the value 2 (H_MSG_TRUE). Otherwise an exception is raised.

Combinations with other operators🔗

Combinations

Possible successors

hom_mat2d_invertHomMat2dInvert, affine_trans_contour_xldAffineTransContourXld

See also

read_world_fileReadWorldFile, write_contour_xld_arc_infoWriteContourXldArcInfo, read_polygon_xld_arc_infoReadPolygonXldArcInfo

Module🔗

Foundation