Compare commits
28 Commits
stable_ver
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 5e76a06623 | |||
| ad3ff333c7 | |||
| cba4629927 | |||
| 091257d18e | |||
| 709ea0f6fd | |||
| 1ba0432ad2 | |||
| 9394384cd8 | |||
| 5daf7b6bf2 | |||
| eeee1a2252 | |||
| 70eef15dba | |||
| f13a8d6b71 | |||
| f52498030c | |||
| c967a2daec | |||
| 100734144e | |||
| fa00a0b3f0 | |||
| a212ca4d4d | |||
| c30ae1e12d | |||
| 280c86e73a | |||
| 2e4c5a8d07 | |||
| ca3faa5f85 | |||
| 2894a4d91a | |||
| 812ffa1148 | |||
| 9bfe3ad683 | |||
| a8552c6223 | |||
| 79789ac53f | |||
| 8405ee3d1b | |||
| 863ff21036 | |||
| a4d8c793b8 |
7
.gitignore
vendored
7
.gitignore
vendored
@ -7,3 +7,10 @@ Makefile.*
|
||||
*.pro.user*
|
||||
*.pro.user
|
||||
.idea
|
||||
*.exe
|
||||
*.dll
|
||||
*.qm
|
||||
*.onnx
|
||||
*.bmp
|
||||
opencv*
|
||||
opencv
|
||||
|
||||
39
Include/ClassicMIL/MILDyn.h
Normal file
39
Include/ClassicMIL/MILDyn.h
Normal file
@ -0,0 +1,39 @@
|
||||
//==============================================================================
|
||||
// Filename: MILDYN.h
|
||||
// Created by: Matrox Imaging.
|
||||
// Content: This file was dynamically created by the MIL installation program.
|
||||
// COPYRIGHT (c) Matrox Electronic Systems Ltd.
|
||||
// All Rights Reserved
|
||||
//==============================================================================
|
||||
// Revision: 10.60.777
|
||||
|
||||
#define M_MIL_LITE 0
|
||||
#include <ClassicMIL/MILDyn/mil3dblob.h>
|
||||
#include <ClassicMIL/MILDyn/mil3ddisp.h>
|
||||
#include <ClassicMIL/MILDyn/mil3dgeo.h>
|
||||
#include <ClassicMIL/MILDyn/mil3dgra.h>
|
||||
#include <ClassicMIL/MILDyn/mil3dim.h>
|
||||
#include <ClassicMIL/MILDyn/mil3dmap.h>
|
||||
#include <ClassicMIL/MILDyn/mil3dmet.h>
|
||||
#include <ClassicMIL/MILDyn/mil3dmod.h>
|
||||
#include <ClassicMIL/MILDyn/mil3dreg.h>
|
||||
#include <ClassicMIL/MILDyn/milagm.h>
|
||||
#include <ClassicMIL/MILDyn/milbead.h>
|
||||
#include <ClassicMIL/MILDyn/milblob.h>
|
||||
#include <ClassicMIL/MILDyn/milcal.h>
|
||||
#include <ClassicMIL/MILDyn/milclass.h>
|
||||
#include <ClassicMIL/MILDyn/milcode.h>
|
||||
#include <ClassicMIL/MILDyn/milcolor.h>
|
||||
#include <ClassicMIL/MILDyn/milcom.h>
|
||||
#include <ClassicMIL/MILDyn/mildisplay.h>
|
||||
#include <ClassicMIL/MILDyn/mildmr.h>
|
||||
#include <ClassicMIL/MILDyn/miledge.h>
|
||||
#include <ClassicMIL/MILDyn/milim.h>
|
||||
#include <ClassicMIL/MILDyn/milmeas.h>
|
||||
#include <ClassicMIL/MILDyn/milmetrol.h>
|
||||
#include <ClassicMIL/MILDyn/milmod.h>
|
||||
#include <ClassicMIL/MILDyn/milocr.h>
|
||||
#include <ClassicMIL/MILDyn/milpat.h>
|
||||
#include <ClassicMIL/MILDyn/milreg.h>
|
||||
#include <ClassicMIL/MILDyn/milstr.h>
|
||||
#include <ClassicMIL/MILDyn/PFNC.h>
|
||||
1207
Include/ClassicMIL/MILDyn/PFNC.h
Normal file
1207
Include/ClassicMIL/MILDyn/PFNC.h
Normal file
File diff suppressed because it is too large
Load Diff
883
Include/ClassicMIL/MILDyn/mil3dblob.h
Normal file
883
Include/ClassicMIL/MILDyn/mil3dblob.h
Normal file
@ -0,0 +1,883 @@
|
||||
//==============================================================================
|
||||
//!
|
||||
//! \brief Mil3dblob CAPI header (M3dblob...)
|
||||
//!
|
||||
//! AUTHOR: Matrox Imaging
|
||||
//!
|
||||
//! COPYRIGHT NOTICE:
|
||||
//! Copyright (c) Matrox Electronic Systems Ltd., 1992-2023.
|
||||
//! All Rights Reserved
|
||||
// Revision: 10.60.0776
|
||||
//==============================================================================
|
||||
|
||||
#ifndef __MIL_3DBLOB_H__
|
||||
#define __MIL_3DBLOB_H__
|
||||
|
||||
|
||||
#if (!M_MIL_LITE) /* MIL FULL ONLY */
|
||||
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
// M3dblobAlloc ContextTypes
|
||||
#define M_SEGMENTATION_CONTEXT 5055L
|
||||
#define M_DRAW_3D_CONTEXT 3815 // already defined in mil3dmap.h
|
||||
#define M_CALCULATE_CONTEXT 5269L
|
||||
|
||||
//==============================================================================
|
||||
// Indexing, used in other M3dblob functions (M3dblobInquire(), M3dblobControl(), ...)
|
||||
#define M_DEFAULT 0x10000000L // already defined
|
||||
#define M_CONTEXT 0x08000000L // already defined
|
||||
#define M_GENERAL 0x20000000L // already defined
|
||||
#define M_ALL 0x40000000L // already defined
|
||||
|
||||
#define M_ANY 0x11000000L // already defined
|
||||
|
||||
#define M_ALL_BLOBS 0x40000000L // already defined in milblob.h
|
||||
#define M_BLOB_LABEL(BlobLabel) (BlobLabel) // already defined in milblob.h
|
||||
#define M_BLOB_INDEX_FLAG 0x04000000L // already defined in milblob.h
|
||||
#define M_BLOB_INDEX(BlobIndex) ((BlobIndex) | M_BLOB_INDEX_FLAG) // already defined in milblob.h
|
||||
|
||||
|
||||
#define M_MODIFICATION_COUNT 5010L // already defined
|
||||
|
||||
//==============================================================================
|
||||
#define M_ALLOCATION_FAILURE_REAL_TEST_FLAG 971L // also in milblob.h, milstr.h
|
||||
|
||||
//==============================================================================
|
||||
//M3dblobCopyResult
|
||||
#define M_LABEL_IMAGE 5044L
|
||||
#define M_INDEX_IMAGE 5046L
|
||||
#define M_MASK_IMAGE 1020L // already defined in milreg.h
|
||||
#define M_RESULT 0x00001000L // already defined in milmod.h
|
||||
|
||||
// M3dblobExtract
|
||||
#define M_APPLY_TO_ALL_COMPONENTS 0x0001000L // already defined in mil3dim.h
|
||||
#define M_ALLOW_CHILD 0x0002000L
|
||||
#define M_SAME -1L // already defined
|
||||
#define M_UNORGANIZED 1919L // already defined in mil3dmap.h
|
||||
#define M_SHRINK 3409 // already defined in mil3dim.h
|
||||
#define M_SHRINK_VERTICALLY 5438L
|
||||
|
||||
// M3dblobSelect
|
||||
#define M_IN_RANGE 1L // already defined in mil.h
|
||||
#define M_OUT_RANGE 2L // already defined in mil.h
|
||||
#define M_EQUAL 3L // already defined in mil.h
|
||||
#define M_NOT_EQUAL 4L // already defined in mil.h
|
||||
#define M_GREATER 5L // already defined in mil.h
|
||||
#define M_LESS 6L // already defined in mil.h
|
||||
#define M_GREATER_OR_EQUAL 7L // already defined in mil.h
|
||||
#define M_LESS_OR_EQUAL 8L // already defined in mil.h
|
||||
#define M_NOT_AVAILABLE 5511L
|
||||
|
||||
// M3dblobSort
|
||||
#define M_INFINITE -1L // already defined in mil.h
|
||||
#define M_FRONT 0x00000010L
|
||||
#define M_BACK 0x00000020L
|
||||
#define M_UP 0x00000000L // already defined in milblob.h
|
||||
#define M_DOWN 0x08000000L // already defined in milblob.h
|
||||
#define M_FEATURE_REQUIRED 4L
|
||||
|
||||
// M3dblobCombine
|
||||
#define M_SUB 0x0001L // already defined in milim.h
|
||||
#define M_OR 0x0016L // already defined in milim.h
|
||||
#define M_AND 0x0017L // already defined in milim.h
|
||||
#define M_XOR 0x0018L // already defined in milim.h
|
||||
|
||||
// M3dblobSegment
|
||||
#define M_SEGMENTATION_CONTEXT_WHOLE_IMAGE (M_3DBLOB_PSEUDO_ID + M_WHOLE_IMAGE)
|
||||
#define M_SEGMENTATION_CONTEXT_LABEL_IMAGE (M_3DBLOB_PSEUDO_ID + M_LABEL_IMAGE)
|
||||
|
||||
|
||||
|
||||
//==============================================================================
|
||||
// M3dblobControl / M3dblobInquire
|
||||
// Segmentation context
|
||||
#define M_NUMBER_OF_POINTS_MIN 5060L
|
||||
#define M_NUMBER_OF_POINTS_MAX 5062L
|
||||
#define M_MAX_DISTANCE 12L // already defined in milcol.h
|
||||
#define M_NORMAL_DISTANCE_MAX 5075L
|
||||
#define M_NORMAL_DISTANCE_MODE 5212L
|
||||
#define M_COLOR_DISTANCE_MAX 5081L
|
||||
#define M_COLOR_DISTANCE_MODE 5211L
|
||||
#define M_CUSTOM_DISTANCE_MAX 5084L
|
||||
#define M_CUSTOM_DISTANCE_COMPONENT 5232L
|
||||
#define M_GLOBAL_NORMAL_DISTANCE_MAX 5586L
|
||||
#define M_GLOBAL_PLANE_DISTANCE_MAX 5587L
|
||||
#define M_MAX_DISTANCE_MODE 5757L
|
||||
#define M_NORMAL_DISTANCE_MAX_MODE 5758L
|
||||
#define M_NEIGHBOR_SEARCH_MODE 3041L // already defined in mil3dim.h
|
||||
#define M_TREE 3042L // already defined in mil3dim.h
|
||||
#define M_ORGANIZED 3418 // already defined in mil3dim.h
|
||||
#define M_MESH 3994 // already defined in mil3dim.h
|
||||
#define M_MAXIMUM_NUMBER_NEIGHBORS 3316 // already defined in mil3dim.h
|
||||
#define M_NEIGHBORHOOD_ORGANIZED_SIZE 1943L // already defined in mil3dim.h
|
||||
#define M_ORIENTATION 0x00002400L // already defined in milmeas.h
|
||||
#define M_DIRECTION 5229L
|
||||
#define M_RELABEL_CONSECUTIVE 2713L // already defined in milblob.h
|
||||
#define M_SEGMENTATION_MODE 5352L
|
||||
#define M_EUCLIDEAN 2L // already defined in milcol.h
|
||||
#define M_WHOLE_IMAGE 1L // already defined in milblob.h
|
||||
|
||||
// Draw context
|
||||
#define M_ROOT_NODE 0 // already defined in mil3dgra.h
|
||||
#define M_GLOBAL_DRAW_SETTINGS M_CONTEXT
|
||||
#define M_DRAW_BLOBS 0x00000400L // already defined in milblob.h
|
||||
#define M_DRAW_EXCLUDED_POINTS 0x00003000L
|
||||
#define M_DRAW_BOX 0x00000020L // already defined in milblob.h
|
||||
#define M_DRAW_PCA_BOX 0x00006000L
|
||||
#define M_DRAW_PCA 0x00007000L
|
||||
#define M_DRAW_NEAREST_BLOB 0x00009000L
|
||||
#define M_DRAW_SEMI_ORIENTED_BOX 0x0000A000L
|
||||
#define M_DRAW_FERET_MIN 0x00001000L // already defined in milblob.h
|
||||
#define M_DRAW_FERET_MAX 0x00000008L // already defined in milblob.h
|
||||
#define M_DRAW_FERET_GENERAL 0x00100000L // already defined in milblob.h
|
||||
#define M_PSEUDO_COLOR 0x4000L // already defined in milclass.h
|
||||
#define M_PSEUDO_COLOR_OFFSET 5439L
|
||||
#define M_GRAPHIC_LIST_DEFAULT 0x04005526L
|
||||
#define M_ACTIVE 1534L // already defined in milmetrol.h
|
||||
#define M_THICKNESS 3L // already defined in mil3dgra.h
|
||||
#define M_OPACITY 4728 // already defined in mil3dgra.h
|
||||
#define M_APPEARANCE 4679 // already defined in mil3dgra.h
|
||||
#define M_COLOR 0x00000100L // already defined in mil3dgra.h
|
||||
|
||||
|
||||
#define M_ENABLE -9997L // also in mil.h
|
||||
#define M_DISABLE -9999L // also in mil.h
|
||||
|
||||
#define M_AUTO 444L // also in mil.h
|
||||
#define M_USER_DEFINED 21L // also in mil.h
|
||||
|
||||
// Result
|
||||
#define M_RESET 9L // already defined in milblob.h
|
||||
#define M_MERGE 0x00000040L // already defined in milblob.h
|
||||
#define M_INDEX_MODE 5402L // already defined in milblob.h
|
||||
#define M_LABEL 5403L // already defined in milblob.h
|
||||
#define M_INDEX 217L // already defined in milblob.h
|
||||
#define M_USE_MACRO 5404L // already defined in milblob.h
|
||||
|
||||
//==============================================================================
|
||||
// M3dblobInquire
|
||||
// Context
|
||||
#define M_INVALID -1 // also in mil.h
|
||||
|
||||
//==============================================================================
|
||||
// M3dblobAllocResult ResultTypes
|
||||
#define M_SEGMENTATION_RESULT 5263L
|
||||
|
||||
//==============================================================================
|
||||
// M3dblobGetResult ResultTypes
|
||||
#define M_NUMBER 1009L // already defined in milblob.h
|
||||
#define M_MAX_LABEL_VALUE 2939L // already defined in milblob.h
|
||||
#define M_CONTAINER_ID 4675 // already defined in mil3dgra.h
|
||||
#define M_SEGMENTATION_UUID 5228L
|
||||
#define M_RESULT_IMAGE_SIZE_X 5226L // already defined in mil3dmet.h
|
||||
#define M_RESULT_IMAGE_SIZE_Y 5227L // already defined in mil3dmet.h
|
||||
#define M_BLOB_TOUCHING_IMAGE_BORDERS 118L // already defined in milblob.h
|
||||
#define M_TOTAL_NUMBER_OF_POINTS 5331L
|
||||
#define M_INDEX_IMAGE_SIZE_BIT 5355L
|
||||
#define M_LABEL_IMAGE_SIZE_BIT 5356L
|
||||
#define M_FIRST_PIXEL_X 5495L
|
||||
#define M_FIRST_PIXEL_Y 5496L
|
||||
#define M_NUMBER_OF_POINTS M_NUMBER // already defined in mil3dim.h
|
||||
|
||||
#define M_PIXEL_X 3891 // already defined in mil3dim.h
|
||||
#define M_PIXEL_Y 3892 // already defined in mil3dim.h
|
||||
#define M_PIXEL_PACKED 5047L
|
||||
#define M_PIXEL_MIN_X 5048L
|
||||
#define M_PIXEL_MIN_Y 5049L
|
||||
#define M_PIXEL_MAX_X 5050L
|
||||
#define M_PIXEL_MAX_Y 5051L
|
||||
|
||||
#define M_ALL_FEATURES 0x100L // already defined in milblob.h
|
||||
#define M_NEAREST_BLOB 0x0000C000L
|
||||
#define M_NEAREST_BLOB_DISTANCE 5287L
|
||||
#define M_NEAREST_POINT_1 5288L
|
||||
#define M_NEAREST_POINT_X1 5289L
|
||||
#define M_NEAREST_POINT_Y1 5290L
|
||||
#define M_NEAREST_POINT_Z1 5291L
|
||||
#define M_NEAREST_POINT_2 5292L
|
||||
#define M_NEAREST_POINT_X2 5293L
|
||||
#define M_NEAREST_POINT_Y2 5294L
|
||||
#define M_NEAREST_POINT_Z2 5295L
|
||||
|
||||
#define M_PLANARITY 5267L
|
||||
#define M_LINEARITY 5268L
|
||||
#define M_BOUNDING_BOX 0x00000003L // Already defined in mil3dim
|
||||
#define M_PCA_BOX 0x0000D000L
|
||||
#define M_SEMI_ORIENTED_BOX 0x0000E000L
|
||||
#define M_MIN_X 3382 // Already defined in mil3dim
|
||||
#define M_MIN_Y 3383 // Already defined in mil3dim
|
||||
#define M_MIN_Z 3384 // Already defined in mil3dim
|
||||
#define M_MAX_X 3385 // Already defined in mil3dim
|
||||
#define M_MAX_Y 3386 // Already defined in mil3dim
|
||||
#define M_MAX_Z 3387 // Already defined in mil3dim
|
||||
#define M_BOX_CENTER 0x0000B400L // Already defined in mil3dim
|
||||
#define M_BOX_CENTER_X 3445 // Already defined in mil3dim
|
||||
#define M_BOX_CENTER_Y 3446 // Already defined in mil3dim
|
||||
#define M_BOX_CENTER_Z 3447 // Already defined in mil3dim
|
||||
#define M_SIZE_X 1536L // Already defined in mil3dim
|
||||
#define M_SIZE_Y 1537L // Already defined in mil3dim
|
||||
#define M_SIZE_Z 1538L // Already defined in mil3dim
|
||||
#define M_SEMI_ORIENTED_BOX_ANGLE 5360L // Already defined in mil3dim
|
||||
#define M_PCA_BOX_CENTER (M_PCA_BOX | M_BOX_CENTER)
|
||||
#define M_SEMI_ORIENTED_BOX_CENTER (M_SEMI_ORIENTED_BOX | M_BOX_CENTER)
|
||||
|
||||
#define M_FERET_X 72L // already defined in milblob.h
|
||||
#define M_FERET_Y 5L // already defined in milblob.h
|
||||
#define M_FERET_Z 5286L
|
||||
#define M_FERET_MIN_DIAMETER 14L // already defined in milblob.h
|
||||
#define M_FERET_MAX_DIAMETER 16L // already defined in milblob.h
|
||||
#define M_FERET_GENERAL 0x400L // already defined in milblob.h
|
||||
#define M_FERET_AT_PRINCIPAL_AXIS_1 5273L
|
||||
#define M_FERET_AT_PRINCIPAL_AXIS_2 5274L
|
||||
#define M_FERET_AT_PRINCIPAL_AXIS_3 5275L
|
||||
#define M_FERET_SEMI_ORIENTED_WIDTH 5367L
|
||||
#define M_FERET_SEMI_ORIENTED_HEIGHT 5368L
|
||||
#define M_SEMI_ORIENTED_BOX_ELONGATION 5437L
|
||||
|
||||
#define M_FERET_CONTACT_POINTS 0x30000L // already defined in milblob.h
|
||||
#define M_FERET_CONTACT_POINTS_X1 0x50000L // already defined in milblob.h
|
||||
#define M_FERET_CONTACT_POINTS_Y1 0x60000L // already defined in milblob.h
|
||||
#define M_FERET_CONTACT_POINTS_X2 0x70000L // already defined in milblob.h
|
||||
#define M_FERET_CONTACT_POINTS_Y2 0x80000L // already defined in milblob.h
|
||||
#define M_FERET_CONTACT_POINTS_Z1 0x90000L
|
||||
#define M_FERET_CONTACT_POINTS_Z2 0xA0000L
|
||||
#define M_FERET_DIRECTION_X 0xB0000L
|
||||
#define M_FERET_DIRECTION_Y 0xC0000L
|
||||
#define M_FERET_DIRECTION_Z 0xD0000L
|
||||
#define M_FERET_CONTACT_POINT_1 0xE0000L
|
||||
#define M_FERET_CONTACT_POINT_2 0xF0000L
|
||||
#define M_FERET_PRECISION 0x110000L
|
||||
|
||||
#define M_CENTROID 1956L // already defined in mil3dim.h
|
||||
#define M_CENTROID_X 3451 // already defined in mil3dim.h
|
||||
#define M_CENTROID_Y 3452 // already defined in mil3dim.h
|
||||
#define M_CENTROID_Z 3453 // already defined in mil3dim.h
|
||||
#define M_PCA 4855L // already defined in mil3dim.h
|
||||
#define M_MOMENTS 4856L // already defined in mil3dim.h
|
||||
#define M_MOMENT_ORDER 4857L // already defined in mil3dim.h
|
||||
#define M_CENTRAL 0x800L // already defined in mil3dim.h
|
||||
#define M_ORDINARY 0x400L // already defined in mil3dim.h
|
||||
#define M_EIGENVALUE_1 4869L // already defined in mil3dim.h
|
||||
#define M_EIGENVALUE_2 4870L // already defined in mil3dim.h
|
||||
#define M_EIGENVALUE_3 4871L // already defined in mil3dim.h
|
||||
#define M_PRINCIPAL_AXIS_1 4872L // already defined in mil3dim.h
|
||||
#define M_PRINCIPAL_AXIS_2 4873L // already defined in mil3dim.h
|
||||
#define M_PRINCIPAL_AXIS_3 4874L // already defined in mil3dim.h
|
||||
#define M_PRINCIPAL_AXIS_1_X 4875L // already defined in mil3dim.h
|
||||
#define M_PRINCIPAL_AXIS_1_Y 4876L // already defined in mil3dim.h
|
||||
#define M_PRINCIPAL_AXIS_1_Z 4877L // already defined in mil3dim.h
|
||||
#define M_PRINCIPAL_AXIS_2_X 4878L // already defined in mil3dim.h
|
||||
#define M_PRINCIPAL_AXIS_2_Y 4879L // already defined in mil3dim.h
|
||||
#define M_PRINCIPAL_AXIS_2_Z 4880L // already defined in mil3dim.h
|
||||
#define M_PRINCIPAL_AXIS_3_X 4881L // already defined in mil3dim.h
|
||||
#define M_PRINCIPAL_AXIS_3_Y 4882L // already defined in mil3dim.h
|
||||
#define M_PRINCIPAL_AXIS_3_Z 4883L // already defined in mil3dim.h
|
||||
#define M_PCA_MATRIX 4884L // already defined in mil3dim.h
|
||||
#define M_COVARIANCE_MATRIX 4885L // already defined in mil3dim.h
|
||||
#define M_FIXTURING_MATRIX 3878L // already defined in mil3dim.h
|
||||
#define M_APPROX_PRINCIPAL_AXIS_1_X 5322L // already defined in mil3dim.h
|
||||
#define M_APPROX_PRINCIPAL_AXIS_1_Y 5323L // already defined in mil3dim.h
|
||||
#define M_APPROX_PRINCIPAL_AXIS_1_Z 5324L // already defined in mil3dim.h
|
||||
#define M_APPROX_PRINCIPAL_AXIS_2_X 5338L // already defined in mil3dim.h
|
||||
#define M_APPROX_PRINCIPAL_AXIS_2_Y 5339L // already defined in mil3dim.h
|
||||
#define M_APPROX_PRINCIPAL_AXIS_2_Z 5340L // already defined in mil3dim.h
|
||||
#define M_STANDARD_DEVIATION_X 5033 // already defined in mil3dim.h
|
||||
#define M_STANDARD_DEVIATION_Y 5034 // already defined in mil3dim.h
|
||||
#define M_STANDARD_DEVIATION_Z 5035 // already defined in mil3dim.h
|
||||
#define M_AVERAGE_NORMAL_X 5903L
|
||||
#define M_AVERAGE_NORMAL_Y 5904L
|
||||
#define M_AVERAGE_NORMAL_Z 5905L
|
||||
|
||||
// already defined in mil3dim.h
|
||||
#define M_MOMENT_XYZ(PowerX, PowerY, PowerZ) (M_MOMENTS | M_ORDINARY | ((PowerX) << 16) | ((PowerY) << 20) | ((PowerZ) << 24))
|
||||
#define M_MOMENT_CENTRAL_XYZ(PowerX, PowerY, PowerZ) (M_MOMENTS | M_CENTRAL | ((PowerX) << 16) | ((PowerY) << 20) | ((PowerZ) << 24))
|
||||
#define M_MOMENT_XYZ_X(Moment) (((Moment) >> 16) & 0x0F)
|
||||
#define M_MOMENT_XYZ_Y(Moment) (((Moment) >> 20) & 0x0F)
|
||||
#define M_MOMENT_XYZ_Z(Moment) (((Moment) >> 24) & 0x0F)
|
||||
|
||||
|
||||
#define M_CUSTOM_FEATURE_MAX 1024L
|
||||
#define M_CUSTOM_FEATURE_FLAG 0x00200000
|
||||
#define M_CUSTOM_FEATURE(N) ((N) | M_CUSTOM_FEATURE_FLAG)
|
||||
#define M_REMOVE_FEATURE 5053L
|
||||
|
||||
// General
|
||||
#define M_STATUS 0x00008002L // already defined in milbead
|
||||
#define M_COMPLETE 0x00000000L // already defined in mil3dreg
|
||||
#define M_INTERNAL_ERROR 5L // already defined in milreg.h
|
||||
|
||||
#define M_MISSING_COMPONENT_NORMALS_MIL 4183 // already defined in mil3dmod.h
|
||||
#define M_MISSING_COMPONENT_MESH_MIL 5214 // already defined in mil3dmod.h
|
||||
#define M_CONTAINER_NOT_ORGANIZED 5218 // already defined in mil3dmod.h
|
||||
|
||||
//==============================================================================
|
||||
// Other defines
|
||||
|
||||
//==============================================================================
|
||||
// CAPI function prototypes
|
||||
MIL_ID MFTYPE M3dblobAlloc(MIL_ID SysId,
|
||||
MIL_INT64 ContextType,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dblobIdPtr);
|
||||
|
||||
MIL_ID MFTYPE M3dblobAllocResult(MIL_ID SysId,
|
||||
MIL_INT64 ResultType,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Result3dblobIdPtr);
|
||||
|
||||
void MFTYPE M3dblobFree(MIL_ID ContextOrResult3dblobId);
|
||||
|
||||
|
||||
|
||||
//#if M_MIL_USE_64BIT
|
||||
// Prototypes for 64 bits OSs
|
||||
void MFTYPE M3dblobControlInt64(MIL_ID ContextOrResult3dblobId,
|
||||
MIL_INT64 LabelOrIndex,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_INT64 ControlValue);
|
||||
void MFTYPE M3dblobControlDouble(MIL_ID ContextOrResult3dblobId,
|
||||
MIL_INT64 LabelOrIndex,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_DOUBLE ControlValue);
|
||||
|
||||
MIL_INT64 MFTYPE M3dblobInquire(MIL_ID ContextOrResult3dblobId,
|
||||
MIL_INT64 LabelOrIndex,
|
||||
MIL_INT64 InquireType,
|
||||
void* UserVarPtr);
|
||||
|
||||
void MFTYPE M3dblobControlDrawInt64(MIL_ID DrawContext3dblobId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_INT64 ControlValue);
|
||||
void MFTYPE M3dblobControlDrawDouble(MIL_ID DrawContext3dblobId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_DOUBLE ControlValue);
|
||||
|
||||
MIL_INT64 MFTYPE M3dblobInquireDraw(MIL_ID DrawContext3dblobId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 InquireType,
|
||||
void* UserVarPtr);
|
||||
|
||||
MIL_DOUBLE MFTYPE M3dblobGetResult(MIL_ID Result3dblobId,
|
||||
MIL_INT64 LabelOrIndex,
|
||||
MIL_INT64 ResultType,
|
||||
void* ResultArrayPtr);
|
||||
|
||||
void MFTYPE M3dblobCopyResult(MIL_ID SrcResult3dblobId,
|
||||
MIL_INT64 SrcLabelOrIndex,
|
||||
MIL_ID DstMilObjectId,
|
||||
MIL_INT64 CopyType,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dblobSegment(MIL_ID SegmentationContext3dblobId,
|
||||
MIL_ID ContainerOrLabelImageBufId,
|
||||
MIL_ID Result3dblobId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dblobSelect(MIL_ID SrcResult3dblobId,
|
||||
MIL_ID DstResult3dblobId,
|
||||
MIL_INT64 SelectionCriterion,
|
||||
MIL_INT64 Condition,
|
||||
MIL_DOUBLE CondLow,
|
||||
MIL_DOUBLE CondHigh,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dblobSort(MIL_ID SrcResult3dblobId,
|
||||
MIL_ID DstResult3dblobId,
|
||||
MIL_INT64 Feature1,
|
||||
MIL_INT64 Feature2,
|
||||
MIL_INT64 Feature3,
|
||||
MIL_INT NbBlobsToKeep,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dblobCombine(MIL_ID Src1Result3dblobId,
|
||||
MIL_ID Src2Result3dblobId,
|
||||
MIL_ID DstResult3dblobId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dblobExtract(MIL_ID SrcContainerBufId,
|
||||
MIL_ID Result3dblobId,
|
||||
MIL_INT64 LabelOrIndex,
|
||||
MIL_ID DstContainerBufId,
|
||||
MIL_INT64 Options,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT64 MFTYPE M3dblobDraw3d(MIL_ID Draw3dContext3dblobId,
|
||||
MIL_ID ContainerBufId,
|
||||
MIL_ID Result3dblobId,
|
||||
MIL_INT64 LabelOrIndex,
|
||||
MIL_ID DstList3dgraId,
|
||||
MIL_INT64 DstParentLabel,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dblobCalculate(MIL_ID CalculateContext3dblobId,
|
||||
MIL_ID ContainerBufId,
|
||||
MIL_ID Result3dblobId,
|
||||
MIL_INT64 LabelOrIndex,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
#if M_MIL_USE_UNICODE
|
||||
void MFTYPE M3dblobSaveA(MIL_CONST_TEXTA_PTR FileName,
|
||||
MIL_ID Context3dblobId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_ID MFTYPE M3dblobRestoreA(MIL_CONST_TEXTA_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dblobIdPtr);
|
||||
|
||||
void MFTYPE M3dblobStreamA(MIL_TEXTA_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dblobIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
|
||||
void MFTYPE M3dblobSaveW(MIL_CONST_TEXTW_PTR FileName,
|
||||
MIL_ID Context3dblobId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_ID MFTYPE M3dblobRestoreW(MIL_CONST_TEXTW_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dblobIdPtr);
|
||||
|
||||
void MFTYPE M3dblobStreamW(MIL_TEXTW_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dblobIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
|
||||
#if M_MIL_UNICODE_API
|
||||
#define M3dblobSave M3dblobSaveW
|
||||
#define M3dblobRestore M3dblobRestoreW
|
||||
#define M3dblobStream M3dblobStreamW
|
||||
#else
|
||||
#define M3dblobSave M3dblobSaveA
|
||||
#define M3dblobRestore M3dblobRestoreA
|
||||
#define M3dblobStream M3dblobStreamA
|
||||
#endif //M_MIL_UNICODE_API
|
||||
|
||||
#else
|
||||
|
||||
void MFTYPE M3dblobSave(MIL_CONST_TEXT_PTR FileName,
|
||||
MIL_ID Context3dblobId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_ID MFTYPE M3dblobRestore(MIL_CONST_TEXT_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dblobIdPtr);
|
||||
|
||||
void MFTYPE M3dblobStream(MIL_TEXT_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dblobIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
|
||||
#endif //M_MIL_USE_UNICODE
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#ifdef __cplusplus
|
||||
inline void MFTYPE M3dblobStreamCpp(MilStreamParam MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dblobIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
M3dblobStream(MemPtrOrFileName.m_Param, SysId, Operation, StreamType, Version, ControlFlag, Context3dblobIdPtr, SizeByteVarPtr);
|
||||
}
|
||||
|
||||
#undef M3dblobStream
|
||||
#define M3dblobStream M3dblobStreamCpp
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#ifdef __cplusplus
|
||||
// ----------------------------------------------------------
|
||||
// M3dblobInquire
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
inline MIL_INT64 MFTYPE M3dblobInquireSafeType(MIL_ID Context3dblobId, MIL_INT64 LabelOrIndex, MIL_INT64 InquireType, MilVoidPtr UserVarPtr)
|
||||
{
|
||||
MIL_INT64 RequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
if(!(M_DEFAULT_DATA_TYPE_BIT_SET(InquireType) || M_RECOMMENDED_DATA_TYPE_BIT_SET(InquireType)))
|
||||
{
|
||||
M3dblobInquire(Context3dblobId, LabelOrIndex, InquireType | M_DEFAULT_DATA_TYPE, &RequiredParamType);
|
||||
}
|
||||
if(!MfuncPointerIsCompatible(RequiredParamType, UserVarPtr.Type, InquireType))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dblobInquire"));
|
||||
}
|
||||
return M3dblobInquire(Context3dblobId, LabelOrIndex, InquireType, UserVarPtr.Ptr);
|
||||
}
|
||||
|
||||
inline MIL_INT64 MFTYPE M3dblobInquireUnsafe(MIL_ID Context3dblobId, MIL_INT64 LabelOrIndex, MIL_INT64 InquireType, void* UserVarPtr)
|
||||
{
|
||||
return M3dblobInquire(Context3dblobId, LabelOrIndex, InquireType, UserVarPtr);
|
||||
}
|
||||
|
||||
inline MIL_INT64 MFTYPE M3dblobInquireDrawSafeType(MIL_ID DrawContext3dblobId, MIL_INT64 Operation, MIL_INT64 InquireType, MilVoidPtr UserVarPtr)
|
||||
{
|
||||
MIL_INT64 RequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
if(!(M_DEFAULT_DATA_TYPE_BIT_SET(InquireType) || M_RECOMMENDED_DATA_TYPE_BIT_SET(InquireType)))
|
||||
{
|
||||
M3dblobInquireDraw(DrawContext3dblobId, Operation, InquireType | M_DEFAULT_DATA_TYPE, &RequiredParamType);
|
||||
}
|
||||
if(!MfuncPointerIsCompatible(RequiredParamType, UserVarPtr.Type, InquireType))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dblobInquireDraw"));
|
||||
}
|
||||
return M3dblobInquireDraw(DrawContext3dblobId, Operation, InquireType, UserVarPtr.Ptr);
|
||||
}
|
||||
|
||||
inline MIL_INT64 MFTYPE M3dblobInquireDrawUnsafe(MIL_ID DrawContext3dblobId, MIL_INT64 Operation, MIL_INT64 InquireType, void* UserVarPtr)
|
||||
{
|
||||
return M3dblobInquireDraw(DrawContext3dblobId, Operation, InquireType, UserVarPtr);
|
||||
}
|
||||
|
||||
#define M3dblobInquire M3dblobInquireSafeType
|
||||
#define M3dblobInquireDraw M3dblobInquireDrawSafeType
|
||||
|
||||
#else // #if M_MIL_USE_SAFE_TYPE
|
||||
#define M3dblobInquireUnsafe M3dblobInquire
|
||||
#define M3dblobInquireDrawUnsafe M3dblobInquireDraw
|
||||
#endif // #if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
// -------------------------------------------------------------------------
|
||||
// M3dblobGetResult safe type definitions
|
||||
//
|
||||
inline MIL_DOUBLE MFTYPE M3dblobGetResultSafeType(MIL_ID Result3dblobId, MIL_INT64 LabelOrIndex, MIL_INT64 ResultType, MilVoidPtr ResultArrayPtr)
|
||||
{
|
||||
MIL_INT64 RequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
if(!(M_DEFAULT_DATA_TYPE_BIT_SET(ResultType) || M_RECOMMENDED_DATA_TYPE_BIT_SET(ResultType)))
|
||||
{
|
||||
M3dblobGetResult(Result3dblobId, LabelOrIndex, ResultType | M_DEFAULT_DATA_TYPE, &RequiredParamType);
|
||||
}
|
||||
if(!MfuncPointerIsCompatible(RequiredParamType, ResultArrayPtr.Type, ResultType))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dblobGetResult"));
|
||||
}
|
||||
return M3dblobGetResult(Result3dblobId, LabelOrIndex, ResultType, ResultArrayPtr.Ptr);
|
||||
}
|
||||
|
||||
inline MIL_DOUBLE MFTYPE M3dblobGetResultUnsafe(MIL_ID Result3dblobId, MIL_INT64 LabelOrIndex, MIL_INT64 ResultType, void* ResultArrayPtr)
|
||||
{
|
||||
return M3dblobGetResult(Result3dblobId, LabelOrIndex, ResultType, ResultArrayPtr);
|
||||
}
|
||||
|
||||
#define M3dblobGetResult M3dblobGetResultSafeType
|
||||
|
||||
#else // #if M_MIL_USE_SAFE_TYPE
|
||||
#define M3dblobGetResultUnsafe M3dblobGetResult
|
||||
#endif // #if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
//#if M_MIL_USE_64BIT
|
||||
#ifdef __cplusplus
|
||||
|
||||
//=========================================================
|
||||
// M3dblobControl function overloads when compiling c++ files
|
||||
//=========================================================
|
||||
template <typename T>
|
||||
inline void M3dblobControl(MIL_ID Context3dblobId, MIL_INT64 LabelOrIndex, MIL_INT64 ControlType, T ControlValue)
|
||||
{
|
||||
M3dblobControlInt64(Context3dblobId, LabelOrIndex, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void M3dblobControl(MIL_ID Context3dblobId, MIL_INT64 LabelOrIndex, MIL_INT64 ControlType, float ControlValue)
|
||||
{
|
||||
M3dblobControlDouble(Context3dblobId, LabelOrIndex, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void M3dblobControl(MIL_ID Context3dblobId, MIL_INT64 LabelOrIndex, MIL_INT64 ControlType, MIL_DOUBLE ControlValue)
|
||||
{
|
||||
M3dblobControlDouble(Context3dblobId, LabelOrIndex, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline void M3dblobControlDraw(MIL_ID DrawContext3dblobId, MIL_INT64 Operation, MIL_INT64 ControlType, T ControlValue)
|
||||
{
|
||||
M3dblobControlDrawInt64(DrawContext3dblobId, Operation, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void M3dblobControlDraw(MIL_ID DrawContext3dblobId, MIL_INT64 Operation, MIL_INT64 ControlType, float ControlValue)
|
||||
{
|
||||
M3dblobControlDrawDouble(DrawContext3dblobId, Operation, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void M3dblobControlDraw(MIL_ID DrawContext3dblobId, MIL_INT64 Operation, MIL_INT64 ControlType, MIL_DOUBLE ControlValue)
|
||||
{
|
||||
M3dblobControlDrawDouble(DrawContext3dblobId, Operation, ControlType, ControlValue);
|
||||
}
|
||||
#else // __cplusplus
|
||||
//=========================================================
|
||||
// For C file, call the default function, i.e. Double one
|
||||
//=========================================================
|
||||
#define M3dblobControl M3dblobControlDouble
|
||||
#define M3dblobControlDraw M3dblobControlDrawDouble
|
||||
#endif // __cplusplus
|
||||
//#endif // M_MIL_USE_64BIT
|
||||
|
||||
#if M_MIL_USE_STRING
|
||||
/***************************************************************************/
|
||||
/* 3dblob MODULE */
|
||||
/***************************************************************************/
|
||||
#if M_MIL_USE_UNICODE
|
||||
#if M_MIL_UNICODE_API
|
||||
|
||||
inline void MFTYPE M3dblobSaveW(const MIL_STRING& FileName, MIL_ID Context3dblobId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dblobSaveW(FileName.c_str(), Context3dblobId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE M3dblobRestoreW(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* Context3dblobId)
|
||||
{
|
||||
return M3dblobRestoreW(FileName.c_str(), SysId, ControlFlag, Context3dblobId);
|
||||
}
|
||||
|
||||
#else // M_MIL_UNICODE_API
|
||||
inline void MFTYPE M3dblobSaveA(const MIL_STRING& FileName, MIL_ID Context3dblobId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dblobSaveA(FileName.c_str(), Context3dblobId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE M3dblobRestoreA(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* Context3dblobId)
|
||||
{
|
||||
return M3dblobRestoreA(FileName.c_str(), SysId, ControlFlag, Context3dblobId);
|
||||
}
|
||||
|
||||
#endif /* M_MIL_UNICODE_API*/
|
||||
|
||||
#else // M_MIL_USE_UNICODE
|
||||
inline void MFTYPE M3dblobSave(const MIL_STRING& FileName, MIL_ID Context3dblobId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dblobSave(FileName.c_str(), Context3dblobId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE M3dblobRestore(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* Context3dblobId)
|
||||
{
|
||||
return M3dblobRestore(FileName.c_str(), SysId, ControlFlag, Context3dblobId);
|
||||
}
|
||||
|
||||
#endif /* M_MIL_USE_UNICODE */
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
#if M_MIL_UNICODE_API
|
||||
|
||||
inline MIL_DOUBLE MFTYPE M3dblobGetResultSafeType(MIL_ID Result3dblobId, MIL_INT64 LabelOrIndex, MIL_INT64 ResultType, MIL_STRING& ResultArrayPtr)
|
||||
{
|
||||
#if MIL_COMPILE_VERSION >= MIL_COMPILE_TRUNK_VERSION && M_MIL_USE_SAFE_TYPE
|
||||
if((ResultType & M_CLIENT_ENCODING) != M_CLIENT_ENCODING)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dblobGetResult"), MIL_TEXT(" Result Type not supported with MIL_STRING."));
|
||||
}
|
||||
#endif
|
||||
|
||||
MIL_INT InternalStringSize = 0;
|
||||
|
||||
M3dblobGetResult(Result3dblobId, LabelOrIndex, (ResultType & (~M_HLVLDATATYPE_MASK)) + M_STRING_SIZE + M_TYPE_MIL_INT, &InternalStringSize);
|
||||
|
||||
if(InternalStringSize > 0)
|
||||
{
|
||||
if(ResultArrayPtr.size() < (MIL_UINT)InternalStringSize)
|
||||
{
|
||||
ResultArrayPtr.resize((MIL_UINT)InternalStringSize);
|
||||
}
|
||||
}
|
||||
|
||||
M3dblobGetResult(Result3dblobId, LabelOrIndex, ResultType, &ResultArrayPtr[0]);
|
||||
|
||||
return 0.0;
|
||||
}
|
||||
#endif /* M_MIL_UNICODE_API */
|
||||
#else
|
||||
//M3dblobGetResult is only defined in UNICODE
|
||||
#if M_MIL_UNICODE_API
|
||||
inline MIL_DOUBLE MFTYPE M3dblobGetResult(MIL_ID Result3dblobId, MIL_INT64 LabelOrIndex, MIL_INT64 ResultType, MIL_STRING &ResultArrayPtr)
|
||||
{
|
||||
MIL_INT InternalStringSize = 0;
|
||||
|
||||
//Inquire the byte content
|
||||
M3dblobGetResult(Result3dblobId, LabelOrIndex, (ResultType & (~M_HLVLDATATYPE_MASK)) + M_STRING_SIZE + M_TYPE_MIL_INT, &InternalStringSize);
|
||||
|
||||
if(InternalStringSize > 0)
|
||||
{
|
||||
ResultArrayPtr.assign(InternalStringSize, MIL_TEXT('\0'));
|
||||
M3dblobGetResult(Result3dblobId, LabelOrIndex, ResultType, &ResultArrayPtr[0]);
|
||||
ResultArrayPtr.resize(InternalStringSize);
|
||||
}
|
||||
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif /* M_MIL_USE_STRING*/
|
||||
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// Overload for std::vector.
|
||||
#if defined(M_MIL_USE_VECTOR) && M_MIL_USE_VECTOR
|
||||
// ----------------------------------------------------------
|
||||
template <typename UserType>
|
||||
inline MIL_INT64 MFTYPE M3dblobInquire(MIL_ID Context3dblobId, MIL_INT64 LabelOrIndex, MIL_INT64 InquireType, std::vector<UserType> &UserVarPtr)
|
||||
{
|
||||
// If the given MIL data type is not the same as the SrcType, change it to the correct one
|
||||
// and give a warning.
|
||||
MIL_INT64 InternalTrueDataTypeForStdVector = MilTraits<UserType>::TypeFlag;
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(M_GET_HLVLDATATYPE(InquireType) != 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dblobInquire"), MIL_TEXT("Combination value for the required data type is not supported with std::vector overload."));
|
||||
}
|
||||
#endif
|
||||
|
||||
InquireType = M_STRIP_HLVLDATATYPE(InquireType) + InternalTrueDataTypeForStdVector;
|
||||
|
||||
MIL_INT InternalNumberOfElementsForStdVector = 0;
|
||||
M3dblobInquire(Context3dblobId, LabelOrIndex, M_STRIP_HLVLDATATYPE(InquireType) + M_NB_ELEMENTS + M_TYPE_MIL_INT, &InternalNumberOfElementsForStdVector);
|
||||
|
||||
UserVarPtr.resize(InternalNumberOfElementsForStdVector);
|
||||
|
||||
if(InternalNumberOfElementsForStdVector > 0)
|
||||
{
|
||||
return M3dblobInquire(Context3dblobId, LabelOrIndex, InquireType, &UserVarPtr[0]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
template <typename UserType>
|
||||
inline MIL_DOUBLE MFTYPE M3dblobGetResult(MIL_ID Result3dblobId, MIL_INT64 LabelOrIndex, MIL_INT64 ResultType, std::vector<UserType> &ResultArrayPtr)
|
||||
{
|
||||
//! If the given MIL data type is not the same as the SrcType, change it to the correct one
|
||||
//! and give a warning.
|
||||
MIL_INT64 InternalTrueDataTypeForStdVector = MilTraits<UserType>::TypeFlag;
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(M_GET_HLVLDATATYPE(ResultType) != 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dblobGetResult"), MIL_TEXT("Combination value for the required data type is not supported with std::vector overload."));
|
||||
}
|
||||
#endif
|
||||
|
||||
ResultType = M_STRIP_HLVLDATATYPE(ResultType) + InternalTrueDataTypeForStdVector;
|
||||
|
||||
MIL_INT InternalNumberOfElementsForStdVector = 0;
|
||||
M3dblobGetResult(Result3dblobId, LabelOrIndex, M_STRIP_HLVLDATATYPE(ResultType) + M_NB_ELEMENTS + M_TYPE_MIL_INT, &InternalNumberOfElementsForStdVector);
|
||||
|
||||
ResultArrayPtr.resize(InternalNumberOfElementsForStdVector);
|
||||
|
||||
if(InternalNumberOfElementsForStdVector > 0)
|
||||
{
|
||||
M3dblobGetResult(Result3dblobId, LabelOrIndex, ResultType, &ResultArrayPtr[0]);
|
||||
}
|
||||
return 0.0;
|
||||
}
|
||||
// ----------------------------------------------------------
|
||||
// Overloads for std::vector in M3dblobStream.
|
||||
inline void MFTYPE M3dblobStream(std::vector<MIL_UINT8> &MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dblobIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
MxxxStreamForStdVector(MemPtrOrFileName,
|
||||
SysId,
|
||||
Operation,
|
||||
StreamType,
|
||||
Version,
|
||||
ControlFlag,
|
||||
Context3dblobIdPtr,
|
||||
SizeByteVarPtr,
|
||||
M3dblobStream);
|
||||
}
|
||||
#endif // defined(M_MIL_USE_VECTOR) && M_MIL_USE_VECTOR
|
||||
//==============================================================================
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// MIL_UNIQUE_ID support
|
||||
|
||||
#if M_MIL_USE_MIL_UNIQUE_ID
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
template <> inline bool MilIsCorrectObjectType<&M3dblobFree>(MIL_INT64 ObjectType)
|
||||
{
|
||||
return (ObjectType & ~M_USER_DEFINE_LOW_ATTRIBUTE) == M_3DBLOB_OBJECT;
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef MIL_UNIQUE_ID<&M3dblobFree> MIL_UNIQUE_3DBLOB_ID;
|
||||
|
||||
#if M_MIL_USE_MOVE_SEMANTICS
|
||||
|
||||
inline MIL_UNIQUE_3DBLOB_ID M3dblobAlloc(MIL_ID SysId, MIL_INT64 ObjectType, MIL_INT64 InitFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_3DBLOB_ID(M3dblobAlloc(SysId, ObjectType, InitFlag, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_3DBLOB_ID M3dblobAllocResult(MIL_ID SysId, MIL_INT64 ResultType, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_3DBLOB_ID(M3dblobAllocResult(SysId, ResultType, ControlFlag, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_3DBLOB_ID M3dblobRestore(MIL_CONST_TEXT_PTR FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_3DBLOB_ID(M3dblobRestore(FileName, SysId, ControlFlag, M_NULL));
|
||||
}
|
||||
#if M_MIL_USE_STRING
|
||||
inline MIL_UNIQUE_3DBLOB_ID M3dblobRestore(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_3DBLOB_ID(M3dblobRestore(FileName.c_str(), SysId, ControlFlag, M_NULL));
|
||||
}
|
||||
#endif // M_MIL_USE_STRING
|
||||
template <MilFreeFuncType FreeFunc> inline void M3dblobFree(const MIL_UNIQUE_ID<FreeFunc>&) = delete;
|
||||
|
||||
inline void M3dblobStream(MilStreamParam MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_UNIQUE_3DBLOB_ID* Context3dblobIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
MxxxStreamForMilUniqueId(MemPtrOrFileName, SysId, Operation, StreamType, Version, ControlFlag, Context3dblobIdPtr, SizeByteVarPtr, M3dblobStream);
|
||||
}
|
||||
|
||||
#endif // M_MIL_USE_MOVE_SEMANTICS
|
||||
#endif // M_MIL_USE_MIL_UNIQUE_ID
|
||||
|
||||
// End of MIL_UNIQUE_ID support
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif // !M_MIL_LITE
|
||||
#endif // __MIL_3DBLOB_H__
|
||||
370
Include/ClassicMIL/MILDyn/mil3ddisp.h
Normal file
370
Include/ClassicMIL/MILDyn/mil3ddisp.h
Normal file
@ -0,0 +1,370 @@
|
||||
/////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Filename : MIL3DDISP.H
|
||||
// Content : Define for the MIL 3DDISP module
|
||||
// Revision : 10.60.0776
|
||||
//
|
||||
// Copyright © Matrox Electronic Systems Ltd., 1992-2023.
|
||||
// All Rights Reserved
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __MIL3DDISP_H__
|
||||
#define __MIL3DDISP_H__
|
||||
|
||||
// None of this should clash with disp (2d) controls so that if we want to forward them to the
|
||||
// 2d display it will be trivial. Should also reuse creation types from 2d.
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
typedef MIL_INT(MFTYPE *MIL_3DDISP_HOOK_FUNCTION_PTR)(MIL_INT HookType,
|
||||
MIL_ID EventId,
|
||||
void *UserDataPtr);
|
||||
|
||||
#define M_VTK_TRACKBALL 0x00000002L
|
||||
#define M_VTK_TERRAIN 0x00000003L
|
||||
#define M_VTK_WINDOW 0x00000020L // Reserved in mildisplay.h
|
||||
|
||||
// M3ddispSelect
|
||||
#define M_OPEN 0x00000010L // Already defined from mil.h
|
||||
#define M_CLOSE 0x00000020L // Already defined from mil.h
|
||||
#define M_ADD 0x0000L // Already defined in milocr.h, milim.h
|
||||
#define M_REMOVE 0x00000004L // Already defined in milim.h
|
||||
#define M_SELECT 3977L
|
||||
|
||||
// These should not clash with disp2d
|
||||
// M3ddispAlloc
|
||||
//#define M_WINDOWED_DISPLAY 0L
|
||||
#define M_MIL_BUFFER_WINDOW 2L
|
||||
#define M_OPENGL_TEST 3L
|
||||
#define M_WEB 0x00800000L // Already defined in mil.h, mildisplay.h
|
||||
|
||||
// M3ddispControl types
|
||||
#define M_3D_GRAPHIC_LIST_ID 4111
|
||||
#define M_ROTATION_INDICATOR 4627
|
||||
#define M_BACKGROUND_IMAGE 4628
|
||||
#define M_BACKGROUND_IMAGE_SIZE_X 4629
|
||||
#define M_BACKGROUND_IMAGE_SIZE_Y 4630
|
||||
#define M_BACKGROUND_IMAGE_SIZE_BAND 4631
|
||||
#define M_AUTO_ROTATE 4633
|
||||
#define M_ROTATION_SPEED 4634
|
||||
#define M_ROTATION_AXIS 4636
|
||||
#define M_VIEW_BOX_NODE 4842
|
||||
|
||||
#define M_ACTION_KEY_TRANSLATE_FORWARD 4638
|
||||
#define M_ACTION_KEY_TRANSLATE_BACKWARD 4639
|
||||
#define M_ACTION_KEY_TRANSLATE_DOWN 2755L
|
||||
#define M_ACTION_KEY_TRANSLATE_LEFT 2756L
|
||||
#define M_ACTION_KEY_TRANSLATE_RIGHT 2757L
|
||||
#define M_ACTION_KEY_TRANSLATE_UP 2758L
|
||||
#define M_ACTION_KEY_ROLL_LEFT 4640
|
||||
#define M_ACTION_KEY_ROLL_RIGHT 4641
|
||||
#define M_ACTION_KEY_ORBIT_LEFT 4642
|
||||
#define M_ACTION_KEY_ORBIT_RIGHT 4643
|
||||
#define M_ACTION_KEY_ORBIT_UP 4644
|
||||
#define M_ACTION_KEY_ORBIT_DOWN 4645
|
||||
#define M_ACTION_KEY_TURN_LEFT 4646
|
||||
#define M_ACTION_KEY_TURN_RIGHT 4647
|
||||
#define M_ACTION_KEY_TURN_UP 4648
|
||||
#define M_ACTION_KEY_TURN_DOWN 4649
|
||||
#define M_ACTION_KEY_ZOOM_IN 4650
|
||||
#define M_ACTION_KEY_ZOOM_OUT 4651
|
||||
#define M_ACTION_KEY_RESET 4652
|
||||
#define M_ALTERNATE_SPEED_FACTOR 4653
|
||||
#define M_BACKGROUND_COLOR_GRADIENT 4654
|
||||
#define M_ACTION_KEY_AUTO_ROTATE 4658
|
||||
#define M_ACTION_KEY_ORIENTATION_TOP_VIEW 4659
|
||||
#define M_ACTION_KEY_ORIENTATION_BOTTOM_VIEW 4660
|
||||
#define M_ACTION_KEY_ORIENTATION_FRONT_VIEW 4661
|
||||
#define M_ACTION_KEY_ORIENTATION_REAR_VIEW 4662
|
||||
#define M_ACTION_KEY_ORIENTATION_LEFT_VIEW 4663
|
||||
#define M_ACTION_KEY_ORIENTATION_RIGHT_VIEW 4664
|
||||
#define M_ACTION_KEY_ORIENTATION_TOP_TILTED 4665
|
||||
#define M_ACTION_KEY_ORIENTATION_BOTTOM_TILTED 4666
|
||||
|
||||
|
||||
#define M_ACTION_MODIFIER_SPEED 2759L
|
||||
|
||||
#define M_DISP_CONTROL_START 10000L // Already defined in mildisplay.h (10000L)
|
||||
#define M_BACKGROUND_COLOR (M_DISP_CONTROL_START+66L) // Already defined in mildisplay.h (10066) M_LOCAL_DISPLAY_CONTROL
|
||||
#define M_TITLE (7702L|M_CLIENT_ENCODING) // Already defined in mildisplay.h M_LOCAL_DISPLAY_CONTROL
|
||||
#define M_DISPLAY_SYNC (M_DISP_CONTROL_START+47L) // Already defined in mildisplay.h (10047) M_LOCAL_DISPLAY_CONTROL
|
||||
#define M_QT_MODE (M_DISP_CONTROL_START+151L) // already defined in mildisplay.h (10151) M_LOCAL_DISPLAY_CONTROL
|
||||
#define M_WINDOW_CURSOR (M_DISP_CONTROL_START+199L) // already defined in mildisplay.h (10199) M_LOCAL_DISPLAY_CONTROL
|
||||
#define M_SELECTED 1103L //M_REMOTE_DISPLAY_CONTROL // Already defined in mildisplay.h
|
||||
#define M_DISPLAY_SURFACE 1121L // Already defined in mildisplay.h M_LOCAL_DISPLAY_CONTROL
|
||||
#define M_WPF_DISPLAY_BUFFER_ID M_DISPLAY_SURFACE // Already defined in mildisplay.h
|
||||
#define M_WINDOW_INITIAL_POSITION_X 3088L //M_LOCAL_DISPLAY_CONTROL // Already defined in mildisplay.h
|
||||
#define M_WINDOW_INITIAL_POSITION_Y 3089L //M_LOCAL_DISPLAY_CONTROL // Already defined in mildisplay.h
|
||||
#define M_WINDOW_HANDLE 3110L //M_LOCAL_DISPLAY_CONTROL // Already defined in mildisplay.h
|
||||
#define M_MOUSE_USE 3219L //M_LOCAL_DISPLAY_CONTROL // Already defined in mildisplay.h
|
||||
#define M_KEYBOARD_USE 3155L //M_LOCAL_DISPLAY_CONTROL // Already defined in mildisplay.h
|
||||
#define M_INIT_FLAG 1012L // Already defined in mildisplay.h
|
||||
#define M_DISPLAY_TYPE (M_DISP_CONTROL_START+114L) // Already defined in mildisplay.h
|
||||
#define M_SAVE_INTERNAL_BUFFERS (M_DISP_CONTROL_START+26L) //(10026) M_LOCAL_DISPLAY_CONTROL Already defined in mildisplay.h
|
||||
|
||||
#define M_DISP_DESELECT_AFTER 80L // Already defined in mildisplay.h
|
||||
#define M_DISP_SELECT_AFTER 81L // Already defined in mildisplay.h
|
||||
|
||||
#define M_BACKGROUND_MODE 12L //already defined
|
||||
#define M_SINGLE_COLOR 3969
|
||||
#define M_GRADIENT_VERTICAL 3970
|
||||
#define M_STRING_SIZE MAKE_INT64(0x0000050000000000)
|
||||
#define M_UPDATE 3199L //M_REMOTE_DISPLAY_CONTROL defined in mildisplay.h
|
||||
#define M_SIZE_X 1536L // Already defined in milcode.h, mil.h
|
||||
#define M_SIZE_Y 1537L // Already defined in milcode.h, mil.h
|
||||
#define M_DISP_CONTROL_START 10000L
|
||||
#define M_FORCE_DISPLAY_RESOLUTION (M_DISP_CONTROL_START+33L) // Already defined in mildisplay.h
|
||||
#define M_ENABLE_ON_MOUSE_CLICK 3973L
|
||||
#define M_COLOR_LUT_ID 5753
|
||||
|
||||
// M3ddispControl
|
||||
// MIL_DOUBLE
|
||||
#define M_FOV_HORIZONTAL_ANGLE 4667L
|
||||
#define M_FOV_VERTICAL_ANGLE 4668L
|
||||
|
||||
#define M_TRANSPARENCY_SORT_MODE 5885L
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//Dispcontrol values
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define M_ENABLE -9997L // Already defined in milblob.h, milcal.h, milmeas.h, mil.h, miledge.h
|
||||
#define M_DISABLE -9999L // Already defined in milblob.h, milcal.h, milmeas.h, mil.h, miledge.h
|
||||
|
||||
#define M_NOW 29L
|
||||
#define M_ALLOCATION_FAILURE_REAL_TEST_FLAG 971L // Also in milblob.h
|
||||
#define M_DEPTH_PEELING 5886L
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// M3ddispSet/GetViewpoint
|
||||
#define M_VIEW_MATRIX 4161L
|
||||
#define M_VIEWPOINT 4163L
|
||||
#define M_INTEREST_POINT 4164L
|
||||
#define M_UP_VECTOR 4165L
|
||||
#define M_VIEW_BOX 4166L
|
||||
#define M_NO_REFRESH 4167L
|
||||
#define M_TOP_VIEW 4168L
|
||||
#define M_BOTTOM_VIEW 4169L
|
||||
#define M_LEFT_VIEW 4170L
|
||||
#define M_RIGHT_VIEW 4171L
|
||||
#define M_FRONT_VIEW 4172L
|
||||
#define M_REAR_VIEW 4173L
|
||||
#define M_TOP_TILTED 4174L
|
||||
#define M_BOTTOM_TILTED 4175L
|
||||
#define M_ORBIT_HORIZONTAL 4177L
|
||||
#define M_ORBIT_VERTICAL 4178L
|
||||
#define M_AZIM_ELEV_ROLL 4L // already defined in milreg.h
|
||||
#define M_TRANSLATE 5L // already defined in mil.h
|
||||
#define M_DISTANCE 0x00080000L // already defined in milim.h
|
||||
#define M_FLIP 0x00010000L // already defined in milim.h
|
||||
#define M_ELEVATION 49L // already defined in milreg.h
|
||||
#define M_AZIMUTH 50L // already defined in milreg.h
|
||||
#define M_ROLL 51L // already defined in milreg.h
|
||||
#define M_VIEW_ORIENTATION 0x00200000L
|
||||
#define M_TRANSFORM_TYPES_SHIFT 8L // =utilities= (also defined in milcal.h)
|
||||
#define M_MOVE_INTEREST_POINT (128 << M_TRANSFORM_TYPES_SHIFT)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Hook values
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define M_OBJ_HOOK_MODULE_RANGE_START 0x00000FE00L // Already defined in mil.h
|
||||
#define M_OBJ_HOOK_MODULE_RANGE_END 0x00000FFFFL // Already defined in mil.h
|
||||
|
||||
// 3ddisplay hook
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// M3ddisp calls
|
||||
void MFTYPE M3ddispControlInt64(MIL_ID Disp3dId, MIL_INT64 ControlType, MIL_INT64 ControlValue);
|
||||
void MFTYPE M3ddispControlDouble(MIL_ID Disp3dId, MIL_INT64 ControlType, MIL_DOUBLE ControlValue);
|
||||
void MFTYPE M3ddispFree(MIL_ID Disp3dId);
|
||||
MIL_INT64 MFTYPE M3ddispInquire(MIL_ID Disp3dId, MIL_INT64 InquireType, void *UserVarPtr);
|
||||
MIL_INT64 MFTYPE M3ddispSelect(MIL_ID Disp3dId, MIL_ID ContainerOrImageBufId, MIL_INT64 Option, MIL_INT64 ControlFlag);
|
||||
MIL_INT64 MFTYPE M3ddispSelectWindow(MIL_ID Disp3dId, MIL_ID ContainerOrImageBufId, MIL_INT64 Option, MIL_INT64 ControlFlag, MIL_WINDOW_HANDLE ClientWindowHandle);
|
||||
void MFTYPE M3ddispSetViewDouble(MIL_ID Disp3dId, MIL_INT64 Mode, MIL_DOUBLE Param1, MIL_DOUBLE Param2, MIL_DOUBLE Param3, MIL_INT64 ControlFlag);
|
||||
void MFTYPE M3ddispGetView(MIL_ID Disp3dId, MIL_INT64 Mode, MIL_DOUBLE* Param1Ptr, MIL_DOUBLE* Param2Ptr, MIL_DOUBLE* Param3Ptr, MIL_INT64 ControlFlag);
|
||||
void MFTYPE M3ddispCopy(MIL_ID SrcMilObjectId, MIL_ID DstMilObjectId, MIL_INT64 CopyType, MIL_INT64 ControlFlag);
|
||||
void MFTYPE M3ddispMessage(MIL_ID Disp3dId, MIL_INT64 EventType, MIL_INT64 MousePositionX, MIL_INT64 MousePositionY, MIL_INT64 EventValue, MIL_INT64 CombinationKeys, MIL_INT64 UserValue);
|
||||
void MFTYPE M3ddispHookFunction(MIL_ID Disp3dId, MIL_INT HookType, MIL_3DDISP_HOOK_FUNCTION_PTR HookHandlerPtr, void* UserDataPtr);
|
||||
MIL_INT MFTYPE M3ddispGetHookInfo(MIL_ID EventId, MIL_INT64 InfoType, void* UserVarPtr);
|
||||
void MFTYPE M3ddispLut(MIL_ID Display3dId, MIL_INT64 DisplayPointCloudLabel, MIL_ID LutBufId, MIL_INT64 OperationFlag);
|
||||
|
||||
// For CAPI calls with strings
|
||||
#if M_MIL_USE_UNICODE
|
||||
MIL_ID MFTYPE M3ddispAllocA(MIL_ID SysId, MIL_INT64 DispNum, MIL_CONST_TEXTA_PTR DispFormat, MIL_INT64 InitFlag, MIL_ID *Disp3dIdPtr);
|
||||
MIL_ID MFTYPE M3ddispAllocW(MIL_ID SysId, MIL_INT64 DispNum, MIL_CONST_TEXTW_PTR DispFormat, MIL_INT64 InitFlag, MIL_ID *Disp3dIdPtr);
|
||||
|
||||
// create default calls
|
||||
#if M_MIL_UNICODE_API
|
||||
#define M3ddispAlloc M3ddispAllocW
|
||||
#else
|
||||
#define M3ddispAlloc M3ddispAllocA
|
||||
#endif
|
||||
|
||||
#else
|
||||
MIL_ID MFTYPE M3ddispAlloc(MIL_ID SysId, MIL_INT64 DispNum, MIL_CONST_TEXT_PTR DispFormat, MIL_INT64 InitFlag, MIL_ID *Display3dIdPtr);
|
||||
#endif
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
inline void M3ddispControl(MIL_ID Disp3dId, MIL_INT64 ControlType, MIL_DOUBLE ControlValue)
|
||||
{
|
||||
M3ddispControlDouble(Disp3dId, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void M3ddispControl(MIL_ID Disp3dId, MIL_INT64 ControlType, MIL_INT64 ControlValue)
|
||||
{
|
||||
M3ddispControlInt64(Disp3dId, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void M3ddispControl(MIL_ID Disp3dId, MIL_INT64 ControlType, MIL_INT32 ControlValue)
|
||||
{
|
||||
M3ddispControlInt64(Disp3dId, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
#if !(M_MIL_USE_LINUX && M_MIL_USE_64BIT)
|
||||
inline void M3ddispControl(MIL_ID Disp3dId, MIL_INT64 ControlType, int ControlValue)
|
||||
{
|
||||
M3ddispControlInt64(Disp3dId, ControlType, ControlValue);
|
||||
}
|
||||
#endif
|
||||
|
||||
inline void M3ddispControl(MIL_ID Disp3dId, MIL_INT64 ControlType, MIL_CONST_TEXT_PTR ControlValue)
|
||||
{
|
||||
M3ddispControl(Disp3dId, ControlType, (MIL_INT)ControlValue);
|
||||
}
|
||||
#else
|
||||
#define M3ddispControl M3ddispControlDouble
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
// ----------------------------------------------------------
|
||||
// M3ddispInquire
|
||||
inline MIL_INT64 MFTYPE M3ddispInquireSafeType(MIL_ID Disp3dId, MIL_INT64 InquireType, MilVoidPtr UserVarPtr)
|
||||
{
|
||||
MIL_INT64 RequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
if(!(M_DEFAULT_DATA_TYPE_BIT_SET(InquireType) || M_RECOMMENDED_DATA_TYPE_BIT_SET(InquireType)))
|
||||
{
|
||||
M3ddispInquire(Disp3dId, InquireType | M_DEFAULT_DATA_TYPE, &RequiredParamType);
|
||||
}
|
||||
if(!MfuncPointerIsCompatible(RequiredParamType, UserVarPtr.Type, InquireType))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3ddispInquire"));
|
||||
}
|
||||
return M3ddispInquire(Disp3dId, InquireType, UserVarPtr.Ptr);
|
||||
}
|
||||
|
||||
inline MIL_INT64 MFTYPE M3ddispInquireUnsafe(MIL_ID Disp3dId, MIL_INT64 InquireType, void* UserVarPtr)
|
||||
{
|
||||
return M3ddispInquire(Disp3dId, InquireType, UserVarPtr);
|
||||
}
|
||||
|
||||
|
||||
#define M3ddispInquire M3ddispInquireSafeType
|
||||
|
||||
#else // #if M_MIL_USE_SAFE_TYPE
|
||||
#define M3ddispInquireUnsafe M3ddispInquire
|
||||
#endif // #if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
#endif //__cplusplus
|
||||
|
||||
#if M_MIL_USE_STRING
|
||||
inline MIL_ID MFTYPE M3ddispAlloc(MIL_ID SysId, MIL_INT64 DispNum, const MIL_STRING& ControlFlag, MIL_INT64 InitFlag, MIL_ID *Display3dIdPtr)
|
||||
{
|
||||
return M3ddispAlloc(SysId, DispNum, ControlFlag.c_str(), InitFlag, Display3dIdPtr);
|
||||
}
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
inline MIL_INT64 MFTYPE M3ddispInquireSafeType(MIL_ID Disp3dId, MIL_INT64 InquireType, MIL_STRING& UserVarPtr)
|
||||
{
|
||||
MIL_INT64 RetValue = 0;
|
||||
MIL_INT InternalStringSize = 0;
|
||||
|
||||
MIL_INT64 DataType = 0;
|
||||
M3ddispInquire(Disp3dId, InquireType | M_DEFAULT_DATA_TYPE, &DataType);
|
||||
if(DataType != M_PARAM_TYPE_MIL_TEXT)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3ddispInquire"), MIL_TEXT("Inquire type not supported with MIL_STRING."));
|
||||
}
|
||||
|
||||
M3ddispInquire(Disp3dId, InquireType + M_STRING_SIZE, &InternalStringSize);
|
||||
|
||||
if(InternalStringSize > 0)
|
||||
{
|
||||
UserVarPtr.assign(InternalStringSize, MIL_TEXT('\0'));
|
||||
RetValue = M3ddispInquire(Disp3dId, InquireType, &UserVarPtr[0]);
|
||||
UserVarPtr.resize(InternalStringSize - 1);
|
||||
|
||||
|
||||
}
|
||||
|
||||
return RetValue;
|
||||
}
|
||||
#else
|
||||
inline MIL_INT64 MFTYPE M3ddispInquire(MIL_ID Disp3dId, MIL_INT64 InquireType, MIL_STRING& UserVarPtr)
|
||||
{
|
||||
MIL_INT64 RetValue = 0;
|
||||
MIL_INT InternalStringSize = 0;
|
||||
|
||||
M3ddispInquire(Disp3dId, InquireType + M_STRING_SIZE, &InternalStringSize);
|
||||
|
||||
if(InternalStringSize > 0)
|
||||
{
|
||||
UserVarPtr.assign(InternalStringSize, MIL_TEXT('\0'));
|
||||
RetValue = M3ddispInquire(Disp3dId, InquireType, &UserVarPtr[0]);
|
||||
UserVarPtr.resize(InternalStringSize - 1);
|
||||
|
||||
}
|
||||
|
||||
return RetValue;
|
||||
}
|
||||
#endif // #if M_MIL_USE_SAFE_TYPE
|
||||
inline void M3ddispControl(MIL_ID Disp3dId, MIL_INT64 ControlType, const MIL_STRING& ControlValue)
|
||||
{
|
||||
M3ddispControl(Disp3dId, ControlType, M_PTR_TO_MIL_INT(ControlValue.c_str()));
|
||||
}
|
||||
|
||||
#endif /* M_MIL_USE_STRING */
|
||||
// Automatic double casting
|
||||
#define M3ddispSetView(Disp3dId, Mode, Param1, Param2, Param3, ControlFlag) \
|
||||
M3ddispSetViewDouble(Disp3dId, Mode, (MIL_DOUBLE)(Param1), (MIL_DOUBLE)(Param2), (MIL_DOUBLE)(Param3), ControlFlag)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// MIL_UNIQUE_ID support
|
||||
|
||||
#if M_MIL_USE_MIL_UNIQUE_ID
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
template <> inline bool MilIsCorrectObjectType<&M3ddispFree>(MIL_INT64 ObjectType)
|
||||
{
|
||||
return ObjectType == M_3D_DISPLAY;;
|
||||
}
|
||||
#endif
|
||||
typedef MIL_UNIQUE_ID<&M3ddispFree> MIL_UNIQUE_3DDISP_ID;
|
||||
|
||||
#if M_MIL_USE_MOVE_SEMANTICS
|
||||
//3DDISP
|
||||
inline MIL_UNIQUE_3DDISP_ID M3ddispAlloc(MIL_ID SysId, MIL_INT DispNum, MIL_CONST_TEXT_PTR ControlFlag, MIL_INT64 InitFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_3DDISP_ID(M3ddispAlloc(SysId, DispNum, ControlFlag, InitFlag, M_NULL));
|
||||
}
|
||||
template <MilFreeFuncType FreeFunc> inline void M3ddispFree(const MIL_UNIQUE_ID<FreeFunc>&) = delete;
|
||||
#endif // M_MIL_USE_MOVE_SEMANTICS
|
||||
#endif // M_MIL_USE_MIL_UNIQUE_ID
|
||||
// End of MIL_UNIQUE_ID support
|
||||
|
||||
#endif // __MIL3DDISP_H__
|
||||
872
Include/ClassicMIL/MILDyn/mil3dgeo.h
Normal file
872
Include/ClassicMIL/MILDyn/mil3dgeo.h
Normal file
@ -0,0 +1,872 @@
|
||||
/////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Filename : MIL3DGEO.H
|
||||
// Content : Define for the MIL 3D module
|
||||
// Revision : 10.60.0776
|
||||
//
|
||||
// Copyright © Matrox Electronic Systems Ltd., 1992-2023.
|
||||
// All Rights Reserved
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __MIL3DGEO_H__
|
||||
#define __MIL3DGEO_H__
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// M3DGEO
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
#define M_GEOMETRY_TYPE 1321L
|
||||
#define M_GEOMETRY 1306L // Already defined
|
||||
#define M_PLANE 1353L // Already defined in 3dmap
|
||||
#define M_SPHERE 2931L
|
||||
#define M_CYLINDER 3656
|
||||
#define M_BOX 0x101L // Already defined in milblob.h
|
||||
#define M_LINE 0x00000080L // Already defined
|
||||
#define M_POINT 1L // Already defined in milmeas.h
|
||||
#define M_UNCHANGED 0x40000005L // Already defined
|
||||
#define M_DIMENSION 5058
|
||||
//BoX
|
||||
#define M_SIZE_X 1536L //Already defined elsewhere
|
||||
#define M_SIZE_Y 1537L //Already defined elsewhere
|
||||
#define M_SIZE_Z 1538L // also in mil.h
|
||||
#define M_AXIS_ALIGNED 0x00040000 // Already defined in mil.h
|
||||
#define M_BOX_ORIENTATION 3814
|
||||
#define M_CORNER_X(N) (1221L + (N)+ ((N) > 3 ? 2595 : 0))
|
||||
#define M_CORNER_Y(N) (1225L + (N)+ ((N) > 3 ? 2595 : 0))
|
||||
#define M_CORNER_Z(N) (3828+(N))
|
||||
#define M_CORNER_X_ALL 3847
|
||||
#define M_CORNER_Y_ALL 3848
|
||||
#define M_CORNER_Z_ALL 3849
|
||||
#define M_UNROTATED_MIN_X 3850
|
||||
#define M_UNROTATED_MIN_Y 3851
|
||||
#define M_UNROTATED_MIN_Z 3852
|
||||
#define M_UNROTATED_MAX_X 3853
|
||||
#define M_UNROTATED_MAX_Y 3854
|
||||
#define M_UNROTATED_MAX_Z 3855
|
||||
#define M_ORIENTATION_UNCHANGED 0x8000L
|
||||
//Plane type
|
||||
#define M_COEFFICIENTS 3388
|
||||
#define M_POINT_AND_NORMAL 3389
|
||||
#define M_THREE_POINTS 3390
|
||||
#define M_POINT_AND_TWO_VECTORS 3391
|
||||
//Sphere
|
||||
#define M_CENTER_Z 3400
|
||||
#define M_RADIUS 0x00000040L // Already defined in MilMod.h
|
||||
//Plane
|
||||
#define M_COEFFICIENT_A 3401
|
||||
#define M_COEFFICIENT_B 3402
|
||||
#define M_COEFFICIENT_C 3403
|
||||
#define M_COEFFICIENT_D 3404
|
||||
#define M_NORMAL_X 3537
|
||||
#define M_NORMAL_Y 3538
|
||||
#define M_NORMAL_Z 3539
|
||||
#define M_CLOSEST_TO_ORIGIN_X 3540
|
||||
#define M_CLOSEST_TO_ORIGIN_Y 3541
|
||||
#define M_CLOSEST_TO_ORIGIN_Z 3542
|
||||
//Cylinder
|
||||
#define M_TWO_POINTS 3657
|
||||
#define M_START_POINT_X 3658
|
||||
#define M_START_POINT_Y 3659
|
||||
#define M_START_POINT_Z 3660
|
||||
#define M_END_POINT_X 3661
|
||||
#define M_END_POINT_Y 3662
|
||||
#define M_END_POINT_Z 3663
|
||||
#define M_AXIS_X 3664
|
||||
#define M_AXIS_Y 3665
|
||||
#define M_AXIS_Z 3666
|
||||
#define M_INFINITE -1L // Also defined in Mil.h
|
||||
#define M_POINT_AND_VECTOR 4670
|
||||
#define M_WITHOUT_BASES 0x00000040L
|
||||
#define M_WITH_BASES 0x00000080L
|
||||
#define M_BASES 4153 // Also in mil3dgra.h
|
||||
// Point
|
||||
#define M_POSITION_X 0x00003400L // Already defined in mil3dgra.h
|
||||
#define M_POSITION_Y 0x00004400L // Already defined in mil3dgra.h
|
||||
#define M_POSITION_Z 3960L // Already defined in mil3dgra.h
|
||||
//SetMatrix
|
||||
#define M_TRANSFORMATION_MATRIX 72L // Already defined in milreg.h
|
||||
#define M_TRANSFORM_TYPES_SHIFT 8L // =utilities= (also defined in milcal.h)
|
||||
#define M_ASSIGN (1 << M_TRANSFORM_TYPES_SHIFT) /* (also defined in milcal.h) */
|
||||
#define M_COMPOSE_WITH_CURRENT (2 << M_TRANSFORM_TYPES_SHIFT) /* (also defined in milcal.h) */
|
||||
|
||||
|
||||
#define M_TRANSFORMATION_TYPE 3L // Already defined in Milreg.h
|
||||
#define M_INVERSE 0x00100
|
||||
#define M_IDENTITY 6L // already defined in milcal.h
|
||||
#define M_TRANSLATION 1L // already defined in milcal.h
|
||||
#define M_ROTATION 3410
|
||||
#define M_RIGID 3411
|
||||
#define M_SCALE_UNIFORM 3413
|
||||
#define M_SIMILARITY 3415
|
||||
#define M_AFFINE 3416
|
||||
#define M_PROJECTION 3417
|
||||
#define M_COMPOSE_TWO_MATRICES 3766
|
||||
#define M_ROTATION_AXIS_ANGLE 2L // already defined in milcal.h
|
||||
#define M_ROTATION_QUATERNION 3L // already defined in milcal.h
|
||||
#define M_ROTATION_X 7L // already defined in milcal.h
|
||||
#define M_ROTATION_Y 8L // already defined in milcal.h
|
||||
#define M_ROTATION_Z 9L // already defined in milcal.h
|
||||
#define M_ROTATION_YXZ 4L // already defined in milcal.h
|
||||
#define M_ROTATION_XYZ 10L // already defined in milcal.h
|
||||
#define M_ROTATION_XZY 11L // already defined in milcal.h
|
||||
#define M_ROTATION_YZX 12L // already defined in milcal.h
|
||||
#define M_ROTATION_ZXY 13L // already defined in milcal.h
|
||||
#define M_ROTATION_ZYX 14L // already defined in milcal.h
|
||||
#define M_ROTATION_AXIS_X 17L // already defined in milcal.h
|
||||
#define M_ROTATION_AXIS_Y 18L // already defined in milcal.h
|
||||
#define M_ROTATION_AXIS_Z 19L // already defined in milcal.h
|
||||
#define M_FIXTURE_TO_PLANE 20L // already defined in milcal.h
|
||||
#define M_FIXTURE_TO_GEOMETRY 21L // already defined in milcal.h
|
||||
//MatrixDefine
|
||||
#define M_XY_AXES 3926L
|
||||
#define M_XZ_AXES 3927L
|
||||
#define M_YX_AXES 3928L
|
||||
#define M_YZ_AXES 3929L
|
||||
#define M_ZX_AXES 3930L
|
||||
#define M_ZY_AXES 3931L
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Deprecated starting 10 SP6 //
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#if OldDefinesSupport
|
||||
#define M_FORWARD_TRANSFORMATION 0x00001000L
|
||||
#define M_BACKWARD_TRANSFORMATION 0x00002000L
|
||||
MIL_DEPRECATED(M_FORWARD_TRANSFORMATION , 1060)
|
||||
MIL_DEPRECATED(M_BACKWARD_TRANSFORMATION, 1060)
|
||||
#endif
|
||||
#define M_POSITION_TRANSFORMATION 0x00001000L
|
||||
#define M_COORDINATE_SYSTEM_TRANSFORMATION 0x00002000L
|
||||
|
||||
//Draw3d
|
||||
#define M_ROOT_NODE 0
|
||||
//Copy
|
||||
#define M_ROTATION_AND_SCALE 3993
|
||||
//Construct
|
||||
#define M_START_POINT 4762L
|
||||
#define M_END_POINT 4763L
|
||||
#define M_CENTER 0x00000080L // already defined in milim.h
|
||||
#define M_CLOSEST_TO_ORIGIN 4764L
|
||||
#define M_NORMAL 8L // already defined in milmeas.h
|
||||
#define M_EDGE 2L // already defined in milmeas.h
|
||||
#define M_AXIS 4765L
|
||||
#define M_LINE_AND_POINT 4766L
|
||||
#define M_FACE 4767L
|
||||
#define M_CENTER_AND_RADIUS 4768L
|
||||
#define M_DIAMETER 4769L
|
||||
#define M_CORNER 4770L
|
||||
|
||||
//Evaluation
|
||||
#define M_EVAL_X 5219L
|
||||
#define M_EVAL_Y 5220L
|
||||
#define M_EVAL_Z 5221L
|
||||
#define M_EVAL_XY 5223L
|
||||
#define M_EVAL_XZ 5224L
|
||||
#define M_EVAL_YZ 5225L
|
||||
#define M_MIN_VALUE MAKE_INT64(0x0000010000000000) // already defined in milim.h
|
||||
#define M_MAX_VALUE MAKE_INT64(0x0000020000000000) // already defined in milim.h
|
||||
#define M_PACKED 0x00020000L // Already defined in mil.h, miledge.h
|
||||
#define M_PACKED_SRC 0x00040000L
|
||||
#define M_PACKED_DST 0x00080000L
|
||||
#define M_NONE 0x08000000L // Already defined in milstr.h
|
||||
// CAPI function prototypes
|
||||
MIL_ID MFTYPE M3dgeoAlloc(MIL_ID SysId,
|
||||
MIL_INT64 ObjectType,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* GeometryOrMatrix3dgeoIdPtr);
|
||||
|
||||
MIL_DOUBLE MFTYPE M3dgeoInquire(MIL_ID GeometryOrMatrix3dgeoId,
|
||||
MIL_INT64 InquireType,
|
||||
void* UserVarPtr);
|
||||
|
||||
void MFTYPE M3dgeoFree(MIL_ID GeometryOrMatrix3dgeoId);
|
||||
|
||||
void MFTYPE M3dgeoBox(MIL_ID Geometry3dgeoId,
|
||||
MIL_INT64 CreationMode,
|
||||
MIL_DOUBLE XPos1,
|
||||
MIL_DOUBLE YPos1,
|
||||
MIL_DOUBLE ZPos1,
|
||||
MIL_DOUBLE XPos2OrLength,
|
||||
MIL_DOUBLE YPos2OrLength,
|
||||
MIL_DOUBLE ZPos2OrLength,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dgeoSphere(MIL_ID Geometry3dgeoId,
|
||||
MIL_DOUBLE CenterX,
|
||||
MIL_DOUBLE CenterY,
|
||||
MIL_DOUBLE CenterZ,
|
||||
MIL_DOUBLE Radius,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dgeoPoint(MIL_ID Geometry3dgeoId,
|
||||
MIL_DOUBLE PositionX,
|
||||
MIL_DOUBLE PositionY,
|
||||
MIL_DOUBLE PositionZ,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dgeoPlane(MIL_ID Geometry3dgeoId,
|
||||
MIL_INT64 CreationMode,
|
||||
MIL_DOUBLE X1,
|
||||
MIL_DOUBLE Y1,
|
||||
MIL_DOUBLE Z1,
|
||||
MIL_DOUBLE X2OrD,
|
||||
MIL_DOUBLE Y2,
|
||||
MIL_DOUBLE Z2,
|
||||
MIL_DOUBLE X3,
|
||||
MIL_DOUBLE Y3,
|
||||
MIL_DOUBLE Z3,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dgeoCopy(MIL_ID SrcMilObjectId,
|
||||
MIL_ID DstMilObjectId,
|
||||
MIL_INT64 CopyType,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dgeoMatrixSetTransformDouble(MIL_ID Matrix3dgeoId,
|
||||
MIL_INT64 TransformType,
|
||||
MIL_DOUBLE Param1,
|
||||
MIL_DOUBLE Param2,
|
||||
MIL_DOUBLE Param3,
|
||||
MIL_DOUBLE Param4,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dgeoMatrixPutDouble(MIL_ID Matrix3dgeoId,
|
||||
MIL_INT64 PutType,
|
||||
const MIL_DOUBLE* UserArrayPtr);
|
||||
void MFTYPE M3dgeoMatrixPutFloat(MIL_ID Matrix3dgeoId,
|
||||
MIL_INT64 PutType,
|
||||
const MIL_FLOAT* UserArrayPtr);
|
||||
|
||||
void MFTYPE M3dgeoMatrixGetDouble(MIL_ID Matrix3dgeoId,
|
||||
MIL_INT64 GetType,
|
||||
MIL_DOUBLE* UserArrayPtr);
|
||||
void MFTYPE M3dgeoMatrixGetFloat(MIL_ID Matrix3dgeoId,
|
||||
MIL_INT64 GetType,
|
||||
MIL_FLOAT* UserArrayPtr);
|
||||
|
||||
void MFTYPE M3dgeoMatrixGetTransform(MIL_ID Matrix3dgeoId,
|
||||
MIL_INT64 InquireType,
|
||||
MIL_DOUBLE *Param1Ptr,
|
||||
MIL_DOUBLE *Param2Ptr,
|
||||
MIL_DOUBLE *Param3Ptr,
|
||||
MIL_DOUBLE *Param4Ptr,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dgeoCylinder(MIL_ID Geometry3dgeoId,
|
||||
MIL_INT64 CreationMode,
|
||||
MIL_DOUBLE XPos1,
|
||||
MIL_DOUBLE YPos1,
|
||||
MIL_DOUBLE ZPos1,
|
||||
MIL_DOUBLE XPos2OrVector,
|
||||
MIL_DOUBLE YPos2OrVector,
|
||||
MIL_DOUBLE ZPos2OrVector,
|
||||
MIL_DOUBLE Radius,
|
||||
MIL_DOUBLE Length,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT64 MFTYPE M3dgeoDraw3d(MIL_ID OperationDraw3dContext3dgeoId,
|
||||
MIL_ID SrcGeometry3dgeoId,
|
||||
MIL_ID DstList3dgraId,
|
||||
MIL_INT64 DstParentLabel,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
|
||||
void MFTYPE M3dgeoLine(MIL_ID Geometry3dgeoId,
|
||||
MIL_INT64 CreationMode,
|
||||
MIL_DOUBLE XPos1,
|
||||
MIL_DOUBLE YPos1,
|
||||
MIL_DOUBLE ZPos1,
|
||||
MIL_DOUBLE XPos2OrVector,
|
||||
MIL_DOUBLE YPos2OrVector,
|
||||
MIL_DOUBLE ZPos2OrVector,
|
||||
MIL_DOUBLE Length,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dgeoMatrixSetWithAxes(MIL_ID Matrix3dgeoId,
|
||||
MIL_INT64 Mode,
|
||||
MIL_DOUBLE OriginX,
|
||||
MIL_DOUBLE OriginY,
|
||||
MIL_DOUBLE OriginZ,
|
||||
MIL_DOUBLE Axis1VectorX,
|
||||
MIL_DOUBLE Axis1VectorY,
|
||||
MIL_DOUBLE Axis1VectorZ,
|
||||
MIL_DOUBLE Axis2VectorX,
|
||||
MIL_DOUBLE Axis2VectorY,
|
||||
MIL_DOUBLE Axis2VectorZ,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dgeoConstruct(MIL_ID Src1Geometry3dgeoId,
|
||||
MIL_ID Src2Geometry3dgeoId,
|
||||
MIL_ID DstGeometry3dgeoId,
|
||||
MIL_INT GeometryType,
|
||||
MIL_INT64 Operation,
|
||||
MIL_DOUBLE Param,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT MFTYPE M3dgeoEvalCurveDouble(MIL_ID Geometry3dgeoId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT NumPoints,
|
||||
const MIL_DOUBLE* SrcCoordArrayPtr,
|
||||
MIL_DOUBLE* Dst1CoordArrayPtr,
|
||||
MIL_DOUBLE* Dst2CoordArrayPtr,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT MFTYPE M3dgeoEvalCurveFloat(MIL_ID Geometry3dgeoId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT NumPoints,
|
||||
const MIL_FLOAT* SrcCoordArrayPtr,
|
||||
MIL_FLOAT* Dst1CoordArrayPtr,
|
||||
MIL_FLOAT* Dst2CoordArrayPtr,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT MFTYPE M3dgeoEvalSurfaceDouble(MIL_ID Geometry3dgeoId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT NumPoints,
|
||||
const MIL_DOUBLE* Src1CoordArrayPtr,
|
||||
const MIL_DOUBLE* Src2CoordArrayPtr,
|
||||
MIL_DOUBLE* DstCoordArrayPtr,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT MFTYPE M3dgeoEvalSurfaceFloat(MIL_ID Geometry3dgeoId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT NumPoints,
|
||||
const MIL_FLOAT* Src1CoordArrayPtr,
|
||||
const MIL_FLOAT* Src2CoordArrayPtr,
|
||||
MIL_FLOAT* DstCoordArrayPtr,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
//M3dgeo Control
|
||||
|
||||
|
||||
|
||||
#if M_MIL_USE_UNICODE
|
||||
void MFTYPE M3dgeoSaveA(MIL_CONST_TEXTA_PTR FileName,
|
||||
MIL_ID GeometryOrMatrix3dgeoId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_ID MFTYPE M3dgeoRestoreA(MIL_CONST_TEXTA_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* GeometryOrMatrix3dgeoIdPtr);
|
||||
|
||||
void MFTYPE M3dgeoStreamA(MIL_TEXTA_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* GeometryOrMatrix3dgeoIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
|
||||
void MFTYPE M3dgeoSaveW(MIL_CONST_TEXTW_PTR FileName,
|
||||
MIL_ID GeometryOrMatrix3dgeoId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_ID MFTYPE M3dgeoRestoreW(MIL_CONST_TEXTW_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* GeometryOrMatrix3dgeoIdPtr);
|
||||
|
||||
void MFTYPE M3dgeoStreamW(MIL_TEXTW_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* GeometryOrMatrix3dgeoIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
|
||||
|
||||
|
||||
#if M_MIL_UNICODE_API
|
||||
#define M3dgeoSave M3dgeoSaveW
|
||||
#define M3dgeoRestore M3dgeoRestoreW
|
||||
#define M3dgeoStream M3dgeoStreamW
|
||||
//#define M3dgeoImport M3dgeoImportW
|
||||
#else
|
||||
#define M3dgeoSave M3dgeoSaveA
|
||||
#define M3dgeoRestore M3dgeoRestoreA
|
||||
#define M3dgeoStream M3dgeoStreamA
|
||||
//#define M3dgeoImport M3dgeoImportA
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
void MFTYPE M3dgeoSave(MIL_CONST_TEXT_PTR FileName,
|
||||
MIL_ID GeometryOrMatrix3dgeoId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_ID MFTYPE M3dgeoRestore(MIL_CONST_TEXT_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* GeometryOrMatrix3dgeoIdPtr);
|
||||
|
||||
void MFTYPE M3dgeoStream(MIL_TEXT_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* GeometryOrMatrix3dgeoIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
|
||||
#endif // M_MIL_USE_UNICODE
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
inline void MFTYPE M3dgeoStreamCpp(MilStreamParam MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* GeometryOrMatrix3dgeoIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
M3dgeoStream(MemPtrOrFileName.m_Param, SysId, Operation, StreamType, Version, ControlFlag, GeometryOrMatrix3dgeoIdPtr, SizeByteVarPtr);
|
||||
}
|
||||
|
||||
#undef M3dgeoStream
|
||||
#define M3dgeoStream M3dgeoStreamCpp
|
||||
|
||||
#endif // __cplusplus
|
||||
#ifdef __cplusplus
|
||||
inline void M3dgeoMatrixGet(MIL_ID Matrix3dgeoId,
|
||||
MIL_INT64 GetType,
|
||||
MIL_DOUBLE* UserArrayPtr)
|
||||
{
|
||||
return M3dgeoMatrixGetDouble(Matrix3dgeoId, GetType, UserArrayPtr);
|
||||
}
|
||||
inline void M3dgeoMatrixGet(MIL_ID Matrix3dgeoId,
|
||||
MIL_INT64 GetType,
|
||||
MIL_FLOAT* UserArrayPtr)
|
||||
{
|
||||
return M3dgeoMatrixGetFloat(Matrix3dgeoId, GetType, UserArrayPtr);
|
||||
}
|
||||
inline void M3dgeoMatrixPut(MIL_ID Matrix3dgeoId,
|
||||
MIL_INT64 PutType,
|
||||
const MIL_DOUBLE* UserArrayPtr)
|
||||
{
|
||||
return M3dgeoMatrixPutDouble(Matrix3dgeoId, PutType, UserArrayPtr);
|
||||
}
|
||||
inline void M3dgeoMatrixPut(MIL_ID Matrix3dgeoId,
|
||||
MIL_INT64 PutType,
|
||||
const MIL_FLOAT* UserArrayPtr)
|
||||
{
|
||||
return M3dgeoMatrixPutFloat(Matrix3dgeoId, PutType, UserArrayPtr);
|
||||
}
|
||||
|
||||
inline MIL_INT M3dgeoEvalCurve(MIL_ID Geometry3dgeoId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT NumPoints,
|
||||
const MIL_DOUBLE* SrcCoordArrayPtr,
|
||||
MIL_DOUBLE* Dst1CoordArrayPtr,
|
||||
MIL_DOUBLE* Dst2CoordArrayPtr,
|
||||
MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dgeoEvalCurveDouble(Geometry3dgeoId,
|
||||
Operation,
|
||||
NumPoints,
|
||||
SrcCoordArrayPtr,
|
||||
Dst1CoordArrayPtr,
|
||||
Dst2CoordArrayPtr,
|
||||
ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_INT M3dgeoEvalCurve(MIL_ID Geometry3dgeoId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT NumPoints,
|
||||
const MIL_FLOAT* SrcCoordArrayPtr,
|
||||
MIL_FLOAT* Dst1CoordArrayPtr,
|
||||
MIL_FLOAT* Dst2CoordArrayPtr,
|
||||
MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dgeoEvalCurveFloat(Geometry3dgeoId,
|
||||
Operation,
|
||||
NumPoints,
|
||||
SrcCoordArrayPtr,
|
||||
Dst1CoordArrayPtr,
|
||||
Dst2CoordArrayPtr,
|
||||
ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_INT M3dgeoEvalSurface(MIL_ID Geometry3dgeoId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT NumPoints,
|
||||
const MIL_DOUBLE* Src1CoordArrayPtr,
|
||||
const MIL_DOUBLE* Src2CoordArrayPtr,
|
||||
MIL_DOUBLE* DstCoordArrayPtr,
|
||||
MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dgeoEvalSurfaceDouble(Geometry3dgeoId,
|
||||
Operation,
|
||||
NumPoints,
|
||||
Src1CoordArrayPtr,
|
||||
Src2CoordArrayPtr,
|
||||
DstCoordArrayPtr,
|
||||
ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_INT M3dgeoEvalSurface(MIL_ID Geometry3dgeoId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT NumPoints,
|
||||
const MIL_FLOAT* Src1CoordArrayPtr,
|
||||
const MIL_FLOAT* Src2CoordArrayPtr,
|
||||
MIL_FLOAT* DstCoordArrayPtr,
|
||||
MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dgeoEvalSurfaceFloat(Geometry3dgeoId,
|
||||
Operation,
|
||||
NumPoints,
|
||||
Src1CoordArrayPtr,
|
||||
Src2CoordArrayPtr,
|
||||
DstCoordArrayPtr,
|
||||
ControlFlag);
|
||||
}
|
||||
|
||||
#else
|
||||
#define M3dgeoMatrixGet M3dgeoMatrixGetDouble
|
||||
#define M3dgeoMatrixPut M3dgeoMatrixPutDouble
|
||||
#define M3dgeoEvalCurve M3dgeoEvalCurveDouble
|
||||
#define M3dgeoEvalSurface M3dgeoEvalSurfaceDouble
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
// ----------------------------------------------------------
|
||||
// M3dgeoInquire
|
||||
inline MIL_DOUBLE MFTYPE M3dgeoInquireSafeType(MIL_ID GeometryOrMatrix3dgeoId, MIL_INT64 InquireType, MilVoidPtr UserVarPtr)
|
||||
{
|
||||
MIL_INT64 RequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
if(!(M_DEFAULT_DATA_TYPE_BIT_SET(InquireType) || M_RECOMMENDED_DATA_TYPE_BIT_SET(InquireType)))
|
||||
{
|
||||
M3dgeoInquire(GeometryOrMatrix3dgeoId, InquireType | M_DEFAULT_DATA_TYPE, &RequiredParamType);
|
||||
}
|
||||
if(!MfuncPointerIsCompatible(RequiredParamType, UserVarPtr.Type, InquireType))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgeoInquire"));
|
||||
}
|
||||
return M3dgeoInquire(GeometryOrMatrix3dgeoId, InquireType, UserVarPtr.Ptr);
|
||||
}
|
||||
|
||||
inline MIL_DOUBLE MFTYPE M3dgeoInquireUnsafe(MIL_ID GeometryOrMatrix3dgeoId, MIL_INT64 InquireType, void* UserVarPtr)
|
||||
{
|
||||
return M3dgeoInquire(GeometryOrMatrix3dgeoId, InquireType, UserVarPtr);
|
||||
}
|
||||
|
||||
#define M3dgeoInquire M3dgeoInquireSafeType
|
||||
|
||||
#else // #if M_MIL_USE_SAFE_TYPE
|
||||
#define M3dgeoInquireUnsafe M3dgeoInquire
|
||||
#endif // #if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
#endif
|
||||
#if M_MIL_USE_STRING
|
||||
inline void MFTYPE M3dgeoSave(const MIL_STRING& FileName, MIL_ID GeometryOrMatrix3dgeoId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dgeoSave(FileName.c_str(), GeometryOrMatrix3dgeoId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE M3dgeoRestore(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* GeometryOrMatrix3dgeoIdPtr)
|
||||
{
|
||||
return M3dgeoRestore(FileName.c_str(), SysId, ControlFlag, GeometryOrMatrix3dgeoIdPtr);
|
||||
}
|
||||
#endif /* M_MIL_USE_STRING */
|
||||
// ----------------------------------------------------------
|
||||
// Overload for std::vector.
|
||||
#if defined(M_MIL_USE_VECTOR) && M_MIL_USE_VECTOR
|
||||
// ----------------------------------------------------------
|
||||
// Overloads for std::vector in M3dgeoInquire.
|
||||
template <typename UserType>
|
||||
inline MIL_DOUBLE MFTYPE M3dgeoInquire(MIL_ID GeometryOrMatrix3dgeoId, MIL_INT64 InquireType, std::vector<UserType> &UserVarPtr)
|
||||
{
|
||||
// If the given MIL data type is not the same as the SrcType, change it to the correct one
|
||||
// and give a warning.
|
||||
MIL_INT64 InternalTrueDataTypeForStdVector = MilTraits<UserType>::TypeFlag;
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(M_GET_HLVLDATATYPE(InquireType) != 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgeoInquire"), MIL_TEXT("Combination value for the required data type is not supported with std::vector overload."));
|
||||
}
|
||||
#endif
|
||||
|
||||
InquireType = M_STRIP_HLVLDATATYPE(InquireType) + InternalTrueDataTypeForStdVector;
|
||||
|
||||
MIL_INT InternalNumberOfElementsForStdVector = 0;
|
||||
M3dgeoInquire(GeometryOrMatrix3dgeoId, M_STRIP_HLVLDATATYPE(InquireType) + M_NB_ELEMENTS + M_TYPE_MIL_INT, &InternalNumberOfElementsForStdVector);
|
||||
|
||||
UserVarPtr.resize(InternalNumberOfElementsForStdVector);
|
||||
|
||||
if(InternalNumberOfElementsForStdVector > 0)
|
||||
{
|
||||
return M3dgeoInquire(GeometryOrMatrix3dgeoId, InquireType, &UserVarPtr[0]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
// ----------------------------------------------------------
|
||||
// Overloads for std::vector in M3dgeoMatrixPut.
|
||||
template <typename T>
|
||||
inline void MFTYPE M3dgeoMatrixPut(MIL_ID Matrix3dgeoId,
|
||||
MIL_INT64 PutType,
|
||||
const std::vector<T>& ArrayPtr)
|
||||
{
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(ArrayPtr.empty())
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgeoMatrixPut"), MIL_TEXT("The input vector cannot be empty."));
|
||||
}
|
||||
|
||||
if(ArrayPtr.size() != 16)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgeoMatrixPut"), MIL_TEXT("The size of the input vector must be 16."));
|
||||
}
|
||||
#endif
|
||||
M3dgeoMatrixPut(Matrix3dgeoId,
|
||||
PutType,
|
||||
&ArrayPtr[0]);
|
||||
}
|
||||
// Overloads for std::vector in M3dgeoMatrixGet.
|
||||
template <typename T>
|
||||
inline void M3dgeoMatrixGet(MIL_ID Matrix3dgeoId,
|
||||
MIL_INT64 GetType,
|
||||
std::vector<T>& ArrayPtr)
|
||||
{
|
||||
ArrayPtr.resize(16);//InternalNbElementRequired
|
||||
M3dgeoMatrixGet(Matrix3dgeoId,
|
||||
GetType,
|
||||
&ArrayPtr[0]);
|
||||
}
|
||||
|
||||
// Overloads for std::vector in M3dgeoEvalCurve.
|
||||
template <typename T>
|
||||
inline MIL_INT MFTYPE M3dgeoEvalCurve(MIL_ID Geometry3dgeoId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT NumPoints,
|
||||
const std::vector<T>& SrcCoordArrayPtr,
|
||||
std::vector<T>& Dst1CoordArrayPtr,
|
||||
CMilArrayParamOut Dst2CoordArrayPtr,
|
||||
MIL_INT64 ControlFlag)
|
||||
{
|
||||
const bool PackedSource = ((Operation & M_PACKED) == M_PACKED) || ((Operation & M_PACKED_SRC) == M_PACKED_SRC);
|
||||
const bool PackedDestination = ((Operation & M_PACKED) == M_PACKED) || ((Operation & M_PACKED_DST) == M_PACKED_DST);
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(!Dst2CoordArrayPtr.IsValidParam())
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgeoEvalCurve"), MIL_TEXT("The arrays cannot be a non-zero integer."));
|
||||
}
|
||||
if(!Dst2CoordArrayPtr.IsNullPtr() && Dst2CoordArrayPtr.GetMilDataType() != MilTraits<T>::TypeFlag)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgeoEvalCurve"), MIL_TEXT("The output arrays must have the same data type."));
|
||||
}
|
||||
if(NumPoints > (MIL_INT)SrcCoordArrayPtr.size() && NumPoints != M_DEFAULT)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgeoEvalCurve"), MIL_TEXT("NumPoints parameter must be smaller or equal (M_DEFAULT) to the size of input vector."));
|
||||
}
|
||||
if(NumPoints <= 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgeoEvalCurve"), MIL_TEXT("NumPoints must be greater than zero."));
|
||||
}
|
||||
if(PackedSource && SrcCoordArrayPtr.size() % 3 != 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgeoEvalCurve"), MIL_TEXT("Packed source array length is not multiple of 3"));
|
||||
}
|
||||
if(PackedDestination && !Dst2CoordArrayPtr.IsNullPtr())
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dimGetList"), MIL_TEXT("The second output array must be null when the output is M_PACKED."));
|
||||
}
|
||||
#endif
|
||||
|
||||
MIL_INT EffectiveNumPoints = (MIL_INT)(PackedSource ? SrcCoordArrayPtr.size() / 3 : SrcCoordArrayPtr.size());
|
||||
if(EffectiveNumPoints > NumPoints)
|
||||
EffectiveNumPoints = NumPoints;
|
||||
|
||||
Dst1CoordArrayPtr.resize((PackedDestination ? 3 : 1) * EffectiveNumPoints);
|
||||
Dst2CoordArrayPtr.Resize<T>(EffectiveNumPoints);
|
||||
|
||||
if(EffectiveNumPoints == 0)
|
||||
return EffectiveNumPoints;
|
||||
|
||||
return M3dgeoEvalCurve(Geometry3dgeoId,
|
||||
Operation,
|
||||
EffectiveNumPoints,
|
||||
&SrcCoordArrayPtr[0],
|
||||
&Dst1CoordArrayPtr[0],
|
||||
Dst2CoordArrayPtr.GetData<T>(),
|
||||
ControlFlag);
|
||||
}
|
||||
|
||||
// Overloads for std::vector in M3dgeoEvalSurface.
|
||||
template <typename T>
|
||||
inline MIL_INT M3dgeoEvalSurface(MIL_ID Geometry3dgeoId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT NumPoints,
|
||||
const std::vector<T>& Src1CoordArrayPtr,
|
||||
CMilArrayParamIn Src2CoordArrayPtr,
|
||||
std::vector<T>& DstCoordArrayPtr,
|
||||
MIL_INT64 ControlFlag)
|
||||
{
|
||||
const bool PackedSource = ((Operation & M_PACKED) == M_PACKED) || ((Operation & M_PACKED_SRC) == M_PACKED_SRC);
|
||||
const bool PackedDestination = ((Operation & M_PACKED) == M_PACKED) || ((Operation & M_PACKED_DST) == M_PACKED_DST);
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(!Src2CoordArrayPtr.IsValidParam())
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgeoEvalSurface"), MIL_TEXT("The arrays cannot be a non-zero integer."));
|
||||
}
|
||||
if(!Src2CoordArrayPtr.IsNullPtr() && Src2CoordArrayPtr.GetMilDataType() != MilTraits<T>::TypeFlag)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgeoEvalSurface"), MIL_TEXT("The input arrays must have the same data type."));
|
||||
}
|
||||
if(!Src2CoordArrayPtr.IsNullPtr() && (MIL_INT)Src1CoordArrayPtr.size() != Src2CoordArrayPtr.Size<T>())
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgeoEvalSurface"), MIL_TEXT("The input arrays must have the same size."));
|
||||
}
|
||||
if(NumPoints > (MIL_INT)Src1CoordArrayPtr.size() && NumPoints != M_DEFAULT)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgeoEvalSurface"), MIL_TEXT("NumPoints parameter must be smaller or equal (M_DEFAULT) to the size of input vector."));
|
||||
}
|
||||
if(NumPoints <= 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgeoEvalSurface"), MIL_TEXT("NumPoints must be greater than zero."));
|
||||
}
|
||||
if(PackedSource && Src1CoordArrayPtr.size() % 3 != 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgeoEvalSurface"), MIL_TEXT("Packed source array length is not multiple of 3"));
|
||||
}
|
||||
if(PackedSource && !Src2CoordArrayPtr.IsNullPtr())
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgeoEvalSurface"), MIL_TEXT("The second input array must be null when the input is M_PACKED."));
|
||||
}
|
||||
#endif
|
||||
|
||||
MIL_INT EffectiveNumPoints = (MIL_INT)(PackedSource ? Src1CoordArrayPtr.size() / 3 : Src1CoordArrayPtr.size());
|
||||
if(EffectiveNumPoints > NumPoints)
|
||||
EffectiveNumPoints = NumPoints;
|
||||
|
||||
DstCoordArrayPtr.resize((PackedDestination ? 3 : 1) * EffectiveNumPoints);
|
||||
|
||||
return M3dgeoEvalSurface(Geometry3dgeoId,
|
||||
Operation,
|
||||
EffectiveNumPoints,
|
||||
&Src1CoordArrayPtr[0],
|
||||
Src2CoordArrayPtr.GetData<T>(),
|
||||
&DstCoordArrayPtr[0],
|
||||
ControlFlag);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// Overloads for std::vector in M3dgeoStream.
|
||||
inline void MFTYPE M3dgeoStream(std::vector<MIL_UINT8> &MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* GeometryOrMatrix3dgeoIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
MxxxStreamForStdVector(MemPtrOrFileName,
|
||||
SysId,
|
||||
Operation,
|
||||
StreamType,
|
||||
Version,
|
||||
ControlFlag,
|
||||
GeometryOrMatrix3dgeoIdPtr,
|
||||
SizeByteVarPtr,
|
||||
M3dgeoStream);
|
||||
}
|
||||
#endif // defined(M_MIL_USE_VECTOR) && M_MIL_USE_VECTOR
|
||||
// Automatic double casting
|
||||
#define M3dgeoMatrixSetTransform(Matrix3dgeoId, TransformType, Param1, Param2, Param3, Param4, ControlFlag) \
|
||||
M3dgeoMatrixSetTransformDouble(Matrix3dgeoId, TransformType, M_MILID_TO_DOUBLE(Param1), M_MILID_TO_DOUBLE(Param2), M_MILID_TO_DOUBLE(Param3), M_MILID_TO_DOUBLE(Param4), ControlFlag)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// MIL_UNIQUE_ID support
|
||||
|
||||
#if M_MIL_USE_MIL_UNIQUE_ID
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
template <> inline bool MilIsCorrectObjectType<&M3dgeoFree>(MIL_INT64 ObjectType)
|
||||
{
|
||||
return (ObjectType == M_3DGEO_GEOMETRY || ObjectType == M_3DGEO_TRANSFORMATION_MATRIX);
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef MIL_UNIQUE_ID<&M3dgeoFree > MIL_UNIQUE_3DGEO_ID;
|
||||
|
||||
#if M_MIL_USE_MOVE_SEMANTICS
|
||||
|
||||
//3DGEO
|
||||
inline MIL_UNIQUE_3DGEO_ID M3dgeoAlloc(MIL_ID SysId, MIL_INT64 ObjectType, MIL_INT64 InitFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_3DGEO_ID(M3dgeoAlloc(SysId, ObjectType, InitFlag, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_3DGEO_ID M3dgeoRestore(MIL_CONST_TEXT_PTR FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_3DGEO_ID(M3dgeoRestore(FileName, SysId, ControlFlag, M_NULL));
|
||||
}
|
||||
#if M_MIL_USE_STRING
|
||||
inline MIL_UNIQUE_3DGEO_ID M3dgeoRestore(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_3DGEO_ID(M3dgeoRestore(FileName.c_str(), SysId, ControlFlag, M_NULL));
|
||||
}
|
||||
#endif // M_MIL_USE_STRING
|
||||
template <MilFreeFuncType FreeFunc> inline void M3dgeoFree(const MIL_UNIQUE_ID<FreeFunc>&) = delete;
|
||||
|
||||
inline void M3dgeoStream(MilStreamParam MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_UNIQUE_3DGEO_ID* Context3dgeoIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
MxxxStreamForMilUniqueId(MemPtrOrFileName, SysId, Operation, StreamType, Version, ControlFlag, Context3dgeoIdPtr, SizeByteVarPtr, M3dgeoStream);
|
||||
}
|
||||
#endif // M_MIL_USE_MOVE_SEMANTICS
|
||||
#endif // M_MIL_USE_MIL_UNIQUE_ID
|
||||
|
||||
// End of MIL_UNIQUE_ID support
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
// MbufConvert3d
|
||||
#define M_COMPENSATE 3713
|
||||
#define M_REMOVE_NON_FINITE 0x00000001L
|
||||
|
||||
|
||||
//Export
|
||||
#define M_WITH_ORGANIZATION 0x0100000
|
||||
|
||||
void MFTYPE MbufConvert3d(MIL_ID SrcContainerOrImageBufId,
|
||||
MIL_ID DstContainerOrImageBufId,
|
||||
MIL_ID ExternalYArrayBufId,
|
||||
MIL_INT64 DstOptions,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#endif // __MIL3D_H__
|
||||
967
Include/ClassicMIL/MILDyn/mil3dgra.h
Normal file
967
Include/ClassicMIL/MILDyn/mil3dgra.h
Normal file
@ -0,0 +1,967 @@
|
||||
/////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Filename : MIL3DGRA.H
|
||||
// Content : Define for the MIL 3DGRA module
|
||||
// Revision : 10.60.0776
|
||||
//
|
||||
// Copyright © Matrox Electronic Systems Ltd., 1992-2023.
|
||||
// All Rights Reserved
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef __MIL3DGRA_H__
|
||||
#define __MIL3DGRA_H__
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
typedef MIL_HOOK_FUNCTION_PTR MIL_3DGRA_HOOK_FUNCTION_PTR;
|
||||
|
||||
// Control values
|
||||
#define M_ROOT_NODE 0
|
||||
#define M_NO_LABEL 0x20000000L // Also defined in milreg.h
|
||||
#define M_LIST 0x08000000L /* already defined in mil.h */
|
||||
#define M_DEFAULT_SETTINGS 0x04000000L
|
||||
#define M_SELECTABLE 50L // Already defined in mil.h
|
||||
#define M_EDITABLE 1772L // Already defined in mil.h
|
||||
#define M_SCALABLE 5699L
|
||||
|
||||
// M3dgraAlloc
|
||||
// 1000-2000
|
||||
|
||||
#define M_GRAPHIC_TYPE_ARC 1505L // already defined in mil.h
|
||||
#define M_GRAPHIC_TYPE_DOTS 1507L // already defined in mil.h
|
||||
#define M_GRAPHIC_TYPE_LINE 1508L // already defined in mil.h
|
||||
#define M_GRAPHIC_TYPE_LINES 1509L // already defined in mil.h
|
||||
#define M_GRAPHIC_TYPE_POLYGON 1510L // already defined in mil.h
|
||||
#define M_GRAPHIC_TYPE_TEXT 1513L // already defined in mil.h
|
||||
#define M_GRAPHIC_TYPE_AXIS 3881L
|
||||
#define M_GRAPHIC_TYPE_BOX 3882L
|
||||
#define M_GRAPHIC_TYPE_POINT_CLOUD 3883L
|
||||
#define M_GRAPHIC_TYPE_CYLINDER 3884L
|
||||
#define M_GRAPHIC_TYPE_GRID 3885L
|
||||
#define M_GRAPHIC_TYPE_PLANE 3886L
|
||||
#define M_GRAPHIC_TYPE_QUAD 3887L
|
||||
#define M_GRAPHIC_TYPE_SPHERE 3888L
|
||||
#define M_GRAPHIC_TYPE_NODE 3889L
|
||||
|
||||
|
||||
// M3dgraCopy
|
||||
#define M_CLIPPING_BOX 3868L
|
||||
#define M_GRAPHIC 3879L
|
||||
#define M_COLOR_LUT 3945L
|
||||
#define M_RECURSIVE 0x00040000 // already defined in milmod.h
|
||||
#define M_CHILDREN_ONLY 0x00080000
|
||||
#define M_BOUNDING_BOX 0x00000003L // already defined
|
||||
#define M_GEOMETRY 1306L // Already defined
|
||||
|
||||
// Gralist controls
|
||||
#define M_BOTH_CORNERS 0x00000004L // Already defined in mil.h
|
||||
#define M_CENTER_AND_DIMENSION 0x00000002L // Already defined in
|
||||
#define M_POINT_AND_VECTOR 4670
|
||||
#define M_VISIBLE 1533L // Already defined in mil.h
|
||||
#define M_LABEL_EXISTS 4671
|
||||
#define M_POSITION_X 0x00003400L // Already defined in milim.h
|
||||
#define M_POSITION_Y 0x00004400L // Already defined in milim.h
|
||||
#define M_POSITION_Z 3960L
|
||||
#define M_EDITABLE_COLOR 3961L
|
||||
#define M_EDITABLE_OPACITY 3962L
|
||||
#define M_EDITABLE_APPEARANCE 3963L
|
||||
#define M_SELECTION_RADIUS 1219L // Already defined in mil.h
|
||||
|
||||
// Container
|
||||
#define M_TRANSFORMATION_MATRIX 72L // Already defined in milreg.h
|
||||
#define M_BUFFER_LIMITS 4672
|
||||
#define M_DATA_EXTREMES_GLOBAL 4673
|
||||
#define M_DATA_EXTREMES_PER_BAND 4674
|
||||
#define M_USER_DEFINED 21L // Already defined in alot of places
|
||||
#define M_AUTO_COLOR 0x00100000L
|
||||
#define M_CONTAINER_ID 4675
|
||||
#define M_GRAPHIC_RESOLUTION 4676
|
||||
#define M_LINK 0x00000001L // Already defined in mil.h
|
||||
#define M_NO_LINK 0x00000004L
|
||||
|
||||
// Dots
|
||||
#define M_PER_POINT 3873L
|
||||
|
||||
// Lines
|
||||
#define M_PER_LINE 5557L
|
||||
|
||||
// Axis
|
||||
#define M_PER_AXIS 3956L
|
||||
|
||||
//Plane
|
||||
#define M_THREE_POINTS 3390 // Already defined in mil3dgeo.h
|
||||
#define M_COEFFICIENTS 3388
|
||||
#define M_POINT_AND_NORMAL 3389
|
||||
#define M_POINT_AND_TWO_VECTORS 3391
|
||||
// Text
|
||||
#define M_GRAPHIC_TEXT (3869L | M_CLIENT_ENCODING)
|
||||
#define M_FONT (7L | M_CLIENT_ENCODING) // Already defined in mil.h
|
||||
#define M_TEXT_ALIGN_HORIZONTAL 58L // Already defined in Mil.h
|
||||
#define M_TEXT_ALIGN_VERTICAL 71L // Already defined in Mil.h
|
||||
#define M_TEXT_BORDER 1785L // Already defined in Mil.h
|
||||
#define M_TEXT_DIRECTION 0x01000061L // Already defined in Mil.h
|
||||
#define M_TEXT_SHADING 4747L
|
||||
#define M_BACKGROUND_MODE 12L // Already defined in Mil.h
|
||||
//Cylinder
|
||||
#define M_TWO_POINTS 3657
|
||||
// Arc
|
||||
#define M_CENTER_AND_TWO_POINTS 3875L
|
||||
#define M_CENTER_AND_TWO_VECTORS 3876L
|
||||
#define M_NORMAL_AND_ANGLE 3877L
|
||||
|
||||
// Grid
|
||||
#define M_SIZE_AND_SPACING 3932L
|
||||
#define M_TILES_AND_SPACING 3933L
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// M3dgraControl
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// MIL_INT64 CONTROLS
|
||||
#define M_COLOR_COMPONENT 4678
|
||||
#define M_APPEARANCE 4679
|
||||
#define M_COLOR_LIMITS 4680
|
||||
#define M_COLOR_LUT_ID 5753
|
||||
#define M_COLOR_LUT_SIZE 4681
|
||||
#define M_COLOR_LUT_SIZE_BAND 4682
|
||||
#define M_COLOR_COMPONENT_BAND 4683
|
||||
#define M_COLOR_USE_LUT 4684
|
||||
#define M_CHILDREN 4685
|
||||
#define M_NUMBER_OF_CHILDREN 4686
|
||||
#define M_PARENT 4687
|
||||
#define M_DISPLAY_BASES 4688
|
||||
#define M_COLOR_AXIS_X 4689
|
||||
#define M_COLOR_AXIS_Y 4690
|
||||
#define M_COLOR_AXIS_Z 4691
|
||||
#define M_SAME_AS_COLOR 4692
|
||||
#define M_COLOR_USE_TEXTURE 4693
|
||||
#define M_COLOR_TEXTURE_SIZE_X 4694
|
||||
#define M_COLOR_TEXTURE_SIZE_Y 4695
|
||||
#define M_COLOR_TEXTURE_SIZE_BAND 4696
|
||||
#define M_COLOR_TEXTURE 4697
|
||||
#define M_SHADING 4698
|
||||
#define M_FLAT 4699
|
||||
#define M_GOURAUD 4700
|
||||
#define M_PHONG 4726
|
||||
#define M_KEYING_COLOR 4727
|
||||
#define M_GRAPHIC_TYPE 1518L // Already defined in mil.h
|
||||
#define M_FILL_COLOR (M_DISP_CONTROL_START+193L) // already defined in mildisplay.h
|
||||
#define M_BASES 4153
|
||||
|
||||
#define M_POINTS 0x00000010L
|
||||
#define M_WIREFRAME 0x00000020L
|
||||
#define M_SOLID 0x00000040L
|
||||
#define M_SOLID_WITH_WIREFRAME (M_SOLID + M_WIREFRAME)
|
||||
//#define M_VIEW_BASED_POSITION_PIXEL 0x80000
|
||||
|
||||
// MIL_DOUBLE CONTROLS
|
||||
#define M_OPACITY 4728
|
||||
#define M_COLOR_LIMITS_MIN 4729
|
||||
#define M_COLOR_LIMITS_MAX 4730
|
||||
#define M_POINTS_X 4733
|
||||
#define M_POINTS_Y 4734
|
||||
#define M_POINTS_Z 4735
|
||||
#define M_START_POINTS_X 5558
|
||||
#define M_START_POINTS_Y 5559
|
||||
#define M_START_POINTS_Z 5560
|
||||
#define M_END_POINTS_X 5561
|
||||
#define M_END_POINTS_Y 5562
|
||||
#define M_END_POINTS_Z 5563
|
||||
#define M_SPACING_X 4736
|
||||
#define M_SPACING_Y 4737
|
||||
#define M_FONT_SIZE 0x01000060L // already defined in Mil.h
|
||||
#define M_THICKNESS 3L // also used in MgraLines
|
||||
#define M_TRANSFORM_TYPES_SHIFT 8L // =utilities= (also defined in milcal.h)
|
||||
#define M_RELATIVE_TO_ROOT (256 << M_TRANSFORM_TYPES_SHIFT)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Hook values
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define M_OBJ_HOOK_MODULE_RANGE_START 0x00000FE00L // Already defined in mil.h
|
||||
#define M_OBJ_HOOK_MODULE_RANGE_END 0x00000FFFFL // Already defined in mil.h
|
||||
|
||||
// 3ddisplay hook8
|
||||
#define M_EDITABLE_GRAPHIC_MODIFIED (M_OBJ_HOOK_MODULE_RANGE_START + 02L)
|
||||
#define M_HANDLE_GRAPHIC_TRANSLATED (M_OBJ_HOOK_MODULE_RANGE_START + 03L)
|
||||
#define M_HANDLE_GRAPHIC_ROTATED (M_OBJ_HOOK_MODULE_RANGE_START + 04L)
|
||||
#define M_HANDLE_GRAPHIC_CLICKED (M_OBJ_HOOK_MODULE_RANGE_START + 05L)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Deprecated starting 10 SP5
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#if OldDefinesSupport
|
||||
#define M_CYLINDER_BASES 4688
|
||||
|
||||
MIL_DEPRECATED(M_CYLINDER_BASES, 1050)
|
||||
#endif
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// M3dgra calls
|
||||
MIL_INT64 MFTYPE M3dgraAdd(MIL_ID List3dgraId,
|
||||
MIL_INT64 ParentLabel,
|
||||
MIL_ID ContainerOrImageBufId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_ID MFTYPE M3dgraAlloc(MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* List3dgraIdPtr);
|
||||
|
||||
void MFTYPE M3dgraControlDouble(MIL_ID List3dgraId,
|
||||
MIL_INT64 Label,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_DOUBLE ControlValue);
|
||||
|
||||
void MFTYPE M3dgraControlInt64 (MIL_ID List3dgraId,
|
||||
MIL_INT64 Label,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_INT64 ControlValue);
|
||||
|
||||
void MFTYPE M3dgraFree(MIL_ID List3dgraId);
|
||||
|
||||
MIL_INT64 MFTYPE M3dgraInquire(MIL_ID List3dgraId,
|
||||
MIL_INT64 Label,
|
||||
MIL_INT64 InquireType,
|
||||
void* UserVarPtr);
|
||||
|
||||
void MFTYPE M3dgraRemove(MIL_ID List3dgraId,
|
||||
MIL_INT64 Label,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT MFTYPE M3dgraGetHookInfo(MIL_ID EventId,
|
||||
MIL_INT64 InfoType,
|
||||
void* UserVarPtr);
|
||||
|
||||
void MFTYPE M3dgraHookFunction(MIL_ID List3dgraId,
|
||||
MIL_INT HookType,
|
||||
MIL_3DGRA_HOOK_FUNCTION_PTR HookHandlerPtr,
|
||||
void* UserDataPtr);
|
||||
|
||||
MIL_INT64 MFTYPE M3dgraBox(MIL_ID List3dgraId,
|
||||
MIL_INT64 ParentLabel,
|
||||
MIL_INT64 CreationMode,
|
||||
MIL_DOUBLE XPos1,
|
||||
MIL_DOUBLE YPos1,
|
||||
MIL_DOUBLE ZPos1,
|
||||
MIL_DOUBLE XPos2OrLength,
|
||||
MIL_DOUBLE YPos2OrLength,
|
||||
MIL_DOUBLE ZPos2OrLength,
|
||||
MIL_ID Matrix3dgeoId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT64 MFTYPE M3dgraSphere(MIL_ID List3dgraId,
|
||||
MIL_INT64 ParentLabel,
|
||||
MIL_DOUBLE CenterX,
|
||||
MIL_DOUBLE CenterY,
|
||||
MIL_DOUBLE CenterZ,
|
||||
MIL_DOUBLE Radius,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT64 MFTYPE M3dgraCylinder(MIL_ID List3dgraId,
|
||||
MIL_INT64 ParentLabel,
|
||||
MIL_INT64 CreationMode,
|
||||
MIL_DOUBLE XPos1,
|
||||
MIL_DOUBLE YPos1,
|
||||
MIL_DOUBLE ZPos1,
|
||||
MIL_DOUBLE XPos2OrVector,
|
||||
MIL_DOUBLE YPos2OrVector,
|
||||
MIL_DOUBLE ZPos2OrVector,
|
||||
MIL_DOUBLE Radius,
|
||||
MIL_DOUBLE Length,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT64 MFTYPE M3dgraGrid(MIL_ID List3dgraId,
|
||||
MIL_INT64 ParentLabel,
|
||||
MIL_INT64 CreationMode,
|
||||
MIL_ID Matrix3dgeoId,
|
||||
MIL_DOUBLE Param1,
|
||||
MIL_DOUBLE Param2,
|
||||
MIL_DOUBLE Param3,
|
||||
MIL_DOUBLE Param4,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT64 MFTYPE M3dgraLine(MIL_ID List3dgraId,
|
||||
MIL_INT64 ParentLabel,
|
||||
MIL_INT64 CreationMode,
|
||||
MIL_INT64 Symbol,
|
||||
MIL_DOUBLE PointX,
|
||||
MIL_DOUBLE PointY,
|
||||
MIL_DOUBLE PointZ,
|
||||
MIL_DOUBLE PointOrVectorX,
|
||||
MIL_DOUBLE PointOrVectorY,
|
||||
MIL_DOUBLE PointOrVectorZ,
|
||||
MIL_DOUBLE Length,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT64 MFTYPE M3dgraNode(MIL_ID List3dgraId,
|
||||
MIL_INT64 ParentLabel,
|
||||
MIL_ID Matrix3dgeoId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT64 MFTYPE M3dgraPlane(MIL_ID List3dgraId,
|
||||
MIL_INT64 ParentLabel,
|
||||
MIL_INT64 CreationMode,
|
||||
MIL_DOUBLE X1,
|
||||
MIL_DOUBLE Y1,
|
||||
MIL_DOUBLE Z1,
|
||||
MIL_DOUBLE X2OrD,
|
||||
MIL_DOUBLE Y2,
|
||||
MIL_DOUBLE Z2,
|
||||
MIL_DOUBLE X3,
|
||||
MIL_DOUBLE Y3,
|
||||
MIL_DOUBLE Z3,
|
||||
MIL_DOUBLE Size,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT64 MFTYPE M3dgraArc(MIL_ID List3dgraId,
|
||||
MIL_INT64 ParentLabel,
|
||||
MIL_INT64 CreationMode,
|
||||
MIL_INT64 Symbol,
|
||||
MIL_DOUBLE X1,
|
||||
MIL_DOUBLE Y1,
|
||||
MIL_DOUBLE Z1,
|
||||
MIL_DOUBLE X2,
|
||||
MIL_DOUBLE Y2,
|
||||
MIL_DOUBLE Z2,
|
||||
MIL_DOUBLE X3,
|
||||
MIL_DOUBLE Y3,
|
||||
MIL_DOUBLE Z3,
|
||||
MIL_DOUBLE Angle,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT64 MFTYPE M3dgraDotsDouble(MIL_ID List3dgraId,
|
||||
MIL_INT64 ParentLabel,
|
||||
MIL_INT NumPoints,
|
||||
const MIL_DOUBLE* CoordXArrayPtr,
|
||||
const MIL_DOUBLE* CoordYArrayPtr,
|
||||
const MIL_DOUBLE* CoordZArrayPtr,
|
||||
const MIL_UINT8* PointsRArrayPtr,
|
||||
const MIL_UINT8* PointsGArrayPtr,
|
||||
const MIL_UINT8* PointsBArrayPtr,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT64 MFTYPE M3dgraDotsFloat(MIL_ID List3dgraId,
|
||||
MIL_INT64 ParentLabel,
|
||||
MIL_INT NumPoints,
|
||||
const MIL_FLOAT* CoordXArrayPtr,
|
||||
const MIL_FLOAT* CoordYArrayPtr,
|
||||
const MIL_FLOAT* CoordZArrayPtr,
|
||||
const MIL_UINT8* PointsRArrayPtr,
|
||||
const MIL_UINT8* PointsGArrayPtr,
|
||||
const MIL_UINT8* PointsBArrayPtr,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT64 MFTYPE M3dgraLinesDouble(MIL_ID List3dgraId,
|
||||
MIL_INT64 ParentLabel,
|
||||
MIL_INT64 CreationMode,
|
||||
MIL_INT NumLines,
|
||||
const MIL_DOUBLE* CoordXArrayPtr,
|
||||
const MIL_DOUBLE* CoordYArrayPtr,
|
||||
const MIL_DOUBLE* CoordZArrayPtr,
|
||||
const MIL_DOUBLE* CoordX2ArrayPtr,
|
||||
const MIL_DOUBLE* CoordY2ArrayPtr,
|
||||
const MIL_DOUBLE* CoordZ2ArrayPtr,
|
||||
const MIL_UINT8* LinesRArrayPtr,
|
||||
const MIL_UINT8* LinesGArrayPtr,
|
||||
const MIL_UINT8* LinesBArrayPtr,
|
||||
MIL_DOUBLE Length,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT64 MFTYPE M3dgraLinesFloat(MIL_ID List3dgraId,
|
||||
MIL_INT64 ParentLabel,
|
||||
MIL_INT64 CreationMode,
|
||||
MIL_INT NumLines,
|
||||
const MIL_FLOAT* CoordXArrayPtr,
|
||||
const MIL_FLOAT* CoordYArrayPtr,
|
||||
const MIL_FLOAT* CoordZArrayPtr,
|
||||
const MIL_FLOAT* CoordX2ArrayPtr,
|
||||
const MIL_FLOAT* CoordY2ArrayPtr,
|
||||
const MIL_FLOAT* CoordZ2ArrayPtr,
|
||||
const MIL_UINT8* LinesRArrayPtr,
|
||||
const MIL_UINT8* LinesGArrayPtr,
|
||||
const MIL_UINT8* LinesBArrayPtr,
|
||||
MIL_DOUBLE Length,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT64 MFTYPE M3dgraCopy(MIL_ID SrcMilObjectId,
|
||||
MIL_INT64 SrcLabel,
|
||||
MIL_ID DstMilObjectId,
|
||||
MIL_INT64 DstLabel,
|
||||
MIL_INT64 CopyType,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT64 MFTYPE M3dgraPolygonDouble(MIL_ID List3dgraId,
|
||||
MIL_INT64 ParentLabel,
|
||||
MIL_INT64 CreationMode,
|
||||
MIL_INT NumPoints,
|
||||
const MIL_DOUBLE* CoordXArrayPtr,
|
||||
const MIL_DOUBLE* CoordYArrayPtr,
|
||||
const MIL_DOUBLE* CoordZArrayPtr,
|
||||
const MIL_DOUBLE* TextureXArrayPtr,
|
||||
const MIL_DOUBLE* TextureYArrayPtr,
|
||||
MIL_ID TextureBufId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT64 MFTYPE M3dgraPolygonFloat(MIL_ID List3dgraId,
|
||||
MIL_INT64 ParentLabel,
|
||||
MIL_INT64 CreationMode,
|
||||
MIL_INT NumPoints,
|
||||
const MIL_FLOAT* CoordXArrayPtr,
|
||||
const MIL_FLOAT* CoordYArrayPtr,
|
||||
const MIL_FLOAT* CoordZArrayPtr,
|
||||
const MIL_FLOAT* TextureXArrayPtr,
|
||||
const MIL_FLOAT* TextureYArrayPtr,
|
||||
MIL_ID TextureBufId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
// For CAPI calls with strings
|
||||
#if M_MIL_USE_UNICODE
|
||||
MIL_INT64 MFTYPE M3dgraTextA(MIL_ID List3dgraId, MIL_INT64 ParentLabel, MIL_CONST_TEXTA_PTR Text, MIL_ID Matrix3dgeoId, MIL_INT64 Options, MIL_INT64 ControlFlag);
|
||||
MIL_INT64 MFTYPE M3dgraTextW(MIL_ID List3dgraId, MIL_INT64 ParentLabel, MIL_CONST_TEXTW_PTR Text, MIL_ID Matrix3dgeoId, MIL_INT64 Options, MIL_INT64 ControlFlag);
|
||||
MIL_INT64 MFTYPE M3dgraAxisA(MIL_ID List3dgraId, MIL_INT64 ParentLabel, MIL_ID Matrix3dgeoId, MIL_DOUBLE AxisLength, MIL_CONST_TEXTA_PTR Name, MIL_INT64 Options, MIL_INT64 ControlFlag);
|
||||
MIL_INT64 MFTYPE M3dgraAxisW(MIL_ID List3dgraId, MIL_INT64 ParentLabel, MIL_ID Matrix3dgeoId, MIL_DOUBLE AxisLength, MIL_CONST_TEXTW_PTR Name, MIL_INT64 Options, MIL_INT64 ControlFlag);
|
||||
|
||||
|
||||
// create default calls
|
||||
#if M_MIL_UNICODE_API
|
||||
#define M3dgraText M3dgraTextW
|
||||
#define M3dgraAxis M3dgraAxisW
|
||||
|
||||
#else
|
||||
#define M3dgraText M3dgraTextA
|
||||
#define M3dgraAxis M3dgraAxisA
|
||||
#endif
|
||||
|
||||
#else
|
||||
MIL_INT64 MFTYPE M3dgraText(MIL_ID List3dgraId, MIL_INT64 ParentLabel, MIL_CONST_TEXT_PTR Text, MIL_ID Matrix3dgeoId, MIL_INT64 Options, MIL_INT64 ControlFlag);
|
||||
MIL_INT64 MFTYPE M3dgraAxis(MIL_ID List3dgraId, MIL_INT64 ParentLabel, MIL_ID Matrix3dgeoId, MIL_DOUBLE AxisLength, MIL_CONST_TEXT_PTR Name, MIL_INT64 Options, MIL_INT64 ControlFlag);
|
||||
#endif
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
// M3dgradots/polygon m_MeshData++ overloads
|
||||
#ifdef __cplusplus
|
||||
inline MIL_INT64 M3dgraDots(MIL_ID List3dgraId,
|
||||
MIL_INT64 ParentLabel,
|
||||
MIL_INT NumPoints,
|
||||
const MIL_DOUBLE* CoordXArrayPtr,
|
||||
const MIL_DOUBLE* CoordYArrayPtr,
|
||||
const MIL_DOUBLE* CoordZArrayPtr,
|
||||
const MIL_UINT8* PointsRArrayPtr,
|
||||
const MIL_UINT8* PointsGArrayPtr,
|
||||
const MIL_UINT8* PointsBArrayPtr,
|
||||
MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dgraDotsDouble(List3dgraId, ParentLabel, NumPoints, CoordXArrayPtr, CoordYArrayPtr, CoordZArrayPtr, PointsRArrayPtr, PointsGArrayPtr, PointsBArrayPtr, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_INT64 M3dgraDots(MIL_ID List3dgraId,
|
||||
MIL_INT64 ParentLabel,
|
||||
MIL_INT NumPoints,
|
||||
const MIL_FLOAT* CoordXArrayPtr,
|
||||
const MIL_FLOAT* CoordYArrayPtr,
|
||||
const MIL_FLOAT* CoordZArrayPtr,
|
||||
const MIL_UINT8* PointsRArrayPtr,
|
||||
const MIL_UINT8* PointsGArrayPtr,
|
||||
const MIL_UINT8* PointsBArrayPtr,
|
||||
MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dgraDotsFloat(List3dgraId, ParentLabel, NumPoints, CoordXArrayPtr, CoordYArrayPtr, CoordZArrayPtr, PointsRArrayPtr, PointsGArrayPtr, PointsBArrayPtr, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_INT64 M3dgraLines(MIL_ID List3dgraId,
|
||||
MIL_INT64 ParentLabel,
|
||||
MIL_INT64 CreationMode,
|
||||
MIL_INT NumLines,
|
||||
const MIL_DOUBLE* CoordXArrayPtr,
|
||||
const MIL_DOUBLE* CoordYArrayPtr,
|
||||
const MIL_DOUBLE* CoordZArrayPtr,
|
||||
const MIL_DOUBLE* CoordX2ArrayPtr,
|
||||
const MIL_DOUBLE* CoordY2ArrayPtr,
|
||||
const MIL_DOUBLE* CoordZ2ArrayPtr,
|
||||
const MIL_UINT8* LinesRArrayPtr,
|
||||
const MIL_UINT8* LinesGArrayPtr,
|
||||
const MIL_UINT8* LinesBArrayPtr,
|
||||
MIL_DOUBLE Length,
|
||||
MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dgraLinesDouble(List3dgraId, ParentLabel, CreationMode, NumLines, CoordXArrayPtr, CoordYArrayPtr, CoordZArrayPtr, CoordX2ArrayPtr, CoordY2ArrayPtr, CoordZ2ArrayPtr, LinesRArrayPtr, LinesGArrayPtr, LinesBArrayPtr, Length, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_INT64 M3dgraLines(MIL_ID List3dgraId,
|
||||
MIL_INT64 ParentLabel,
|
||||
MIL_INT64 CreationMode,
|
||||
MIL_INT NumLines,
|
||||
const MIL_FLOAT* CoordXArrayPtr,
|
||||
const MIL_FLOAT* CoordYArrayPtr,
|
||||
const MIL_FLOAT* CoordZArrayPtr,
|
||||
const MIL_FLOAT* CoordX2ArrayPtr,
|
||||
const MIL_FLOAT* CoordY2ArrayPtr,
|
||||
const MIL_FLOAT* CoordZ2ArrayPtr,
|
||||
const MIL_UINT8* LinesRArrayPtr,
|
||||
const MIL_UINT8* LinesGArrayPtr,
|
||||
const MIL_UINT8* LinesBArrayPtr,
|
||||
MIL_DOUBLE Length,
|
||||
MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dgraLinesFloat(List3dgraId, ParentLabel, CreationMode, NumLines, CoordXArrayPtr, CoordYArrayPtr, CoordZArrayPtr, CoordX2ArrayPtr, CoordY2ArrayPtr, CoordZ2ArrayPtr, LinesRArrayPtr, LinesGArrayPtr, LinesBArrayPtr, Length, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_INT64 M3dgraPolygon(MIL_ID List3dgraId,
|
||||
MIL_INT64 ParentLabel,
|
||||
MIL_INT64 CreationMode,
|
||||
MIL_INT NumPoints,
|
||||
const MIL_DOUBLE* CoordXArrayPtr,
|
||||
const MIL_DOUBLE* CoordYArrayPtr,
|
||||
const MIL_DOUBLE* CoordZArrayPtr,
|
||||
const MIL_DOUBLE* TextureXArrayPtr,
|
||||
const MIL_DOUBLE* TextureYArrayPtr,
|
||||
MIL_ID TextureBufId,
|
||||
MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dgraPolygonDouble(List3dgraId, ParentLabel, CreationMode, NumPoints, CoordXArrayPtr, CoordYArrayPtr, CoordZArrayPtr, TextureXArrayPtr, TextureYArrayPtr, TextureBufId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_INT64 M3dgraPolygon(MIL_ID List3dgraId,
|
||||
MIL_INT64 ParentLabel,
|
||||
MIL_INT64 CreationMode,
|
||||
MIL_INT NumPoints,
|
||||
const MIL_FLOAT* CoordXArrayPtr,
|
||||
const MIL_FLOAT* CoordYArrayPtr,
|
||||
const MIL_FLOAT* CoordZArrayPtr,
|
||||
const MIL_FLOAT* TextureXArrayPtr,
|
||||
const MIL_FLOAT* TextureYArrayPtr,
|
||||
MIL_ID TextureBufId,
|
||||
MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dgraPolygonFloat(List3dgraId, ParentLabel, CreationMode, NumPoints, CoordXArrayPtr, CoordYArrayPtr, CoordZArrayPtr, TextureXArrayPtr, TextureYArrayPtr, TextureBufId, ControlFlag);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
inline void M3dgraControl(MIL_ID List3dgraId, MIL_INT64 Label, MIL_INT64 ControlType, MIL_DOUBLE ControlValue)
|
||||
{
|
||||
M3dgraControlDouble(List3dgraId, Label, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void M3dgraControl(MIL_ID List3dgraId, MIL_INT64 Label, MIL_INT64 ControlType, MIL_INT64 ControlValue)
|
||||
{
|
||||
M3dgraControlInt64(List3dgraId, Label, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void M3dgraControl(MIL_ID List3dgraId, MIL_INT64 Label, MIL_INT64 ControlType, MIL_INT32 ControlValue)
|
||||
{
|
||||
M3dgraControlInt64(List3dgraId, Label, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
#if M_MIL_USE_STRING
|
||||
inline void M3dgraControl(MIL_ID List3dgraId, MIL_INT64 Label, MIL_INT64 ControlType, const MIL_STRING& ControlValue)
|
||||
{
|
||||
M3dgraControl(List3dgraId, Label, ControlType, M_PTR_TO_MIL_INT(ControlValue.c_str()));
|
||||
}
|
||||
#endif
|
||||
|
||||
inline void M3dgraControl(MIL_ID List3dgraId, MIL_INT64 Label, MIL_INT64 ControlType, MIL_CONST_TEXT_PTR ControlValuePtr)
|
||||
{
|
||||
M3dgraControl(List3dgraId, Label, ControlType, (MIL_INT)ControlValuePtr);
|
||||
}
|
||||
|
||||
#if !(M_MIL_USE_LINUX && M_MIL_USE_64BIT)
|
||||
inline void M3dgraControl(MIL_ID List3dgraId, MIL_INT64 Label, MIL_INT64 ControlType, int ControlValue)
|
||||
{
|
||||
M3dgraControlInt64(List3dgraId, Label, ControlType, ControlValue);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#else
|
||||
|
||||
#define M3dgraControl M3dgraControlDouble
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
// ----------------------------------------------------------
|
||||
// M3dgraInquire
|
||||
inline MIL_INT64 MFTYPE M3dgraInquireSafeType(MIL_ID List3dgraId, MIL_INT64 Label, MIL_INT64 InquireType, MilVoidPtr UserVarPtr)
|
||||
{
|
||||
MIL_INT64 RequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
if(!(M_DEFAULT_DATA_TYPE_BIT_SET(InquireType) || M_RECOMMENDED_DATA_TYPE_BIT_SET(InquireType)))
|
||||
{
|
||||
M3dgraInquire(List3dgraId, Label, InquireType | M_DEFAULT_DATA_TYPE, &RequiredParamType);
|
||||
}
|
||||
if(!MfuncPointerIsCompatible(RequiredParamType, UserVarPtr.Type, InquireType))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgraInquire"));
|
||||
}
|
||||
return M3dgraInquire(List3dgraId, Label, InquireType, UserVarPtr.Ptr);
|
||||
}
|
||||
|
||||
inline MIL_INT64 MFTYPE M3dgraInquireUnsafe(MIL_ID List3dgraId, MIL_INT64 Label, MIL_INT64 InquireType, void* UserVarPtr)
|
||||
{
|
||||
return M3dgraInquire(List3dgraId, Label, InquireType, UserVarPtr);
|
||||
}
|
||||
|
||||
#define M3dgraInquire M3dgraInquireSafeType
|
||||
|
||||
#else // #if M_MIL_USE_SAFE_TYPE
|
||||
#define M3dgraInquireUnsafe M3dgraInquire
|
||||
#endif // #if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
#endif //__cplusplus
|
||||
#if M_MIL_USE_STRING
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
inline MIL_INT64 MFTYPE M3dgraInquireSafeType(MIL_ID List3dgraId, MIL_INT64 Label, MIL_INT64 InquireType, MIL_STRING& UserVarPtr)
|
||||
{
|
||||
MIL_INT64 RetValue = 0;
|
||||
MIL_INT InternalStringSize = 0;
|
||||
|
||||
MIL_INT64 DataType = 0;
|
||||
M3dgraInquire(List3dgraId, Label, InquireType | M_DEFAULT_DATA_TYPE, &DataType);
|
||||
if(DataType != M_PARAM_TYPE_MIL_TEXT)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgraInquire"), MIL_TEXT("Inquire type not supported with MIL_STRING."));
|
||||
}
|
||||
|
||||
M3dgraInquire(List3dgraId, Label, InquireType + M_STRING_SIZE, &InternalStringSize);
|
||||
|
||||
if(InternalStringSize > 0)
|
||||
{
|
||||
UserVarPtr.assign(InternalStringSize, MIL_TEXT('\0'));
|
||||
RetValue = M3dgraInquire(List3dgraId, Label, InquireType, &UserVarPtr[0]);
|
||||
UserVarPtr.resize(InternalStringSize - 1);
|
||||
|
||||
}
|
||||
|
||||
return RetValue;
|
||||
}
|
||||
|
||||
#else
|
||||
inline MIL_INT64 MFTYPE M3dgraInquire(MIL_ID List3dgraId, MIL_INT64 Label, MIL_INT64 InquireType, MIL_STRING& UserVarPtr)
|
||||
{
|
||||
MIL_INT64 RetValue = 0;
|
||||
MIL_INT InternalStringSize = 0;
|
||||
|
||||
M3dgraInquire(List3dgraId, Label, InquireType + M_STRING_SIZE, &InternalStringSize);
|
||||
|
||||
if(InternalStringSize > 0)
|
||||
{
|
||||
UserVarPtr.assign(InternalStringSize, MIL_TEXT('\0'));
|
||||
RetValue = M3dgraInquire(List3dgraId, Label, InquireType, &UserVarPtr[0]);
|
||||
UserVarPtr.resize(InternalStringSize - 1);
|
||||
|
||||
}
|
||||
|
||||
return RetValue;
|
||||
}
|
||||
#endif
|
||||
|
||||
inline MIL_INT64 MFTYPE M3dgraText(MIL_ID List3dgraId, MIL_INT64 ParentLabel, const MIL_STRING& Text, MIL_ID Matrix3dgeoId, MIL_INT64 Options, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dgraText(List3dgraId, ParentLabel, Text.c_str(), Matrix3dgeoId, Options, ControlFlag);
|
||||
}
|
||||
|
||||
|
||||
inline MIL_INT64 M3dgraAxis(MIL_ID List3dgraId, MIL_INT64 ParentLabel, MIL_ID Matrix3dgeoId, MIL_DOUBLE AxisLength, const MIL_STRING& Name, MIL_INT64 Options, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dgraAxis(List3dgraId, ParentLabel, Matrix3dgeoId, AxisLength, Name.c_str(), Options, ControlFlag);
|
||||
}
|
||||
#endif /* M_MIL_USE_STRING */
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// Overload for std::vector.
|
||||
#if defined(M_MIL_USE_VECTOR) && M_MIL_USE_VECTOR
|
||||
// ----------------------------------------------------------
|
||||
// Overloads for std::vector in M3dgraInquire.
|
||||
template <typename UserType>
|
||||
inline MIL_INT64 MFTYPE M3dgraInquire(MIL_ID List3dgraId, MIL_INT64 Label, MIL_INT64 InquireType, std::vector<UserType> &UserVarPtr)
|
||||
{
|
||||
// If the given MIL data type is not the same as the SrcType, change it to the correct one
|
||||
// and give a warning.
|
||||
MIL_INT64 InternalTrueDataTypeForStdVector = MilTraits<UserType>::TypeFlag;
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(M_GET_HLVLDATATYPE(InquireType) != 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgraInquire"), MIL_TEXT("Combination value for the required data type is not supported with std::vector overload."));
|
||||
}
|
||||
#endif
|
||||
|
||||
InquireType = M_STRIP_HLVLDATATYPE(InquireType) + InternalTrueDataTypeForStdVector;
|
||||
|
||||
MIL_INT InternalNumberOfElementsForStdVector = 0;
|
||||
M3dgraInquire(List3dgraId, Label, M_STRIP_HLVLDATATYPE(InquireType) + M_NB_ELEMENTS + M_TYPE_MIL_INT, &InternalNumberOfElementsForStdVector);
|
||||
|
||||
UserVarPtr.resize(InternalNumberOfElementsForStdVector);
|
||||
|
||||
if(InternalNumberOfElementsForStdVector > 0)
|
||||
{
|
||||
return M3dgraInquire(List3dgraId, Label, InquireType, &UserVarPtr[0]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// Overloads for std::vector in M3dgraDots.
|
||||
template <typename UserType>
|
||||
inline MIL_INT64 MFTYPE M3dgraDots(MIL_ID List3dgraId,
|
||||
MIL_INT64 ParentLabel,
|
||||
MIL_INT NumPoints,
|
||||
const std::vector<UserType>& CoordXArrayPtr,
|
||||
const std::vector<UserType>& CoordYArrayPtr,
|
||||
const std::vector<UserType>& CoordZArrayPtr,
|
||||
CMilArrayParamIn PointsRArrayPtr,
|
||||
CMilArrayParamIn PointsGArrayPtr,
|
||||
CMilArrayParamIn PointsBArrayPtr,
|
||||
MIL_INT64 ControlFlag)
|
||||
{
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(!PointsRArrayPtr.IsValidParam() ||
|
||||
!PointsGArrayPtr.IsValidParam() ||
|
||||
!PointsBArrayPtr.IsValidParam())
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgraDots"), MIL_TEXT("The input arrays cannot be a non-zero integer."));
|
||||
}
|
||||
if((!PointsRArrayPtr.IsNullPtr() && PointsRArrayPtr.GetMilDataType() != MilTraits<MIL_UINT8>::TypeFlag) ||
|
||||
(!PointsGArrayPtr.IsNullPtr() && PointsGArrayPtr.GetMilDataType() != MilTraits<MIL_UINT8>::TypeFlag) ||
|
||||
(!PointsBArrayPtr.IsNullPtr() && PointsBArrayPtr.GetMilDataType() != MilTraits<MIL_UINT8>::TypeFlag))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgraDots"), MIL_TEXT("The data type of the color vectors must be MIL_UINT8."));
|
||||
}
|
||||
if(CoordXArrayPtr.size() != CoordYArrayPtr.size() || CoordXArrayPtr.size() != CoordZArrayPtr.size())
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgraDots"), MIL_TEXT("The coordinate vectors must have the same size."));
|
||||
}
|
||||
if(CoordXArrayPtr.empty())
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgraDots"), MIL_TEXT("The coordinate vectors cannot be empty."));
|
||||
}
|
||||
if((PointsRArrayPtr.IsNullPtr() != PointsGArrayPtr.IsNullPtr()) ||
|
||||
(PointsRArrayPtr.IsNullPtr() != PointsBArrayPtr.IsNullPtr()) ||
|
||||
(!PointsRArrayPtr.IsNullPtr() && (MIL_INT)CoordXArrayPtr.size() != PointsRArrayPtr.Size<MIL_UINT8>()) ||
|
||||
(!PointsGArrayPtr.IsNullPtr() && (MIL_INT)CoordXArrayPtr.size() != PointsGArrayPtr.Size<MIL_UINT8>()) ||
|
||||
(!PointsBArrayPtr.IsNullPtr() && (MIL_INT)CoordXArrayPtr.size() != PointsBArrayPtr.Size<MIL_UINT8>()))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgraDots"), MIL_TEXT("The color vectors must either all be empty or have the same size as the coordinate vectors."));
|
||||
}
|
||||
if(NumPoints <= 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgraDots"), MIL_TEXT("NumPoints parameter must be greater than zero."));
|
||||
}
|
||||
if(NumPoints > (MIL_INT)CoordXArrayPtr.size() && NumPoints != M_DEFAULT)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgraDots"), MIL_TEXT("NumPoints parameter must be smaller or equal (M_DEFAULT) to the size of the coordinate vectors."));
|
||||
}
|
||||
#endif
|
||||
if(NumPoints == M_DEFAULT || NumPoints > (MIL_INT)CoordXArrayPtr.size())
|
||||
{
|
||||
NumPoints = (MIL_INT)CoordXArrayPtr.size();
|
||||
}
|
||||
|
||||
return M3dgraDots(List3dgraId,
|
||||
ParentLabel,
|
||||
NumPoints,
|
||||
&CoordXArrayPtr[0],
|
||||
&CoordYArrayPtr[0],
|
||||
&CoordZArrayPtr[0],
|
||||
PointsRArrayPtr.GetData<MIL_UINT8>(),
|
||||
PointsGArrayPtr.GetData<MIL_UINT8>(),
|
||||
PointsBArrayPtr.GetData<MIL_UINT8>(),
|
||||
ControlFlag);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// Overloads for std::vector in M3dgraLines.
|
||||
template <typename UserType>
|
||||
inline MIL_INT64 MFTYPE M3dgraLines(MIL_ID List3dgraId,
|
||||
MIL_INT64 ParentLabel,
|
||||
MIL_INT64 CreationMode,
|
||||
MIL_INT NumLines,
|
||||
const std::vector<UserType>& CoordXArrayPtr,
|
||||
const std::vector<UserType>& CoordYArrayPtr,
|
||||
const std::vector<UserType>& CoordZArrayPtr,
|
||||
const std::vector<UserType>& CoordX2ArrayPtr,
|
||||
const std::vector<UserType>& CoordY2ArrayPtr,
|
||||
const std::vector<UserType>& CoordZ2ArrayPtr,
|
||||
CMilArrayParamIn LinesRArrayPtr,
|
||||
CMilArrayParamIn LinesGArrayPtr,
|
||||
CMilArrayParamIn LinesBArrayPtr,
|
||||
MIL_DOUBLE Length,
|
||||
MIL_INT64 ControlFlag)
|
||||
{
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(!LinesRArrayPtr.IsValidParam() ||
|
||||
!LinesGArrayPtr.IsValidParam() ||
|
||||
!LinesBArrayPtr.IsValidParam())
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgraLines"), MIL_TEXT("The input arrays cannot be a non-zero integer."));
|
||||
}
|
||||
if((!LinesRArrayPtr.IsNullPtr() && LinesRArrayPtr.GetMilDataType() != MilTraits<MIL_UINT8>::TypeFlag) ||
|
||||
(!LinesGArrayPtr.IsNullPtr() && LinesGArrayPtr.GetMilDataType() != MilTraits<MIL_UINT8>::TypeFlag) ||
|
||||
(!LinesBArrayPtr.IsNullPtr() && LinesBArrayPtr.GetMilDataType() != MilTraits<MIL_UINT8>::TypeFlag))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgraLines"), MIL_TEXT("The data type of the color vectors must be MIL_UINT8."));
|
||||
}
|
||||
if(CoordXArrayPtr.size() != CoordYArrayPtr.size() ||
|
||||
CoordXArrayPtr.size() != CoordZArrayPtr.size() ||
|
||||
CoordXArrayPtr.size() != CoordX2ArrayPtr.size() ||
|
||||
CoordXArrayPtr.size() != CoordY2ArrayPtr.size() ||
|
||||
CoordXArrayPtr.size() != CoordZ2ArrayPtr.size())
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgraLines"), MIL_TEXT("The coordinate vectors must have the same size."));
|
||||
}
|
||||
if(CoordXArrayPtr.empty())
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgraLines"), MIL_TEXT("The coordinate vectors cannot be empty."));
|
||||
}
|
||||
if((LinesRArrayPtr.IsNullPtr() != LinesGArrayPtr.IsNullPtr()) ||
|
||||
(LinesRArrayPtr.IsNullPtr() != LinesBArrayPtr.IsNullPtr()) ||
|
||||
(!LinesRArrayPtr.IsNullPtr() && (MIL_INT)CoordXArrayPtr.size() != LinesRArrayPtr.Size<MIL_UINT8>()) ||
|
||||
(!LinesGArrayPtr.IsNullPtr() && (MIL_INT)CoordXArrayPtr.size() != LinesGArrayPtr.Size<MIL_UINT8>()) ||
|
||||
(!LinesBArrayPtr.IsNullPtr() && (MIL_INT)CoordXArrayPtr.size() != LinesBArrayPtr.Size<MIL_UINT8>()))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgraLines"), MIL_TEXT("The color vectors must either all be empty or have the same size as the coordinate vectors."));
|
||||
}
|
||||
if(NumLines <= 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgraLines"), MIL_TEXT("NumLines parameter must be greater than zero."));
|
||||
}
|
||||
if(NumLines > (MIL_INT)CoordXArrayPtr.size() && NumLines != M_DEFAULT)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgraLines"), MIL_TEXT("NumLines parameter must be smaller or equal (M_DEFAULT) to the size of the coordinate vectors."));
|
||||
}
|
||||
#endif
|
||||
if(NumLines == M_DEFAULT || NumLines > (MIL_INT)CoordXArrayPtr.size())
|
||||
{
|
||||
NumLines = (MIL_INT)CoordXArrayPtr.size();
|
||||
}
|
||||
|
||||
return M3dgraLines(List3dgraId,
|
||||
ParentLabel,
|
||||
CreationMode,
|
||||
NumLines,
|
||||
&CoordXArrayPtr[0],
|
||||
&CoordYArrayPtr[0],
|
||||
&CoordZArrayPtr[0],
|
||||
&CoordX2ArrayPtr[0],
|
||||
&CoordY2ArrayPtr[0],
|
||||
&CoordZ2ArrayPtr[0],
|
||||
LinesRArrayPtr.GetData<MIL_UINT8>(),
|
||||
LinesGArrayPtr.GetData<MIL_UINT8>(),
|
||||
LinesBArrayPtr.GetData<MIL_UINT8>(),
|
||||
Length,
|
||||
ControlFlag);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// Overloads for std::vector in M3dgraPolygon.
|
||||
template <typename UserType>
|
||||
inline MIL_INT64 MFTYPE M3dgraPolygon(MIL_ID List3dgraId,
|
||||
MIL_INT64 ParentLabel,
|
||||
MIL_INT64 CreationMode,
|
||||
MIL_INT NumPoints,
|
||||
const std::vector<UserType>& CoordXArrayPtr,
|
||||
const std::vector<UserType>& CoordYArrayPtr,
|
||||
const std::vector<UserType>& CoordZArrayPtr,
|
||||
CMilArrayParamIn TextureXArrayPtr,
|
||||
CMilArrayParamIn TextureYArrayPtr,
|
||||
MIL_ID TextureBufId,
|
||||
MIL_INT64 ControlFlag)
|
||||
{
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(!TextureXArrayPtr.IsValidParam() ||
|
||||
!TextureYArrayPtr.IsValidParam())
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgraPolygon"), MIL_TEXT("The input arrays cannot be a non-zero integer."));
|
||||
}
|
||||
if((!TextureXArrayPtr.IsNullPtr() && TextureXArrayPtr.GetMilDataType() != MilTraits<UserType>::TypeFlag) ||
|
||||
(!TextureYArrayPtr.IsNullPtr() && TextureYArrayPtr.GetMilDataType() != MilTraits<UserType>::TypeFlag))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgraPolygon"), MIL_TEXT("The coordinate and texture vectors must all have the same data type."));
|
||||
}
|
||||
if(CoordXArrayPtr.size() != CoordYArrayPtr.size() || CoordXArrayPtr.size() != CoordZArrayPtr.size())
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgraPolygon"), MIL_TEXT("The coordinate vectors must have the same size."));
|
||||
}
|
||||
if(CoordXArrayPtr.empty())
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgraPolygon"), MIL_TEXT("The vectors cannot be empty."));
|
||||
}
|
||||
if((TextureXArrayPtr.IsNullPtr() != TextureYArrayPtr.IsNullPtr()) ||
|
||||
(!TextureXArrayPtr.IsNullPtr() && (MIL_INT)CoordXArrayPtr.size() != TextureXArrayPtr.Size<UserType>()) ||
|
||||
(!TextureYArrayPtr.IsNullPtr() && (MIL_INT)CoordXArrayPtr.size() != TextureYArrayPtr.Size<UserType>()))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgraPolygon"), MIL_TEXT("The texture vectors must either both be null or have the same size as the coordinate vectors."));
|
||||
}
|
||||
if(NumPoints <= 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgraPolygon"), MIL_TEXT("NumPoints parameter must be greater than zero."));
|
||||
}
|
||||
if(NumPoints > (MIL_INT)CoordXArrayPtr.size() && NumPoints != M_DEFAULT)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dgraPolygon"), MIL_TEXT("NumPoints parameter must be smaller or equal (M_DEFAULT) to the size of the coordinate vectors."));
|
||||
}
|
||||
#endif
|
||||
if(NumPoints == M_DEFAULT || NumPoints > (MIL_INT)CoordXArrayPtr.size())
|
||||
{
|
||||
NumPoints = (MIL_INT)CoordXArrayPtr.size();
|
||||
}
|
||||
|
||||
return M3dgraPolygon(List3dgraId,
|
||||
ParentLabel,
|
||||
CreationMode,
|
||||
NumPoints,
|
||||
&CoordXArrayPtr[0],
|
||||
&CoordYArrayPtr[0],
|
||||
&CoordZArrayPtr[0],
|
||||
TextureXArrayPtr.GetData<UserType>(),
|
||||
TextureYArrayPtr.GetData<UserType>(),
|
||||
TextureBufId,
|
||||
ControlFlag);
|
||||
}
|
||||
#endif // defined(M_MIL_USE_VECTOR) && M_MIL_USE_VECTOR
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// MIL_UNIQUE_ID support
|
||||
|
||||
#if M_MIL_USE_MIL_UNIQUE_ID
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
template <> inline bool MilIsCorrectObjectType<&M3dgraFree>(MIL_INT64 ObjectType)
|
||||
{
|
||||
return ObjectType == M_3D_GRAPHIC_LIST;
|
||||
}
|
||||
#endif
|
||||
typedef MIL_UNIQUE_ID<&M3dgraFree > MIL_UNIQUE_3DGRA_ID;
|
||||
|
||||
#if M_MIL_USE_MOVE_SEMANTICS
|
||||
//3DGRA
|
||||
inline MIL_UNIQUE_3DGRA_ID M3dgraAlloc(MIL_ID SysId, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_3DGRA_ID(M3dgraAlloc(SysId, ControlFlag, M_NULL));
|
||||
}
|
||||
|
||||
template <MilFreeFuncType FreeFunc> inline void M3dgraFree(const MIL_UNIQUE_ID<FreeFunc>&) = delete;
|
||||
#endif // M_MIL_USE_MOVE_SEMANTICS
|
||||
#endif // M_MIL_USE_MIL_UNIQUE_ID
|
||||
|
||||
|
||||
// End of MIL_UNIQUE_ID support
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#endif // __MIL3DGRA_H__
|
||||
1807
Include/ClassicMIL/MILDyn/mil3dim.h
Normal file
1807
Include/ClassicMIL/MILDyn/mil3dim.h
Normal file
File diff suppressed because it is too large
Load Diff
1800
Include/ClassicMIL/MILDyn/mil3dmap.h
Normal file
1800
Include/ClassicMIL/MILDyn/mil3dmap.h
Normal file
File diff suppressed because it is too large
Load Diff
944
Include/ClassicMIL/MILDyn/mil3dmet.h
Normal file
944
Include/ClassicMIL/MILDyn/mil3dmet.h
Normal file
@ -0,0 +1,944 @@
|
||||
//==============================================================================
|
||||
//!
|
||||
//! \brief Mil3dmet CAPI header (M3dmet...)
|
||||
//!
|
||||
//! AUTHOR: Matrox Imaging
|
||||
//!
|
||||
//! COPYRIGHT NOTICE:
|
||||
//! Copyright (c) Matrox Electronic Systems Ltd., 1992-2023.
|
||||
//! All Rights Reserved
|
||||
// Revision: 10.60.0776
|
||||
//==============================================================================
|
||||
|
||||
#ifndef __MIL_3DMET_H__
|
||||
#define __MIL_3DMET_H__
|
||||
|
||||
|
||||
#if !defined(__MIL3DGEO_H__)
|
||||
#include <mildyn/mil3dgeo.h>
|
||||
#endif
|
||||
|
||||
#if (!M_MIL_LITE) /* MIL FULL ONLY */
|
||||
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
// M3dmetAlloc ContextTypes
|
||||
#define M_STATISTICS_CONTEXT 16L // already defined in milim.h
|
||||
#define M_FIT_CONTEXT 3646L
|
||||
|
||||
#define M_VOLUME_CONTEXT 5788L //
|
||||
#define M_DRAW_3D_CONTEXT 3815 // already defined in milcal.h
|
||||
|
||||
//==============================================================================
|
||||
// Indexing, used in other M3dmet functions (M3dmetInquire(), M3dmetControl(), ...)
|
||||
#define M_DEFAULT 0x10000000L // already defined
|
||||
#define M_CONTEXT 0x08000000L // already defined
|
||||
#define M_GENERAL 0x20000000L // already defined
|
||||
#define M_ALL 0x40000000L // already defined
|
||||
|
||||
#define M_ANY 0x11000000L // already defined
|
||||
|
||||
#define M_MODIFICATION_COUNT 5010L // already defined
|
||||
|
||||
//==============================================================================
|
||||
#define M_ALLOCATION_FAILURE_REAL_TEST_FLAG 971L // also in milblob.h, milstr.h
|
||||
|
||||
//==============================================================================
|
||||
//M3dmetDistance
|
||||
#define M_DISTANCE_TO_CENTER 2983L
|
||||
#define M_DISTANCE_TO_CENTER_SQUARED 2984L
|
||||
#define M_DISTANCE_TO_CENTER_AXIS 3017L
|
||||
#define M_DISTANCE_TO_CENTER_AXIS_SQUARED 3034L
|
||||
#define M_ABSOLUTE_DISTANCE_Z_TO_SURFACE 2985L
|
||||
#define M_ABSOLUTE_DISTANCE_TO_SURFACE 2986L
|
||||
#define M_SIGNED_DISTANCE_Z_TO_SURFACE 2987L
|
||||
#define M_SIGNED_DISTANCE_TO_SURFACE 2988L
|
||||
#define M_DISTANCE_TO_NEAREST_NEIGHBOR 3444 // already defined in mil3dim.h
|
||||
#define M_DISTANCE_TO_MESH 3543L
|
||||
#define M_MANHATTAN_DISTANCE_TO_SURFACE 3736L
|
||||
#define M_DISTANCE_TO_LINE 3934L
|
||||
#define M_DISTANCE_TO_LINE_SQUARED 3935L
|
||||
#define M_DISTANCE_TO_POINT 4749L
|
||||
#define M_DISTANCE_TO_POINT_SQUARED 4751L
|
||||
|
||||
//M3dmetFit
|
||||
// Context
|
||||
#define M_FIT_ITERATIONS_MAX 104L // already defined in milmetrol.h
|
||||
#define M_RMS_ERROR_THRESHOLD 3565 // already defined in mil3dreg.h
|
||||
#define M_INLIER_AMOUNT_THRESHOLD 3599L
|
||||
|
||||
#define M_ESTIMATION_MODE 3600L
|
||||
#define M_RANDOM_SAMPLING 3601L
|
||||
#define M_NO_SAMPLING 3602L
|
||||
#define M_FROM_GEOMETRY 3603L
|
||||
|
||||
#define M_RANDOM_SAMPLING_CONFIDENCE 3604L
|
||||
#define M_RANDOM_SAMPLING_NUMBER_OF_TEST_POINTS 3605L
|
||||
#define M_EXPECTED_OUTLIER_PERCENTAGE 3606L
|
||||
|
||||
#define M_AUTO_VALUE MAKE_INT64(0x0000000100000000) // already defined in milim.h
|
||||
|
||||
//M3dmetCopy
|
||||
#define M_ESTIMATE_GEOMETRY 3607L
|
||||
|
||||
// Result
|
||||
#define M_SUCCESS 0x00000000L // Already defined in milreg.h, milcolor.h
|
||||
#define M_NOT_INITIALIZED 3L // Already defined in milcal.h
|
||||
#define M_ALL_POINTS_COPLANAR 4742L
|
||||
#define M_NOT_ENOUGH_VALID_DATA 1336L
|
||||
#define M_BAD_ESTIMATE 3616L
|
||||
#define M_MATHEMATICAL_EXCEPTION 8L
|
||||
#define M_ALL_POINTS_COLLINEAR 1337L
|
||||
|
||||
#define M_NUMBER_OF_POINTS_TOTAL 3485 // already defined in mil3dim.h
|
||||
#define M_NUMBER_OF_POINTS_VALID 3440 // already defined in mil3dim.h
|
||||
#define M_NUMBER_OF_POINTS_MISSING_DATA 3484 // already defined in mil3dim.h
|
||||
#define M_NUMBER_OF_POINTS_INLIERS 3557L
|
||||
#define M_NUMBER_OF_POINTS_OUTLIERS 3558L
|
||||
#define M_FIT_RMS_ERROR 1333L // already defined in mil3dmap.h
|
||||
#define M_RESULT_IMAGE_SIZE_X 5226L
|
||||
#define M_RESULT_IMAGE_SIZE_Y 5227L
|
||||
#define M_RESULT_ELEMENT_IMAGE_SIZE_X 5876L
|
||||
#define M_RESULT_ELEMENT_IMAGE_SIZE_Y 5877L
|
||||
#define M_OUTLIER_DISTANCE 5766L
|
||||
|
||||
//M3dmetCopyResult
|
||||
#define M_FITTED_GEOMETRY 3559L
|
||||
#define M_FITTED_GEOMETRY_INFINITE 4841L
|
||||
#define M_INLIER_MASK 3590L
|
||||
#define M_OUTLIER_MASK 3995L
|
||||
#define M_FIXTURING_MATRIX 3878L
|
||||
#define M_VOLUME_SOURCE_POINTS_MASK 5789L
|
||||
#define M_VOLUME_SOURCE_POINTS_STATUS_IMAGE 5790L
|
||||
#define M_VOLUME_REFERENCE_CONTAINER 5795L
|
||||
#define M_VOLUME_REFERENCE_DEPTH_MAP 5796L
|
||||
|
||||
#define M_VOLUME_ELEMENT_INDEX_IMAGE 5878L
|
||||
#define M_VOLUME_ELEMENT_MASK 5879L
|
||||
#define M_VOLUME_ELEMENT_STATUS_IMAGE 5880L
|
||||
|
||||
//M3dmetStat
|
||||
#define M_STAT_MIN 2502 // already defined in milim.h
|
||||
#define M_STAT_MAX 2503 // already defined in milim.h
|
||||
#define M_STAT_MIN_ABS 2504
|
||||
#define M_STAT_MAX_ABS 2505
|
||||
#define M_STAT_SUM_ABS 2506
|
||||
#define M_STAT_SUM_OF_SQUARES 2507
|
||||
#define M_STAT_SUM 2508
|
||||
#define M_STAT_MEAN 2509
|
||||
#define M_STAT_STANDARD_DEVIATION 2510 // already defined in milim.h
|
||||
#define M_STAT_NUMBER 1009L // already defined in milim.h
|
||||
#define M_STAT_RMS 3562L
|
||||
#define M_STAT_MEAN_ABS 4843L
|
||||
#define M_IN_RANGE 1L // Already defined in milblob.h, mil.h, miledge.h
|
||||
#define M_GREATER 5L // Already defined in milblob.h, mil.h, miledge.h
|
||||
#define M_LESS 6L // Already defined in milblob.h, mil.h, miledge.h
|
||||
#define M_GREATER_OR_EQUAL 7L // Already defined in milblob.h, mil.h, miledge.h
|
||||
#define M_LESS_OR_EQUAL 8L // Already defined in milblob.h, mil.h, miledge.h
|
||||
//M3dmetStat pseudo ids
|
||||
#define M_STAT_CONTEXT_MIN (M_STAT_MIN | M_PSEUDO_ID)
|
||||
#define M_STAT_CONTEXT_MAX (M_STAT_MAX | M_PSEUDO_ID)
|
||||
#define M_STAT_CONTEXT_MIN_ABS (M_STAT_MIN_ABS | M_PSEUDO_ID)
|
||||
#define M_STAT_CONTEXT_MAX_ABS (M_STAT_MAX_ABS | M_PSEUDO_ID)
|
||||
#define M_STAT_CONTEXT_SUM_ABS (M_STAT_SUM_ABS | M_PSEUDO_ID)
|
||||
#define M_STAT_CONTEXT_SUM_OF_SQUARES (M_STAT_SUM_OF_SQUARES | M_PSEUDO_ID)
|
||||
#define M_STAT_CONTEXT_SUM (M_STAT_SUM | M_PSEUDO_ID)
|
||||
#define M_STAT_CONTEXT_MEAN (M_STAT_MEAN | M_PSEUDO_ID)
|
||||
#define M_STAT_CONTEXT_STANDARD_DEVIATION (M_STAT_STANDARD_DEVIATION | M_PSEUDO_ID)
|
||||
#define M_STAT_CONTEXT_NUMBER (M_STAT_NUMBER | M_PSEUDO_ID)
|
||||
#define M_STAT_CONTEXT_RMS (M_STAT_RMS | M_PSEUDO_ID)
|
||||
#define M_STAT_CONTEXT_MEAN_ABS (M_STAT_MEAN_ABS | M_PSEUDO_ID)
|
||||
|
||||
//M3dmetVolume
|
||||
#define M_VOLUME_MODE 5798L
|
||||
|
||||
#define M_ABOVE 4076L // already defined in milmetrol.h
|
||||
#define M_UNDER 4077L // already defined in milmetrol.h
|
||||
#define M_TOTAL 3627L
|
||||
#define M_DIFFERENCE 3628L
|
||||
|
||||
#define M_VOLUME_STATUS 5906L
|
||||
#define M_WARNING_GAPS 3629L
|
||||
#define M_FAIL_GAPS 3676L
|
||||
#define M_FAIL_INVALID_MESH 3675L
|
||||
|
||||
#define M_VOLUME_NB_ELEMENTS 5800L
|
||||
#define M_VOLUME_NB_POSITIVE_ELEMENTS 5801L
|
||||
#define M_VOLUME_NB_NEGATIVE_ELEMENTS 5802L
|
||||
#define M_VOLUME_NB_UNUSED_ELEMENTS 5803L
|
||||
#define M_VOLUME_REFERENCE_TYPE 5808L
|
||||
|
||||
#define M_SAVE_VOLUME_INFO 5809L
|
||||
|
||||
// Result control
|
||||
#define M_VOLUME_OUTPUT_MODE 5810L
|
||||
|
||||
//M3dmetVolumeEx pseudo ids
|
||||
#define M_VOLUME_CONTEXT_TOTAL (M_TOTAL | M_PSEUDO_ID)
|
||||
#define M_VOLUME_CONTEXT_ABOVE (M_ABOVE | M_PSEUDO_ID)
|
||||
#define M_VOLUME_CONTEXT_UNDER (M_UNDER | M_PSEUDO_ID)
|
||||
#define M_VOLUME_CONTEXT_DIFFERENCE (M_DIFFERENCE | M_PSEUDO_ID)
|
||||
|
||||
//M3dmetFeature
|
||||
#define M_ANGLE 0x00000800L // already defined in mil.h
|
||||
#define M_PARALLELISM 4L // already defined in milmetrol.h
|
||||
#define M_PERPENDICULARITY 1L // already defined in milmetrol.h
|
||||
#define M_INTERSECTION 0x0022L // already defined in milmetrol.h
|
||||
#define M_PROJECTION 3417 // already defined in mil3dgeo.h
|
||||
#define M_INTERPOLATION 4774L
|
||||
#define M_SHORTEST_LINE 4776L
|
||||
#define M_FARTHEST_POINT 4777L
|
||||
#define M_RAY_CAST 4778L
|
||||
#define M_NORMAL_AT_POSITION 4779L
|
||||
#define M_POINT_ON_LINE 4780L
|
||||
#define M_POINT_ON_LINE_CLIPPED 4781L
|
||||
#define M_IS_INSIDE 4782L
|
||||
#define M_PARTIALLY_INSIDE 4783L
|
||||
#define M_ANGLE_TO_EDGE_CASE 4784L
|
||||
#define M_ORTHOGONALIZE 4849L
|
||||
#define M_EXTRUSION_CENTER 5832L
|
||||
#define M_EXTRUSION_BORDER 5833L
|
||||
#define M_EXTRUSION_STATUS 5834L
|
||||
#define M_CLOSEST_POINT 12L // already defined in milbead.h
|
||||
#define M_BOUNDING_BOX 0x00000003L // already defined in mil3dim.h
|
||||
#define M_CLIP 0x0010L // already defined in milcal.h
|
||||
#define M_DISTANCE 0x00080000L // already defined in milim.h
|
||||
#define M_OUTSIDE 0L // already defined in mil.h
|
||||
#define M_INSIDE 1L // already defined in mil.h
|
||||
#define M_OVERLAP 1966L // already defined in mil3dreg.h
|
||||
#define M_UNION 3797L // already defined in milclass.h
|
||||
#define M_CALCULATED_OBJECT_TYPE 5525L
|
||||
#define M_CALCULATED_OBJECT_FLAG 4785L
|
||||
#define M_DISTANCE_ALONG_LINE_FLAG 4793L
|
||||
#define M_CALCULATED_OBJECT(N) (M_CALCULATED_OBJECT_FLAG + (N))
|
||||
#define M_DISTANCE_ALONG_LINE(N) (M_DISTANCE_ALONG_LINE_FLAG + (N))
|
||||
|
||||
//M3dgeo
|
||||
#define M_GEOMETRY_TYPE 1321L // Already define in mil3dgeo
|
||||
#define M_GEOMETRY 1306L // Already define in mil3dgeo
|
||||
#define M_PLANE 1353L // Already defined in mil3dgeo
|
||||
#define M_SPHERE 2931L // Already defined in mil3dgeo
|
||||
#define M_CYLINDER 3656 // Already defined in mil3dgeo
|
||||
#define M_BOX 0x101L // Already defined in milblob.h
|
||||
#define M_LINE 0x00000080L // Already defined
|
||||
#define M_POINT 1L // Already defined in mil3dgeo
|
||||
//Sphere
|
||||
#define M_CENTER_X 4L // also in mil.h
|
||||
#define M_CENTER_Y 5L
|
||||
#define M_CENTER_Z 3400
|
||||
#define M_RADIUS 0x00000040L // Already defined in MilMod.h
|
||||
//Plane
|
||||
#define M_COEFFICIENT_A 3401 // Already defined in mil3dgeo
|
||||
#define M_COEFFICIENT_B 3402 // Already defined in mil3dgeo
|
||||
#define M_COEFFICIENT_C 3403
|
||||
#define M_COEFFICIENT_D 3404
|
||||
#define M_NORMAL_X 3537
|
||||
#define M_NORMAL_Y 3538
|
||||
#define M_NORMAL_Z 3539
|
||||
#define M_CLOSEST_TO_ORIGIN_X 3540
|
||||
#define M_CLOSEST_TO_ORIGIN_Y 3541
|
||||
#define M_CLOSEST_TO_ORIGIN_Z 3542
|
||||
//Cylinder
|
||||
#define M_TWO_POINTS 3657
|
||||
#define M_START_POINT_X 3658
|
||||
#define M_START_POINT_Y 3659
|
||||
#define M_START_POINT_Z 3660
|
||||
#define M_END_POINT_X 3661
|
||||
#define M_END_POINT_Y 3662
|
||||
#define M_END_POINT_Z 3663
|
||||
#define M_AXIS_X 3664
|
||||
#define M_AXIS_Y 3665
|
||||
#define M_AXIS_Z 3666
|
||||
#define M_FINITE 3016L
|
||||
#define M_INFINITE -1L // Also defined in Mil.h
|
||||
|
||||
//==============================================================================
|
||||
// M3dmetControl / M3dmetInquire
|
||||
// Context
|
||||
#define M_ROOT_NODE 0 // already defined in mil3dgra.h
|
||||
#define M_ENABLE -9997L // also in mil.h
|
||||
#define M_DISABLE -9999L // also in mil.h
|
||||
|
||||
#define M_AUTO 444L // also in mil.h
|
||||
#define M_USER_DEFINED 21L // also in mil.h
|
||||
|
||||
#define M_SIZE_X 1536L // also in mil.h
|
||||
#define M_SIZE_Y 1537L // also in mil.h
|
||||
#define M_SIZE_Z 1538L // also in mil.h
|
||||
|
||||
//==============================================================================
|
||||
// M3dmetInquire
|
||||
// Context
|
||||
#define M_INVALID -1 // also in mil.h
|
||||
|
||||
//==============================================================================
|
||||
// M3dmetControlDraw/M3dmetInquireDraw
|
||||
// Draw context
|
||||
#define M_ROOT_NODE 0 // already defined in mil3dgra.h
|
||||
#define M_GLOBAL_DRAW_SETTINGS M_CONTEXT
|
||||
#define M_DRAW_VOLUME_ELEMENTS 0x00004000L
|
||||
#define M_DRAW_VOLUME_POSITIVE_ELEMENTS 0x00008000L
|
||||
#define M_DRAW_VOLUME_NEGATIVE_ELEMENTS 0x00010000L
|
||||
|
||||
#define M_GRAPHIC_LIST_DEFAULT 0x04005526L // already defined in mil3dblob.h
|
||||
#define M_ACTIVE 1534L // already defined in milmetrol.h
|
||||
#define M_THICKNESS 3L // already defined in mil3dgra.h
|
||||
#define M_OPACITY 4728 // already defined in mil3dgra.h
|
||||
#define M_APPEARANCE 4679 // already defined in mil3dgra.h
|
||||
#define M_COLOR 0x00000100L // already defined in mil3dgra.h
|
||||
#define M_VOLUME_ELEMENT_APPEARANCE 5811L
|
||||
#define M_VOLUME_ELEMENT_INDEX 5812L
|
||||
#define M_SURFACE 1021L // already defined in mil.h
|
||||
#define M_VOLUME 1360L
|
||||
#define M_SURFACE_REFERENCE 5887L
|
||||
#define M_SURFACE_SOURCE 5889L
|
||||
|
||||
|
||||
//==============================================================================
|
||||
// M3dmetAllocResult ResultTypes
|
||||
|
||||
//==============================================================================
|
||||
// M3dmetGetResult ResultTypes
|
||||
#define M_STATISTICS_RESULT MAKE_INT64(0x0001000000000000) // also in mil.h
|
||||
#define M_FIT_RESULT 3645L
|
||||
#define M_CALCULATE_RESULT 5011L
|
||||
|
||||
// General
|
||||
#define M_STATUS 0x00008002L // already defined in milbead
|
||||
#define M_COMPLETE 0x00000000L // already defined in mil3dreg
|
||||
#define M_INTERNAL_ERROR 5L // already defined in milreg.h
|
||||
|
||||
//==============================================================================
|
||||
// Other defines
|
||||
|
||||
//==============================================================================
|
||||
// CAPI function prototypes
|
||||
MIL_ID MFTYPE M3dmetAlloc(MIL_ID SysId,
|
||||
MIL_INT64 ContextType,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dmetIdPtr);
|
||||
|
||||
MIL_ID MFTYPE M3dmetAllocResult(MIL_ID SysId,
|
||||
MIL_INT64 ResultType,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Result3dmetIdPtr);
|
||||
|
||||
void MFTYPE M3dmetFree(MIL_ID ContextOrResult3dmetId);
|
||||
|
||||
|
||||
|
||||
//#if M_MIL_USE_64BIT
|
||||
// Prototypes for 64 bits OSs
|
||||
void MFTYPE M3dmetControlInt64(MIL_ID ContextOrResult3dmetId,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_INT64 ControlValue);
|
||||
void MFTYPE M3dmetControlDouble(MIL_ID ContextOrResult3dmetId,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_DOUBLE ControlValue);
|
||||
|
||||
MIL_INT64 MFTYPE M3dmetInquire(MIL_ID ContextOrResult3dmetId,
|
||||
MIL_INT64 InquireType,
|
||||
void* UserVarPtr);
|
||||
|
||||
MIL_DOUBLE MFTYPE M3dmetGetResult(MIL_ID Result3dmetId,
|
||||
MIL_INT64 ResultType,
|
||||
void* ResultArrayPtr);
|
||||
|
||||
void MFTYPE M3dmetDistance(MIL_ID SrcContainerOrImageBufId,
|
||||
MIL_ID RefMilObjectId,
|
||||
MIL_ID DstImageBufId,
|
||||
MIL_INT64 DistanceType,
|
||||
MIL_DOUBLE Param,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dmetFit(MIL_ID Context3dmetId,
|
||||
MIL_ID SrcContainerOrImageBufId,
|
||||
MIL_INT GeometryType,
|
||||
MIL_ID Result3dmetOr3dgeoId,
|
||||
MIL_DOUBLE OutlierDistance,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dmetCopyResult(MIL_ID SrcResult3dmetId,
|
||||
MIL_ID DstMilObjectId,
|
||||
MIL_INT64 CopyType,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
|
||||
void MFTYPE M3dmetStat(MIL_ID StatContext3dmetId,
|
||||
MIL_ID SrcContainerOrImageBufId,
|
||||
MIL_ID RefMilObjectId,
|
||||
MIL_ID StatResult3dmetId,
|
||||
MIL_INT64 DistanceType,
|
||||
MIL_INT64 Condition,
|
||||
MIL_DOUBLE CondLow,
|
||||
MIL_DOUBLE CondHigh,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dmetCopy(MIL_ID SrcMilObjectId,
|
||||
MIL_ID DstMilObjectId,
|
||||
MIL_INT64 CopyType,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dmetVolumeEx(MIL_ID Volume3dmetContextId,
|
||||
MIL_ID SrcContainerOrImageBufId,
|
||||
MIL_ID Reference3dgeoOrImageBufId,
|
||||
MIL_ID Calculate3dmetResultId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_DOUBLE MFTYPE M3dmetVolume(MIL_ID SrcContainerOrImageBufId,
|
||||
MIL_ID Reference3dgeoOrImageBufId,
|
||||
MIL_INT64 Options,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_DOUBLE* VolumePtr,
|
||||
MIL_INT64* StatusPtr);
|
||||
|
||||
void MFTYPE M3dmetControlDrawInt64(MIL_ID DrawContext3dmetId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_INT64 ControlValue);
|
||||
|
||||
void MFTYPE M3dmetControlDrawDouble(MIL_ID DrawContext3dmetId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_DOUBLE ControlValue);
|
||||
|
||||
MIL_INT64 MFTYPE M3dmetInquireDraw(MIL_ID DrawContext3dmetId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 InquireType,
|
||||
void* UserVarPtr);
|
||||
|
||||
MIL_INT64 MFTYPE M3dmetDraw3d(MIL_ID OperationDraw3dContext3dmetId,
|
||||
MIL_ID SrcResult3dmetId,
|
||||
MIL_ID DstList3dgraId,
|
||||
MIL_INT64 DstParentLabel,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dmetFeatureEx(MIL_ID Feature3dmetContextId,
|
||||
MIL_ID Src1GeometryOrMatrix3dgeoId,
|
||||
MIL_ID Src2GeometryOrMatrix3dgeoId,
|
||||
MIL_ID Src3Geometry3dgeoId,
|
||||
MIL_ID Result3dmetOr3dgeoId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_DOUBLE Param,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_DOUBLE MFTYPE M3dmetFeature(MIL_ID Src1GeometryOrMatrix3dgeoId,
|
||||
MIL_ID Src2GeometryOrMatrix3dgeoId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_DOUBLE Param,
|
||||
MIL_DOUBLE* ResultPtr);
|
||||
|
||||
#if M_MIL_USE_UNICODE
|
||||
void MFTYPE M3dmetSaveA(MIL_CONST_TEXTA_PTR FileName,
|
||||
MIL_ID Context3dmetId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_ID MFTYPE M3dmetRestoreA(MIL_CONST_TEXTA_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dmetIdPtr);
|
||||
|
||||
void MFTYPE M3dmetStreamA(MIL_TEXTA_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dmetIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
|
||||
|
||||
|
||||
void MFTYPE M3dmetSaveW(MIL_CONST_TEXTW_PTR FileName,
|
||||
MIL_ID Context3dmetId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_ID MFTYPE M3dmetRestoreW(MIL_CONST_TEXTW_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dmetIdPtr);
|
||||
|
||||
void MFTYPE M3dmetStreamW(MIL_TEXTW_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dmetIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
|
||||
#if M_MIL_UNICODE_API
|
||||
#define M3dmetSave M3dmetSaveW
|
||||
#define M3dmetRestore M3dmetRestoreW
|
||||
#define M3dmetStream M3dmetStreamW
|
||||
#else
|
||||
#define M3dmetSave M3dmetSaveA
|
||||
#define M3dmetRestore M3dmetRestoreA
|
||||
#define M3dmetStream M3dmetStreamA
|
||||
#endif //M_MIL_UNICODE_API
|
||||
|
||||
#else
|
||||
|
||||
void MFTYPE M3dmetSave(MIL_CONST_TEXT_PTR FileName,
|
||||
MIL_ID Context3dmetId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_ID MFTYPE M3dmetRestore(MIL_CONST_TEXT_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dmetIdPtr);
|
||||
|
||||
void MFTYPE M3dmetStream(MIL_TEXT_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dmetIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
|
||||
#endif //M_MIL_USE_UNICODE
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#ifdef __cplusplus
|
||||
inline void MFTYPE M3dmetStreamCpp(MilStreamParam MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dmetIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
M3dmetStream(MemPtrOrFileName.m_Param, SysId, Operation, StreamType, Version, ControlFlag, Context3dmetIdPtr, SizeByteVarPtr);
|
||||
}
|
||||
|
||||
#undef M3dmetStream
|
||||
#define M3dmetStream M3dmetStreamCpp
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Overload or define to support Old API.
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
// New API call so redirect it to the good entry point
|
||||
#define M3dmetCalculate M3dmetFeatureEx
|
||||
#define M3dmetCalculateScalar M3dmetFeature
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
|
||||
// Support Old API through inline in C++
|
||||
inline void M3dmetCalculate(MIL_ID Src1GeometryOrMatrix3dgeoId,
|
||||
MIL_ID Src2GeometryOrMatrix3dgeoId,
|
||||
MIL_ID Src3Geometry3dgeoId,
|
||||
MIL_ID Result3dmetOr3dgeoId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_DOUBLE Param,
|
||||
MIL_INT64 ControlFlag)
|
||||
{
|
||||
M3dmetFeatureEx(M_DEFAULT,
|
||||
Src1GeometryOrMatrix3dgeoId,
|
||||
Src2GeometryOrMatrix3dgeoId,
|
||||
Src3Geometry3dgeoId,
|
||||
Result3dmetOr3dgeoId,
|
||||
Operation,
|
||||
Param,
|
||||
ControlFlag);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
//=========================================================
|
||||
// See milos.h for explanation about these functions.
|
||||
//=========================================================
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// M3dmetInquire
|
||||
|
||||
inline MIL_INT64 MFTYPE M3dmetInquireSafeType(MIL_ID ContextOrResult3dmetId, MIL_INT64 InquireType, MilVoidPtr UserVarPtr)
|
||||
{
|
||||
MIL_INT64 RequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
if(!(M_DEFAULT_DATA_TYPE_BIT_SET(InquireType) || M_RECOMMENDED_DATA_TYPE_BIT_SET(InquireType)))
|
||||
{
|
||||
M3dmetInquire(ContextOrResult3dmetId, InquireType | M_DEFAULT_DATA_TYPE, &RequiredParamType);
|
||||
}
|
||||
if(!MfuncPointerIsCompatible(RequiredParamType, UserVarPtr.Type, InquireType))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dmetInquire"));
|
||||
}
|
||||
return M3dmetInquire(ContextOrResult3dmetId, InquireType, UserVarPtr.Ptr);
|
||||
}
|
||||
|
||||
inline MIL_INT64 MFTYPE M3dmetInquireUnsafe(MIL_ID ContextOrResult3dmetId, MIL_INT64 InquireType, void* UserVarPtr)
|
||||
{
|
||||
return M3dmetInquire(ContextOrResult3dmetId, InquireType, UserVarPtr);
|
||||
}
|
||||
|
||||
inline MIL_INT64 MFTYPE M3dmetInquireDrawSafeType(MIL_ID DrawContext3dmetId, MIL_INT64 Operation, MIL_INT64 InquireType, MilVoidPtr UserVarPtr)
|
||||
{
|
||||
MIL_INT64 RequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
if(!(M_DEFAULT_DATA_TYPE_BIT_SET(InquireType) || M_RECOMMENDED_DATA_TYPE_BIT_SET(InquireType)))
|
||||
{
|
||||
M3dmetInquireDraw(DrawContext3dmetId, Operation, InquireType | M_DEFAULT_DATA_TYPE, &RequiredParamType);
|
||||
}
|
||||
if(!MfuncPointerIsCompatible(RequiredParamType, UserVarPtr.Type, InquireType))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dblobInquireDraw"));
|
||||
}
|
||||
return M3dmetInquireDraw(DrawContext3dmetId, Operation, InquireType, UserVarPtr.Ptr);
|
||||
}
|
||||
|
||||
inline MIL_INT64 MFTYPE M3dmetInquireDrawUnsafe(MIL_ID DrawContext3dblobId, MIL_INT64 Operation, MIL_INT64 InquireType, void* UserVarPtr)
|
||||
{
|
||||
return M3dmetInquireDraw(DrawContext3dblobId, Operation, InquireType, UserVarPtr);
|
||||
}
|
||||
|
||||
#define M3dmetInquire M3dmetInquireSafeType
|
||||
#define M3dmetInquireDraw M3dmetInquireDrawSafeType
|
||||
|
||||
#else // #if M_MIL_USE_SAFE_TYPE
|
||||
#define M3dmetInquireUnsafe M3dmetInquire
|
||||
#define M3dmetInquireDrawUnsafe M3dmetInquireDraw
|
||||
#endif // #if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
// -------------------------------------------------------------------------
|
||||
// M3dmetGetResult safe type definitions
|
||||
//
|
||||
inline MIL_DOUBLE MFTYPE M3dmetGetResultSafeType(MIL_ID Result3dmetId, MIL_INT64 ResultType, MilVoidPtr ResultArrayPtr)
|
||||
{
|
||||
MIL_INT64 RequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
if(!(M_DEFAULT_DATA_TYPE_BIT_SET(ResultType) || M_RECOMMENDED_DATA_TYPE_BIT_SET(ResultType)))
|
||||
{
|
||||
M3dmetGetResult(Result3dmetId, ResultType | M_DEFAULT_DATA_TYPE, &RequiredParamType);
|
||||
}
|
||||
if(!MfuncPointerIsCompatible(RequiredParamType, ResultArrayPtr.Type, ResultType))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dmetGetResult"));
|
||||
}
|
||||
return M3dmetGetResult(Result3dmetId, ResultType, ResultArrayPtr.Ptr);
|
||||
}
|
||||
|
||||
inline MIL_DOUBLE MFTYPE M3dmetGetResultUnsafe(MIL_ID Result3dmetId, MIL_INT64 ResultType, void* ResultArrayPtr)
|
||||
{
|
||||
return M3dmetGetResult(Result3dmetId, ResultType, ResultArrayPtr);
|
||||
}
|
||||
|
||||
#define M3dmetGetResult M3dmetGetResultSafeType
|
||||
|
||||
#else // #if M_MIL_USE_SAFE_TYPE
|
||||
#define M3dmetGetResultUnsafe M3dmetGetResult
|
||||
#endif // #if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
//#if M_MIL_USE_64BIT
|
||||
#ifdef __cplusplus
|
||||
|
||||
//=========================================================
|
||||
// M3dmetControl function overloads when compiling c++ files
|
||||
//=========================================================
|
||||
template <typename T>
|
||||
inline void M3dmetControl(MIL_ID ContextOrResult3dmetId, MIL_INT64 ControlType, T ControlValue)
|
||||
{
|
||||
M3dmetControlInt64(ContextOrResult3dmetId, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void M3dmetControl(MIL_ID ContextOrResult3dmetId, MIL_INT64 ControlType, float ControlValue)
|
||||
{
|
||||
M3dmetControlDouble(ContextOrResult3dmetId, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void M3dmetControl(MIL_ID ContextOrResult3dmetId, MIL_INT64 ControlType, MIL_DOUBLE ControlValue)
|
||||
{
|
||||
M3dmetControlDouble(ContextOrResult3dmetId, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline void M3dmetControlDraw(MIL_ID DrawContext3dmetId, MIL_INT64 Operation, MIL_INT64 ControlType, T ControlValue)
|
||||
{
|
||||
M3dmetControlDrawInt64(DrawContext3dmetId, Operation, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void M3dmetControlDraw(MIL_ID DrawContext3dmetId, MIL_INT64 Operation, MIL_INT64 ControlType, float ControlValue)
|
||||
{
|
||||
M3dmetControlDrawDouble(DrawContext3dmetId, Operation, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void M3dmetControlDraw(MIL_ID DrawContext3dmetId, MIL_INT64 Operation, MIL_INT64 ControlType, MIL_DOUBLE ControlValue)
|
||||
{
|
||||
M3dmetControlDrawDouble(DrawContext3dmetId, Operation, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
#else // __cplusplus
|
||||
//=========================================================
|
||||
// For C file, call the default function, i.e. Double one
|
||||
//=========================================================
|
||||
#define M3dmetControl M3dmetControlDouble
|
||||
#define M3dmetControlDraw M3dmetControlDrawDouble
|
||||
#endif // __cplusplus
|
||||
//#endif // M_MIL_USE_64BIT
|
||||
|
||||
#if M_MIL_USE_STRING
|
||||
/***************************************************************************/
|
||||
/* 3dmet MODULE */
|
||||
/***************************************************************************/
|
||||
#if M_MIL_USE_UNICODE
|
||||
#if M_MIL_UNICODE_API
|
||||
|
||||
inline void MFTYPE M3dmetSaveW(const MIL_STRING& FileName, MIL_ID Context3dmetId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dmetSaveW(FileName.c_str(), Context3dmetId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE M3dmetRestoreW(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* Context3dmetId)
|
||||
{
|
||||
return M3dmetRestoreW(FileName.c_str(), SysId, ControlFlag, Context3dmetId);
|
||||
}
|
||||
|
||||
#else // M_MIL_UNICODE_API
|
||||
inline void MFTYPE M3dmetSaveA(const MIL_STRING& FileName, MIL_ID Context3dmetId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dmetSaveA(FileName.c_str(), Context3dmetId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE M3dmetRestoreA(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* Context3dmetId)
|
||||
{
|
||||
return M3dmetRestoreA(FileName.c_str(), SysId, ControlFlag, Context3dmetId);
|
||||
}
|
||||
|
||||
#endif /* M_MIL_UNICODE_API*/
|
||||
|
||||
#else // M_MIL_USE_UNICODE
|
||||
inline void MFTYPE M3dmetSave(const MIL_STRING& FileName, MIL_ID Context3dmetId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dmetSave(FileName.c_str(), Context3dmetId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE M3dmetRestore(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* Context3dmetId)
|
||||
{
|
||||
return M3dmetRestore(FileName.c_str(), SysId, ControlFlag, Context3dmetId);
|
||||
}
|
||||
|
||||
//inline void MFTYPE M3dmetStream(const MIL_STRING& MemPtrOrFileName, MIL_ID SysId, MIL_INT64 Operation, MIL_INT64 StreamType,
|
||||
// MIL_DOUBLE Version, MIL_INT64 ControlFlag, MIL_ID* Context3dmetId, MIL_INT* SizeByteVarPtr)
|
||||
// {
|
||||
// M3dmetStream((MIL_TEXT_PTR)MemPtrOrFileName.c_str(), SysId, Operation, StreamType, Version, ControlFlag, Context3dmetId, SizeByteVarPtr);
|
||||
// }
|
||||
|
||||
#endif /* M_MIL_USE_UNICODE */
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
#if M_MIL_UNICODE_API
|
||||
|
||||
inline MIL_DOUBLE MFTYPE M3dmetGetResultSafeType(MIL_ID Result3dmetId, MIL_INT64 ResultType, MIL_STRING& ResultArrayPtr)
|
||||
{
|
||||
#if MIL_COMPILE_VERSION >= MIL_COMPILE_TRUNK_VERSION && M_MIL_USE_SAFE_TYPE
|
||||
if((ResultType & M_CLIENT_ENCODING) != M_CLIENT_ENCODING)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dmetGetResult"), MIL_TEXT(" Result Type not supported with MIL_STRING."));
|
||||
}
|
||||
#endif
|
||||
|
||||
MIL_INT InternalStringSize = 0;
|
||||
|
||||
M3dmetGetResult(Result3dmetId, (ResultType & (~M_HLVLDATATYPE_MASK)) + M_STRING_SIZE + M_TYPE_MIL_INT, &InternalStringSize);
|
||||
|
||||
if(InternalStringSize > 0)
|
||||
{
|
||||
if(ResultArrayPtr.size() < (MIL_UINT)InternalStringSize)
|
||||
{
|
||||
ResultArrayPtr.resize((MIL_UINT)InternalStringSize);
|
||||
}
|
||||
}
|
||||
|
||||
M3dmetGetResult(Result3dmetId, ResultType, &ResultArrayPtr[0]);
|
||||
|
||||
return 0.0;
|
||||
}
|
||||
#endif /* M_MIL_UNICODE_API */
|
||||
#else
|
||||
//M3dmetGetResult is only defined in UNICODE
|
||||
#if M_MIL_UNICODE_API
|
||||
inline MIL_DOUBLE MFTYPE M3dmetGetResult(MIL_ID Result3dmetId, MIL_INT64 ResultType, MIL_STRING &ResultArrayPtr)
|
||||
{
|
||||
MIL_INT InternalStringSize = 0;
|
||||
|
||||
//Inquire the byte content
|
||||
M3dmetGetResult(Result3dmetId, (ResultType & (~M_HLVLDATATYPE_MASK)) + M_STRING_SIZE + M_TYPE_MIL_INT, &InternalStringSize);
|
||||
|
||||
if(InternalStringSize > 0)
|
||||
{
|
||||
ResultArrayPtr.assign(InternalStringSize, MIL_TEXT('\0'));
|
||||
M3dmetGetResult(Result3dmetId, ResultType, &ResultArrayPtr[0]);
|
||||
ResultArrayPtr.resize(InternalStringSize);
|
||||
}
|
||||
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif /* M_MIL_USE_STRING*/
|
||||
|
||||
#ifndef M_MIL_WARN_ON_DEPRECATED_MIL3DMET
|
||||
#define M_MIL_WARN_ON_DEPRECATED_MIL3DMET 1
|
||||
#endif
|
||||
#if defined(M_MIL_WARN_ON_DEPRECATED_MIL3DMET) && M_MIL_WARN_ON_DEPRECATED_MIL3DMET
|
||||
MIL_DEPRECATED(M3dmetCalculateScalar, 1060) // Use M3dmetFeature instead.
|
||||
MIL_DEPRECATED(M3dmetCalculate, 1060) // Use M3dmetFeatureEx instead.
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// Overload for std::vector.
|
||||
#if defined(M_MIL_USE_VECTOR) && M_MIL_USE_VECTOR
|
||||
// ----------------------------------------------------------
|
||||
template <typename UserType>
|
||||
inline MIL_INT64 MFTYPE M3dmetInquire(MIL_ID ContextOrResult3dmetId, MIL_INT64 InquireType, std::vector<UserType> &UserVarPtr)
|
||||
{
|
||||
// If the given MIL data type is not the same as the SrcType, change it to the correct one
|
||||
// and give a warning.
|
||||
MIL_INT64 InternalTrueDataTypeForStdVector = MilTraits<UserType>::TypeFlag;
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(M_GET_HLVLDATATYPE(InquireType) != 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dmetInquire"), MIL_TEXT("Combination value for the required data type is not supported with std::vector overload."));
|
||||
}
|
||||
#endif
|
||||
|
||||
InquireType = M_STRIP_HLVLDATATYPE(InquireType) + InternalTrueDataTypeForStdVector;
|
||||
|
||||
MIL_INT InternalNumberOfElementsForStdVector = 0;
|
||||
M3dmetInquire(ContextOrResult3dmetId, M_STRIP_HLVLDATATYPE(InquireType) + M_NB_ELEMENTS + M_TYPE_MIL_INT, &InternalNumberOfElementsForStdVector);
|
||||
|
||||
UserVarPtr.resize(InternalNumberOfElementsForStdVector);
|
||||
|
||||
if(InternalNumberOfElementsForStdVector > 0)
|
||||
{
|
||||
return M3dmetInquire(ContextOrResult3dmetId, InquireType, &UserVarPtr[0]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
template <typename UserType>
|
||||
inline MIL_DOUBLE MFTYPE M3dmetGetResult(MIL_ID Result3dmetId, MIL_INT64 ResultType, std::vector<UserType> &ResultArrayPtr)
|
||||
{
|
||||
//! If the given MIL data type is not the same as the SrcType, change it to the correct one
|
||||
//! and give a warning.
|
||||
MIL_INT64 InternalTrueDataTypeForStdVector = MilTraits<UserType>::TypeFlag;
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(M_GET_HLVLDATATYPE(ResultType) != 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dmetGetResult"), MIL_TEXT("Combination value for the required data type is not supported with std::vector overload."));
|
||||
}
|
||||
#endif
|
||||
|
||||
ResultType = M_STRIP_HLVLDATATYPE(ResultType) + InternalTrueDataTypeForStdVector;
|
||||
|
||||
MIL_INT InternalNumberOfElementsForStdVector = 0;
|
||||
M3dmetGetResult(Result3dmetId, M_STRIP_HLVLDATATYPE(ResultType) + M_NB_ELEMENTS + M_TYPE_MIL_INT, &InternalNumberOfElementsForStdVector);
|
||||
|
||||
ResultArrayPtr.resize(InternalNumberOfElementsForStdVector);
|
||||
|
||||
if(InternalNumberOfElementsForStdVector > 0)
|
||||
{
|
||||
M3dmetGetResult(Result3dmetId, ResultType, &ResultArrayPtr[0]);
|
||||
}
|
||||
return 0.0;
|
||||
}
|
||||
// ----------------------------------------------------------
|
||||
// Overloads for std::vector in M3dmetStream.
|
||||
inline void MFTYPE M3dmetStream(std::vector<MIL_UINT8> &MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dmetIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
MxxxStreamForStdVector(MemPtrOrFileName,
|
||||
SysId,
|
||||
Operation,
|
||||
StreamType,
|
||||
Version,
|
||||
ControlFlag,
|
||||
Context3dmetIdPtr,
|
||||
SizeByteVarPtr,
|
||||
M3dmetStream);
|
||||
}
|
||||
#endif // defined(M_MIL_USE_VECTOR) && M_MIL_USE_VECTOR
|
||||
//==============================================================================
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// MIL_UNIQUE_ID support
|
||||
|
||||
#if M_MIL_USE_MIL_UNIQUE_ID
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
template <> inline bool MilIsCorrectObjectType<&M3dmetFree>(MIL_INT64 ObjectType)
|
||||
{
|
||||
return (ObjectType & ~M_USER_DEFINE_LOW_ATTRIBUTE) == M_3DMET_OBJECT;
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef MIL_UNIQUE_ID<&M3dmetFree> MIL_UNIQUE_3DMET_ID;
|
||||
|
||||
#if M_MIL_USE_MOVE_SEMANTICS
|
||||
|
||||
inline MIL_UNIQUE_3DMET_ID M3dmetAlloc(MIL_ID SysId, MIL_INT64 ObjectType, MIL_INT64 InitFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_3DMET_ID(M3dmetAlloc(SysId, ObjectType, InitFlag, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_3DMET_ID M3dmetAllocResult(MIL_ID SysId, MIL_INT64 ResultType, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_3DMET_ID(M3dmetAllocResult(SysId, ResultType, ControlFlag, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_3DMET_ID M3dmetRestore(MIL_CONST_TEXT_PTR FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_3DMET_ID(M3dmetRestore(FileName, SysId, ControlFlag, M_NULL));
|
||||
}
|
||||
#if M_MIL_USE_STRING
|
||||
inline MIL_UNIQUE_3DMET_ID M3dmetRestore(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_3DMET_ID(M3dmetRestore(FileName.c_str(), SysId, ControlFlag, M_NULL));
|
||||
}
|
||||
#endif // M_MIL_USE_STRING
|
||||
template <MilFreeFuncType FreeFunc> inline void M3dmetFree(const MIL_UNIQUE_ID<FreeFunc>&) = delete;
|
||||
|
||||
inline void M3dmetStream(MilStreamParam MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_UNIQUE_3DMET_ID* Context3dmetIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
MxxxStreamForMilUniqueId(MemPtrOrFileName, SysId, Operation, StreamType, Version, ControlFlag, Context3dmetIdPtr, SizeByteVarPtr, M3dmetStream);
|
||||
}
|
||||
|
||||
#endif // M_MIL_USE_MOVE_SEMANTICS
|
||||
#endif // M_MIL_USE_MIL_UNIQUE_ID
|
||||
|
||||
// End of MIL_UNIQUE_ID support
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif // !M_MIL_LITE
|
||||
#endif // __MIL_3DMET_H__
|
||||
866
Include/ClassicMIL/MILDyn/mil3dmod.h
Normal file
866
Include/ClassicMIL/MILDyn/mil3dmod.h
Normal file
@ -0,0 +1,866 @@
|
||||
//==============================================================================
|
||||
//!
|
||||
//! \brief Mil3dmod CAPI header (M3dmod...)
|
||||
//!
|
||||
//! AUTHOR: Matrox Imaging
|
||||
//!
|
||||
//! COPYRIGHT NOTICE:
|
||||
//! Copyright (c) Matrox Electronic Systems Ltd., 1992-2023.
|
||||
//! All Rights Reserved
|
||||
// Revision: 10.60.0776
|
||||
//==============================================================================
|
||||
|
||||
#ifndef __MIL_3DMOD_H__
|
||||
#define __MIL_3DMOD_H__
|
||||
|
||||
#if (!M_MIL_LITE) /* MIL FULL ONLY */
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
// Indexing, used in other M3dmod functions (M3dmodInquire(), M3dmodControl(), ...)
|
||||
#define M_DEFAULT 0x10000000L // already defined in mil.h
|
||||
#define M_CONTEXT 0x08000000L // already defined in mil.h
|
||||
#define M_GENERAL 0x20000000L // already defined in milmod.h, ..
|
||||
#define M_ALL 0x40000000L // already defined in mil.h
|
||||
#define M_MOD_INDEX_FLAG 0x00200000L
|
||||
|
||||
#define M_MOD_LABEL_VALUE 5115 // =internal
|
||||
#define M_MOD_INDEX_VALUE 5116
|
||||
|
||||
#define M_MODIFICATION_COUNT 5010L // already defined in mil.h
|
||||
|
||||
//==============================================================================
|
||||
// M3dmodAlloc/AllocResult
|
||||
#define M_FIND_CYLINDER_CONTEXT 5121
|
||||
#define M_FIND_SPHERE_CONTEXT 5262
|
||||
#define M_FIND_RECTANGULAR_PLANE_CONTEXT 5299
|
||||
#define M_FIND_BOX_CONTEXT 5441
|
||||
#define M_FIND_SURFACE_CONTEXT 5548
|
||||
#define M_FIND_CYLINDER_RESULT 5122
|
||||
#define M_FIND_SPHERE_RESULT 5476
|
||||
#define M_FIND_RECTANGULAR_PLANE_RESULT 5477
|
||||
#define M_FIND_BOX_RESULT 5478
|
||||
#define M_FIND_SURFACE_RESULT 5549
|
||||
#define M_DRAW_3D_CONTEXT 3815 // Already defined in milcal
|
||||
#define M_DRAW_3D_GEOMETRIC_CONTEXT M_DRAW_3D_CONTEXT
|
||||
#define M_DRAW_3D_SURFACE_CONTEXT 5768
|
||||
//==============================================================================
|
||||
// M3dmodControl / M3dmodInquire
|
||||
// Context
|
||||
#define M_ENABLE -9997L // also in mil.h
|
||||
#define M_DISABLE -9999L // also in mil.h
|
||||
#define M_TRUE 1L // Already defined in mil.h, milmeas.h, miledge.h
|
||||
#define M_FALSE 0L // Already defined in mil.h, milmeas.h, miledge.h
|
||||
#define M_AUTO 444L // also in mil.h
|
||||
#define M_USER_DEFINED 21L // also in mil.h
|
||||
#define M_TIMEOUT 2077L
|
||||
#define M_ALLOCATION_FAILURE_REAL_TEST_FLAG 971L // also in milblob.h, milstr.h
|
||||
|
||||
// Geometric Context
|
||||
#define M_RECTANGLE 0x00000040L // 64 // Already defined in milmod
|
||||
#define M_SPHERE 2931L // Already defined in 3dgeo
|
||||
#define M_CYLINDER 3656 // Already defined in 3dgeo
|
||||
#define M_BOX 0x101L // Already defined in 3dgeo
|
||||
#define M_RECTANGLE_RANGE 4194
|
||||
#define M_SPHERE_RANGE 4195
|
||||
#define M_CYLINDER_RANGE 4196
|
||||
#define M_BOX_RANGE 4197
|
||||
#define M_RESERVED_POINTS_DISTANCE 5209
|
||||
#define M_NUMBER_OF_POINTS_RESERVED 5377
|
||||
#define M_RADIUS_MIN 5117
|
||||
#define M_RADIUS_MAX 5118
|
||||
#define M_RADIUS 0x00000040L
|
||||
#define M_TOLERANCE_RADIUS 4192
|
||||
#define M_TOLERANCE_LENGTH 4193
|
||||
#define M_LENGTH_MIN 5179
|
||||
#define M_LENGTH_MAX 5180
|
||||
#define M_SIZE_X_MIN 5737
|
||||
#define M_SIZE_Y_MIN 5738
|
||||
#define M_SIZE_Z_MIN 5739
|
||||
#define M_SIZE_X_MAX 5740
|
||||
#define M_SIZE_Y_MAX 5741
|
||||
#define M_SIZE_Z_MAX 5742
|
||||
#define M_FIT_NORMALS_DISTANCE 5107
|
||||
#define M_ACCEPTANCE 200L // Also defined in milmod.h
|
||||
#define M_CERTAINTY 202L // Also defined in milmod.h
|
||||
#define M_COVERAGE_MAX 2457L // Already defined in milmod.h
|
||||
#define M_FIT_ERROR_WEIGHTING_FACTOR 221L // Already defined in milmod.h
|
||||
#define M_MIN_SEPARATION_DISTANCE 5332
|
||||
#define M_ACCEPTANCE_TARGET 201L // Already defined in milmod.h
|
||||
#define M_NUMBER_OF_POINTS_MIN 5060L // ALready defined in mil3dblob
|
||||
#define M_FIT_DISTANCE_MODE 5427
|
||||
#define M_FIT_DISTANCE 5428
|
||||
#define M_PERSEVERANCE 5222
|
||||
#define M_LOW 1L // Also defined in Milocr.h
|
||||
#define M_MEDIUM 2L // Also defined in Milocr.h
|
||||
#define M_HIGH 3L // Also defined in Milocr.h
|
||||
#define M_ABSOLUTE 1L // Also defined in milpat.h
|
||||
#define M_RELATIVE 21L // Also defined in milpat.h
|
||||
#define M_FIT_ITERATIONS_MAX 104L // Already defined in milmet.h
|
||||
//Cylinder context
|
||||
//Plane context
|
||||
#define M_NORMAL_CONDITION 4114
|
||||
#define M_NORMAL_X 3537 // Already defined in mil3d
|
||||
#define M_NORMAL_Y 3538
|
||||
#define M_NORMAL_Z 3539
|
||||
#define M_NORMAL_ANGLE_TOLERANCE 5517
|
||||
#define M_UNCONDITIONAL 0L // Already defined in mil.h
|
||||
#define M_PARALLEL 0x0027L // Already defined in milmetrol.h
|
||||
#define M_PERPENDICULAR 0x0028L // Already defined in milmetrol.h
|
||||
#define M_PARALLEL_OR_PERPENDICULAR 4117
|
||||
#define M_VISIBLE_FACE_PARALLEL 5853
|
||||
#define M_TOLERANCE_X 5473
|
||||
#define M_TOLERANCE_Y 5474
|
||||
#define M_TOLERANCE_Z 5475
|
||||
// Box context
|
||||
#define M_DISTANCE_MODE 2563L // Already defined in milmetrol
|
||||
#define M_DISTANCE_THRESHOLD 4008
|
||||
#define M_PLANE_CERTAINTY 4148
|
||||
#define M_PLANE_ACCEPTANCE 4149
|
||||
#define M_PLANE_MAX_COVERAGE 4150
|
||||
#define M_NUMBER_OF_VISIBLE_FACES 5615
|
||||
#define M_NUMBER_OF_VISIBLE_FACES_MIN 5909
|
||||
#define M_NUMBER_OF_VISIBLE_FACES_MAX 5910
|
||||
#define M_COMPLETION_SIZE_X 5618
|
||||
#define M_COMPLETION_SIZE_Y 5619
|
||||
#define M_COMPLETION_SIZE_Z 5620
|
||||
#define M_SAME_AS_NOMINAL 0
|
||||
#define M_DIRECTION_MODE 3431 // already defined in mil3dim.h
|
||||
#define M_TOWARDS_POSITION 3432 // already defined in mil3dim.h
|
||||
#define M_AWAY_FROM_POSITION 3433 // already defined in mil3dim.h
|
||||
#define M_TOWARDS_DIRECTION 3434 // already defined in mil3dim.h
|
||||
#define M_DIRECTION_REFERENCE_X 3435 // already defined in mil3dim.h
|
||||
#define M_DIRECTION_REFERENCE_Y 3436 // already defined in mil3dim.h
|
||||
#define M_DIRECTION_REFERENCE_Z 3437 // already defined in mil3dim.h
|
||||
#define M_BOX_ORIENTATION_TWO_PLANES 5650
|
||||
#define M_BOX_ORIENTATION_LARGEST_PLANE 5651
|
||||
#define M_BOX_ORIENTATION_AVERAGE_NORMAL 5652
|
||||
#define M_BOX_ORIENTATION_AVERAGE_ROTATION 5653
|
||||
#define M_BOX_FACE_PERPENDICULARITY_THRESHOLD 5654
|
||||
#define M_COMPLETION_ANGLE_TOLERANCE 5682
|
||||
#define M_BOX_FACE_PARALLELISM_THRESHOLD 5655
|
||||
#define M_ELONGATION_MIN 5704
|
||||
#define M_ELONGATION_MAX 5705
|
||||
#define M_POLARITY 0x00004000L // already defined in milmeas.h
|
||||
#define M_OUTSIDE 0L // already defined in mil.h
|
||||
#define M_INSIDE 1L // already defined in mil.h
|
||||
#define M_SAME -1L // already defined in milocr.h
|
||||
#define M_ANY 0x11000000L // already defined in milocr.h
|
||||
#define M_VSDBG_ACTIVE 5607
|
||||
#define M_SORT_DIRECTION 5650
|
||||
#define M_EXHAUSTIVE_SEARCH 5647
|
||||
// Draw context
|
||||
#define M_ROOT_NODE 0 // already defined in mil3dgra.h
|
||||
#define M_GLOBAL_DRAW_SETTINGS M_CONTEXT // already defined in mil3dblob.h
|
||||
#define M_DRAW_MODEL 0x00001000L // already defined
|
||||
#define M_DRAW_BOX 0x00000020L // already defined in milpat.h
|
||||
#define M_DRAW_INLIER_POINTS 5492
|
||||
#define M_DRAW_RESERVED_POINTS 5493
|
||||
#define M_DRAW_MODEL_KEYPOINTS 5679
|
||||
#define M_DRAW_MODEL_PREPROCESSED 5769
|
||||
#define M_DRAW_CS_SHIFT 16L // already defined in milcal
|
||||
#define M_DRAW_AXES (1 << M_DRAW_CS_SHIFT) // already defined in milcal
|
||||
#define M_DRAW_BACKGROUND_POINTS 5835
|
||||
#define M_PSEUDO_COLOR 0x4000L // already defined in mil3dblob.h
|
||||
#define M_PSEUDO_COLOR_OFFSET 5439L // already defined in mil3dblob.h
|
||||
#define M_GRAPHIC_LIST_DEFAULT 0x04005526L // already defined in mil3dblob.h
|
||||
#define M_ACTIVE 1534L // already defined in milmetrol.h
|
||||
#define M_THICKNESS 3L // already defined in mil3dgra.h
|
||||
#define M_APPEARANCE 4679 // already defined in mil3dgra.h
|
||||
#define M_OPACITY 4728 // already defined in mil3dgra.h
|
||||
#define M_COLOR 0x00000100L // already defined in mil3dgra.h
|
||||
#define M_DEFAULT_LENGTH -1
|
||||
#define M_REFERENCE_X 100L // already defined in milmod.h, milpat.h
|
||||
#define M_REFERENCE_Y 101L // already defined in milmod.h, milpat.h
|
||||
#define M_REFERENCE_Z 5765
|
||||
#define M_CENTER 0x00000080L // already defined in milim.h
|
||||
//surface context
|
||||
#define M_USER_DEFINED_REGISTRATION_CONTEXT_ID 5677L
|
||||
#define M_REFINE_REGISTRATION 5678L
|
||||
#define M_SCENE_PROJECTION 5763L
|
||||
#define M_USER_DEFINED_REGISTRATION 5722L
|
||||
#define M_FIND_SURFACE_REFINEMENT_PRECISE 5723L
|
||||
#define M_FIND_SURFACE_REFINEMENT_FAST 5816L
|
||||
#define M_SEARCH_POINT_RESOLUTION 5747
|
||||
#define M_SAME_AS_MODEL -1
|
||||
#define M_MODEL_RESOLUTION 5748
|
||||
#define M_REMOVE_BACKGROUND 5760L
|
||||
#define M_SAVE_FIT_INFO 5756
|
||||
#define M_REMOVE_OUTLIERS 5768L
|
||||
#define M_SCENE_COMPLEXITY 5784
|
||||
#define M_RESTING_PLANE_ANGLE_TOLERANCE 5872L
|
||||
#define M_FLOOR_DEFINED 5883
|
||||
#define M_NUMBER_RESTING_PLANE 5884
|
||||
#define M_FLOOR 4867L // 0x1303 already defined
|
||||
// Result
|
||||
#define M_STOP_FIND 115L // already define milmod
|
||||
|
||||
//==============================================================================
|
||||
// M3dmodInquire
|
||||
// Context
|
||||
//==============================================================================
|
||||
// M3dmodAllocResult ResultTypes
|
||||
#define M_RMS_ERROR 3502
|
||||
#define M_SCORE 0x00001400L // Also defined in milpat.h, milmod.h, milcode.h, milmeas.h, milreg.h
|
||||
#define M_NUMBER_OF_POINTS M_NUMBER // already defined in mil3dim.h
|
||||
#define M_NUMBER 1009L // defined in milmeas.h
|
||||
#define M_SCORE_TARGET 0x00001800L // defined in milmod.h
|
||||
//==============================================================================
|
||||
// M3dmodGetResult ResultTypes
|
||||
// General
|
||||
#define M_STATUS 0x00008002L // already defined
|
||||
#define M_NOT_INITIALIZED 3L // already defined in milcal
|
||||
#define M_CURRENTLY_CALCULATING 2718L //already defined in milreg
|
||||
#define M_TIMEOUT_REACHED 2554L // also in milmod.h, mildmr.h
|
||||
#define M_STOPPED_BY_REQUEST 2555L // also in milmod.h, mildmr.h
|
||||
#define M_NOT_ENOUGH_MEMORY 4L // also in mil.h, mildmr.h
|
||||
#define M_COMPLETE 0x00000000L // also in mil.h, milmod.h, mildmr.h
|
||||
#define M_INTERNAL_ERROR 5L // also in milcal.h, mildmr.h
|
||||
#define M_NOT_ENOUGH_VALID_DATA 1336L // Already defined in mil3dmet
|
||||
#define M_MISSING_COMPONENT_NORMALS_MIL 4183
|
||||
#define M_NOT_ENOUGH_FEATURES 5588
|
||||
#define M_ALL_POINTS_REPLICATED 5787
|
||||
#define M_FIT_DISTANCE_USED 5518
|
||||
// Geo result
|
||||
#define M_LENGTH 0x00002000L // Already defined in mil3dgeo
|
||||
#define M_AXIS_X 3664 // Already defined in mil3dgeo
|
||||
#define M_AXIS_Y 3665 // Already defined in mil3dgeo
|
||||
#define M_AXIS_Z 3666 // Already defined in mil3dgeo
|
||||
#define M_CENTER_X 4L // Already defined in mil3dgeo
|
||||
#define M_CENTER_Y 5L // Already defined in mil3dgeo
|
||||
#define M_CENTER_Z 3400 // Already defined in mil3dgeo
|
||||
#define M_RADIUS 0x00000040L // Already defined in MilMod.h
|
||||
#define M_START_POINT_X 3658 // Already defined in mil3dgeo
|
||||
#define M_START_POINT_Y 3659 // Already defined in mil3dgeo
|
||||
#define M_START_POINT_Z 3660 // Already defined in mil3dgeo
|
||||
#define M_END_POINT_X 3661 // Already defined in mil3dgeo
|
||||
#define M_END_POINT_Y 3662 // Already defined in mil3dgeo
|
||||
#define M_END_POINT_Z 3663 // Already defined in mil3dgeo
|
||||
#define M_COEFFICIENT_A 3401 // Already defined in mil3dgeo
|
||||
#define M_COEFFICIENT_B 3402 // Already defined in mil3dgeo
|
||||
#define M_COEFFICIENT_C 3403 // Already defined in mil3dgeo
|
||||
#define M_COEFFICIENT_D 3404 // Already defined in mil3dgeo
|
||||
#define M_NORMAL_X 3537 // Already defined in mil3dgeo
|
||||
#define M_NORMAL_Y 3538 // Already defined in mil3dgeo
|
||||
#define M_NORMAL_Z 3539 // Already defined in mil3dgeo
|
||||
#define M_SIZE_X 1536L // Already defined in mil3dgeo
|
||||
#define M_SIZE_Y 1537L // Already defined in mil3dgeo
|
||||
#define M_SIZE_Z 1538L // Already defined in mil3dgeo
|
||||
#define M_CLOSEST_TO_ORIGIN_X 3540 // Already defined in mil3dgeo
|
||||
#define M_CLOSEST_TO_ORIGIN_Y 3541 // Already defined in mil3dgeo
|
||||
#define M_CLOSEST_TO_ORIGIN_Z 3542 // Already defined in mil3dgeo
|
||||
#define M_UNROTATED_MIN_X 3850 // Already defined in mil3dgeo
|
||||
#define M_UNROTATED_MIN_Y 3851 // Already defined in mil3dgeo
|
||||
#define M_UNROTATED_MIN_Z 3852 // Already defined in mil3dgeo
|
||||
#define M_UNROTATED_MAX_X 3853 // Already defined in mil3dgeo
|
||||
#define M_UNROTATED_MAX_Y 3854 // Already defined in mil3dgeo
|
||||
#define M_UNROTATED_MAX_Z 3855 // Already defined in mil3dgeo
|
||||
//Surface
|
||||
#define M_STATUS_SCENE_RESOLUTION 5845
|
||||
#define M_STATUS_REFINE_REGISTRATION 5848
|
||||
#define M_APPLIED_AND_REJECTED 5846
|
||||
#define M_NOT_APPLIED 5818
|
||||
#define M_APPLIED 5817
|
||||
#define M_INCOMPATIBLE 5746
|
||||
#define M_COMPATIBLE 5847
|
||||
#define M_POSITION_X 0x00003400L // Already defined in milpat.h
|
||||
#define M_POSITION_Y 0x00004400L // Already defined in milpat.h
|
||||
#define M_POSITION_Z 3960L // Already defined in mil3dgra
|
||||
#define M_SCORE_FIT 2461L // Already defined in milmod.h
|
||||
|
||||
//Pseudo Ids
|
||||
#define M_3DMOD_FIND_SURFACE_PSEUDO_ID (M_3DMOD_PSEUDO_ID +0x080000)
|
||||
#define M_FIND_SURFACE_CONTEXT_REFINEMENT_FAST (M_3DMOD_FIND_SURFACE_PSEUDO_ID + M_FAST)
|
||||
#define M_FIND_SURFACE_CONTEXT_REFINEMENT_PRECISE (M_3DMOD_FIND_SURFACE_PSEUDO_ID + M_PRECISE)
|
||||
|
||||
//==============================================================================
|
||||
// CopyResult
|
||||
#define M_BOUNDING_BOX 0x00000003L // Already defined in mil3dim
|
||||
#define M_GEOMETRY 1306L // Already defined in mil3dgeo
|
||||
#define M_RESULT_IMAGE_SIZE_X 5226L // already defined in mil3dmet.h
|
||||
#define M_RESULT_IMAGE_SIZE_Y 5227L // already defined in mil3dmet.h
|
||||
#define M_INDEX_IMAGE 5046L // already defined in mil3dblob.h
|
||||
#define M_INLIER_MASK 3590L // Already defined in mil3dmet.h
|
||||
#define M_INLIER_INDEX_IMAGE 5489
|
||||
#define M_RESERVED_MASK 5490
|
||||
#define M_RESERVED_INDEX_IMAGE 5491
|
||||
#define M_OCCURRENCE_MATRIX 5590
|
||||
#define M_FIXTURING_MATRIX 3878L // already defined in mil3dim.h
|
||||
#define M_RESTING_PLANE 5871L
|
||||
#define M_BACKGROUND_MASK 5831L
|
||||
#define M_PLANE 1353L // Already defined in mil3dgeo
|
||||
//==============================================================================
|
||||
// Define
|
||||
#define M_DELETE 3L // already defined in milmod.h
|
||||
#define M_ADD 0x0000L // already defined in milmod.h
|
||||
#define M_ADD_FROM_GEOMETRY 5471L
|
||||
#define M_ADD_FROM_POINT_CLOUD 5554
|
||||
#define M_SURFACE 1021L // Already defined in mil.h (milbuf)
|
||||
//==============================================================================
|
||||
//M3dmodCopy
|
||||
#define M_MODEL_KEYPOINTS 5676
|
||||
#define M_MODEL 0x00010000L // already defined in milmod.h
|
||||
#define M_MODEL_PREPROCESSED 5770
|
||||
//==============================================================================
|
||||
// CAPI function prototypes
|
||||
MIL_ID MFTYPE M3dmodAlloc(MIL_ID SysId,
|
||||
MIL_INT64 ContextType,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dmodIdPtr);
|
||||
|
||||
MIL_ID MFTYPE M3dmodAllocResult(MIL_ID SysId,
|
||||
MIL_INT64 ResultType,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Result3dmodIdPtr);
|
||||
|
||||
void MFTYPE M3dmodFree(MIL_ID ContextOrResult3dmodId);
|
||||
|
||||
|
||||
void MFTYPE M3dmodFind(MIL_ID Context3dmodId,
|
||||
MIL_ID ContainerBufId,
|
||||
MIL_ID Result3dmodId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dmodCopyResult(MIL_ID SrcResult3dmodId,
|
||||
MIL_INT64 SrcIndex,
|
||||
MIL_ID DstMilObjectId,
|
||||
MIL_INT64 DstIndex,
|
||||
MIL_INT64 CopyType,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
|
||||
void MFTYPE M3dmodCopy(MIL_ID SrcContext3dmodId,
|
||||
MIL_INT64 SrcIndex,
|
||||
MIL_ID DstMilObjectId,
|
||||
MIL_INT64 DstIndex,
|
||||
MIL_INT64 CopyType,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT64 MFTYPE M3dmodDefine(MIL_ID Context3dmodId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 ModelType,
|
||||
MIL_DOUBLE Param1,
|
||||
MIL_DOUBLE Param2,
|
||||
MIL_DOUBLE Param3,
|
||||
MIL_DOUBLE Param4,
|
||||
MIL_DOUBLE Param5,
|
||||
MIL_DOUBLE Param6,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT64 MFTYPE M3dmodDraw3d(MIL_ID OperationDraw3dContext3dmodId,
|
||||
MIL_ID SrcResult3dmodId,
|
||||
MIL_INT64 SrcIndex,
|
||||
MIL_ID DstList3dgraId,
|
||||
MIL_INT64 DstParentLabel,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dmodPreprocess(MIL_ID Context3dmodId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dmodControlInt64(MIL_ID ContextOrResult3dmodId,
|
||||
MIL_INT64 Index,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_INT64 ControlValue);
|
||||
|
||||
void MFTYPE M3dmodControlDouble(MIL_ID ContextOrResult3dmodId,
|
||||
MIL_INT64 Index,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_DOUBLE ControlValue);
|
||||
|
||||
MIL_INT64 MFTYPE M3dmodInquire(MIL_ID Context3dmodId,
|
||||
MIL_INT64 Index,
|
||||
MIL_INT64 InquireType,
|
||||
void* UserVarPtr);
|
||||
|
||||
void MFTYPE M3dmodControlDrawInt64(MIL_ID DrawContext3dmodId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_INT64 ControlValue);
|
||||
|
||||
void MFTYPE M3dmodControlDrawDouble(MIL_ID DrawContext3dmodId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_DOUBLE ControlValue);
|
||||
|
||||
MIL_INT64 MFTYPE M3dmodInquireDraw(MIL_ID DrawContext3dmodId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 InquireType,
|
||||
void* UserVarPtr);
|
||||
|
||||
MIL_DOUBLE MFTYPE M3dmodGetResult(MIL_ID Result3dmodId,
|
||||
MIL_INT64 ResultIndex,
|
||||
MIL_INT64 ResultType,
|
||||
void* ResultArrayPtr);
|
||||
|
||||
#if M_MIL_USE_UNICODE
|
||||
void MFTYPE M3dmodSaveA(MIL_CONST_TEXTA_PTR FileName,
|
||||
MIL_ID Context3dmodId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_ID MFTYPE M3dmodRestoreA(MIL_CONST_TEXTA_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dmodIdPtr);
|
||||
|
||||
void MFTYPE M3dmodStreamA(MIL_TEXTA_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dmodIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
|
||||
|
||||
|
||||
void MFTYPE M3dmodSaveW(MIL_CONST_TEXTW_PTR FileName,
|
||||
MIL_ID Context3dmodId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_ID MFTYPE M3dmodRestoreW(MIL_CONST_TEXTW_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dmodIdPtr);
|
||||
|
||||
void MFTYPE M3dmodStreamW(MIL_TEXTW_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dmodIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
|
||||
|
||||
|
||||
#if M_MIL_UNICODE_API
|
||||
#define M3dmodSave M3dmodSaveW
|
||||
#define M3dmodRestore M3dmodRestoreW
|
||||
#define M3dmodStream M3dmodStreamW
|
||||
#else
|
||||
#define M3dmodSave M3dmodSaveA
|
||||
#define M3dmodRestore M3dmodRestoreA
|
||||
#define M3dmodStream M3dmodStreamA
|
||||
#endif //M_MIL_UNICODE_API
|
||||
|
||||
#else
|
||||
|
||||
void MFTYPE M3dmodSave(MIL_CONST_TEXT_PTR FileName,
|
||||
MIL_ID Context3dmodId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_ID MFTYPE M3dmodRestore(MIL_CONST_TEXT_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dmodIdPtr);
|
||||
|
||||
void MFTYPE M3dmodStream(MIL_TEXT_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dmodIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
|
||||
#endif //M_MIL_USE_UNICODE
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#ifdef __cplusplus
|
||||
//C++ overloads
|
||||
|
||||
inline void MFTYPE M3dmodStreamCpp(MilStreamParam MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dmodIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
M3dmodStream(MemPtrOrFileName.m_Param, SysId, Operation, StreamType, Version, ControlFlag, Context3dmodIdPtr, SizeByteVarPtr);
|
||||
}
|
||||
|
||||
#undef M3dmodStream
|
||||
#define M3dmodStream M3dmodStreamCpp
|
||||
#else
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
|
||||
//==============================================================================
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
//=========================================================
|
||||
// See milos.h for explanation about these functions.
|
||||
//=========================================================
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// M3dmodInquire
|
||||
|
||||
inline MIL_INT64 MFTYPE M3dmodInquireSafeType(MIL_ID ContextOrResult3dmodId, MIL_INT64 Index, MIL_INT64 InquireType, MilVoidPtr UserVarPtr)
|
||||
{
|
||||
MIL_INT64 RequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
if(!(M_DEFAULT_DATA_TYPE_BIT_SET(InquireType) || M_RECOMMENDED_DATA_TYPE_BIT_SET(InquireType)))
|
||||
{
|
||||
M3dmodInquire(ContextOrResult3dmodId, Index, InquireType | M_DEFAULT_DATA_TYPE, &RequiredParamType);
|
||||
}
|
||||
if(!MfuncPointerIsCompatible(RequiredParamType, UserVarPtr.Type, InquireType))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dmodInquire"));
|
||||
}
|
||||
return M3dmodInquire(ContextOrResult3dmodId, Index, InquireType, UserVarPtr.Ptr);
|
||||
}
|
||||
|
||||
inline MIL_INT64 MFTYPE M3dmodInquireUnsafe(MIL_ID ContextOrResult3dmodId, MIL_INT64 Index, MIL_INT64 InquireType, void* UserVarPtr)
|
||||
{
|
||||
return M3dmodInquire(ContextOrResult3dmodId,Index, InquireType, UserVarPtr);
|
||||
}
|
||||
|
||||
inline MIL_INT64 MFTYPE M3dmodInquireDrawSafeType(MIL_ID DrawContext3dmodId, MIL_INT64 Operation, MIL_INT64 InquireType, MilVoidPtr UserVarPtr)
|
||||
{
|
||||
MIL_INT64 RequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
if(!(M_DEFAULT_DATA_TYPE_BIT_SET(InquireType) || M_RECOMMENDED_DATA_TYPE_BIT_SET(InquireType)))
|
||||
{
|
||||
M3dmodInquireDraw(DrawContext3dmodId, Operation, InquireType | M_DEFAULT_DATA_TYPE, &RequiredParamType);
|
||||
}
|
||||
if(!MfuncPointerIsCompatible(RequiredParamType, UserVarPtr.Type, InquireType))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dmodInquireDraw"));
|
||||
}
|
||||
return M3dmodInquireDraw(DrawContext3dmodId, Operation, InquireType, UserVarPtr.Ptr);
|
||||
}
|
||||
|
||||
inline MIL_INT64 MFTYPE M3dmodInquireDrawUnsafe(MIL_ID DrawContext3dmodId, MIL_INT64 Operation, MIL_INT64 InquireType, void* UserVarPtr)
|
||||
{
|
||||
return M3dmodInquireDraw(DrawContext3dmodId, Operation, InquireType, UserVarPtr);
|
||||
}
|
||||
|
||||
#define M3dmodInquire M3dmodInquireSafeType
|
||||
#define M3dmodInquireDraw M3dmodInquireDrawSafeType
|
||||
|
||||
#else // #if M_MIL_USE_SAFE_TYPE
|
||||
#define M3dmodInquireUnsafe M3dmodInquire
|
||||
#define M3dmodInquireDrawUnsafe M3dmodInquireDraw
|
||||
#endif // #if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
// -------------------------------------------------------------------------
|
||||
// M3dmodGetResult safe type definitions
|
||||
//
|
||||
inline MIL_DOUBLE MFTYPE M3dmodGetResultSafeType(MIL_ID Result3dmodId, MIL_INT64 ResultIndex, MIL_INT64 ResultType, MilVoidPtr ResultArrayPtr)
|
||||
{
|
||||
MIL_INT64 RequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
if(!(M_DEFAULT_DATA_TYPE_BIT_SET(ResultType) || M_RECOMMENDED_DATA_TYPE_BIT_SET(ResultType)))
|
||||
{
|
||||
M3dmodGetResult(Result3dmodId, ResultIndex, ResultType | M_DEFAULT_DATA_TYPE, &RequiredParamType);
|
||||
}
|
||||
if(!MfuncPointerIsCompatible(RequiredParamType, ResultArrayPtr.Type, ResultType))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dmodGetResult"));
|
||||
}
|
||||
return M3dmodGetResult(Result3dmodId, ResultIndex, ResultType, ResultArrayPtr.Ptr);
|
||||
}
|
||||
|
||||
inline MIL_DOUBLE MFTYPE M3dmodGetResultUnsafe(MIL_ID Result3dmodId, MIL_INT64 ResultIndex, MIL_INT64 ResultType, void* ResultArrayPtr)
|
||||
{
|
||||
return M3dmodGetResult(Result3dmodId, ResultIndex, ResultType, ResultArrayPtr);
|
||||
}
|
||||
|
||||
#define M3dmodGetResult M3dmodGetResultSafeType
|
||||
|
||||
#else // #if M_MIL_USE_SAFE_TYPE
|
||||
#define M3dmodGetResultUnsafe M3dmodGetResult
|
||||
#endif // #if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
//=========================================================
|
||||
// M3dmodControl function overloads when compiling c++ files
|
||||
//=========================================================
|
||||
template <typename T>
|
||||
inline void M3dmodControl(MIL_ID ContextOrResult3dmodId, MIL_INT64 Index, MIL_INT64 ControlType, T ControlValue)
|
||||
{
|
||||
M3dmodControlInt64(ContextOrResult3dmodId, Index, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void M3dmodControl(MIL_ID ContextOrResult3dmodId, MIL_INT64 Index, MIL_INT64 ControlType, float ControlValue)
|
||||
{
|
||||
M3dmodControlDouble(ContextOrResult3dmodId, Index, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void M3dmodControl(MIL_ID ContextOrResult3dmodId, MIL_INT64 Index, MIL_INT64 ControlType, MIL_DOUBLE ControlValue)
|
||||
{
|
||||
M3dmodControlDouble(ContextOrResult3dmodId, Index, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline void M3dmodControlDraw(MIL_ID DrawContext3dmodId, MIL_INT64 Operation, MIL_INT64 ControlType, T ControlValue)
|
||||
{
|
||||
M3dmodControlDrawInt64(DrawContext3dmodId, Operation, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void M3dmodControlDraw(MIL_ID DrawContext3dmodId, MIL_INT64 Operation, MIL_INT64 ControlType, float ControlValue)
|
||||
{
|
||||
M3dmodControlDrawDouble(DrawContext3dmodId, Operation, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void M3dmodControlDraw(MIL_ID DrawContext3dmodId, MIL_INT64 Operation, MIL_INT64 ControlType, MIL_DOUBLE ControlValue)
|
||||
{
|
||||
M3dmodControlDrawDouble(DrawContext3dmodId, Operation, ControlType, ControlValue);
|
||||
}
|
||||
#else // __cplusplus
|
||||
//=========================================================
|
||||
// For C file, call the default function, i.e. Double one
|
||||
//=========================================================
|
||||
#define M3dmodControl M3dmodControlDouble
|
||||
#define M3dmodControlDraw M3dmodControlDrawDouble
|
||||
#endif // __cplusplus
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// Overload for std::vector.
|
||||
#if defined(M_MIL_USE_VECTOR) && M_MIL_USE_VECTOR
|
||||
template <typename UserType>
|
||||
inline MIL_INT64 MFTYPE M3dmodInquire(MIL_ID ContextOrResult3dmodId, MIL_INT64 Index, MIL_INT64 InquireType, std::vector<UserType> &UserVarPtr)
|
||||
{
|
||||
// If the given MIL data type is not the same as the SrcType, change it to the correct one
|
||||
// and give a warning.
|
||||
MIL_INT64 InternalTrueDataTypeForStdVector = MilTraits<UserType>::TypeFlag;
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(M_GET_HLVLDATATYPE(InquireType) != 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dmodInquire"), MIL_TEXT("Combination value for the required data type is not supported with std::vector overload."));
|
||||
}
|
||||
#endif
|
||||
|
||||
InquireType = M_STRIP_HLVLDATATYPE(InquireType) + InternalTrueDataTypeForStdVector;
|
||||
|
||||
MIL_INT InternalNumberOfElementsForStdVector = 0;
|
||||
M3dmodInquire(ContextOrResult3dmodId, Index, M_STRIP_HLVLDATATYPE(InquireType) + M_NB_ELEMENTS + M_TYPE_MIL_INT, &InternalNumberOfElementsForStdVector);
|
||||
|
||||
UserVarPtr.resize(InternalNumberOfElementsForStdVector);
|
||||
|
||||
if(InternalNumberOfElementsForStdVector > 0)
|
||||
{
|
||||
return M3dmodInquire(ContextOrResult3dmodId, Index, InquireType, &UserVarPtr[0]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
template <typename UserType>
|
||||
inline MIL_DOUBLE MFTYPE M3dmodGetResult(MIL_ID Result3dmodId, MIL_INT64 Index, MIL_INT64 ResultType, std::vector<UserType> &ResultArrayPtr)
|
||||
{
|
||||
//! If the given MIL data type is not the same as the SrcType, change it to the correct one
|
||||
//! and give a warning.
|
||||
MIL_INT64 InternalTrueDataTypeForStdVector = MilTraits<UserType>::TypeFlag;
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(M_GET_HLVLDATATYPE(ResultType) != 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dmodGetResult"), MIL_TEXT("Combination value for the required data type is not supported with std::vector overload."));
|
||||
}
|
||||
#endif
|
||||
|
||||
ResultType = M_STRIP_HLVLDATATYPE(ResultType) + InternalTrueDataTypeForStdVector;
|
||||
|
||||
MIL_INT InternalNumberOfElementsForStdVector = 0;
|
||||
M3dmodGetResult(Result3dmodId, Index, M_STRIP_HLVLDATATYPE(ResultType) + M_NB_ELEMENTS + M_TYPE_MIL_INT, &InternalNumberOfElementsForStdVector);
|
||||
|
||||
ResultArrayPtr.resize(InternalNumberOfElementsForStdVector);
|
||||
|
||||
if(InternalNumberOfElementsForStdVector > 0)
|
||||
{
|
||||
M3dmodGetResult(Result3dmodId, Index, ResultType, &ResultArrayPtr[0]);
|
||||
}
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
// Overloads for std::vector in M3dmodStream.
|
||||
inline void MFTYPE M3dmodStream(std::vector<MIL_UINT8> &MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dmodIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
MxxxStreamForStdVector(MemPtrOrFileName,
|
||||
SysId,
|
||||
Operation,
|
||||
StreamType,
|
||||
Version,
|
||||
ControlFlag,
|
||||
Context3dmodIdPtr,
|
||||
SizeByteVarPtr,
|
||||
M3dmodStream);
|
||||
}
|
||||
|
||||
#endif // defined(M_MIL_USE_VECTOR) && M_MIL_USE_VECTOR
|
||||
#if M_MIL_USE_STRING
|
||||
/***************************************************************************/
|
||||
/* 3dmod MODULE */
|
||||
/***************************************************************************/
|
||||
#if M_MIL_USE_UNICODE
|
||||
#if M_MIL_UNICODE_API
|
||||
|
||||
inline void MFTYPE M3dmodSaveW(const MIL_STRING& FileName, MIL_ID Context3dmodId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dmodSaveW(FileName.c_str(), Context3dmodId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE M3dmodRestoreW(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* Context3dmodIdPtr)
|
||||
{
|
||||
return M3dmodRestoreW(FileName.c_str(), SysId, ControlFlag, Context3dmodIdPtr);
|
||||
}
|
||||
|
||||
#else // M_MIL_UNICODE_API
|
||||
inline void MFTYPE M3dmodSaveA(const MIL_STRING& FileName, MIL_ID Context3dmodId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dmodSaveA(FileName.c_str(), Context3dmodId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE M3dmodRestoreA(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* Context3dmodIdPtr)
|
||||
{
|
||||
return M3dmodRestoreA(FileName.c_str(), SysId, ControlFlag, Context3dmodIdPtr);
|
||||
}
|
||||
|
||||
#endif /* M_MIL_UNICODE_API*/
|
||||
|
||||
#else // M_MIL_USE_UNICODE
|
||||
inline void MFTYPE M3dmodSave(const MIL_STRING& FileName, MIL_ID ContextOrResult3dmodId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dmodSave(FileName.c_str(), ContextOrResult3dmodId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE M3dmodRestore(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* Context3dmodIdPtr)
|
||||
{
|
||||
return M3dmodRestore(FileName.c_str(), SysId, ControlFlag, Context3dmodIdPtr);
|
||||
}
|
||||
|
||||
#endif /* M_MIL_USE_UNICODE */
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
#if M_MIL_UNICODE_API
|
||||
|
||||
inline MIL_DOUBLE MFTYPE M3dmodGetResultSafeType(MIL_ID Result3dmodId, MIL_INT64 ResultIndex, MIL_INT64 ResultType, MIL_STRING& ResultArrayPtr)
|
||||
{
|
||||
#if MIL_COMPILE_VERSION >= MIL_COMPILE_TRUNK_VERSION && M_MIL_USE_SAFE_TYPE
|
||||
if((ResultType & M_CLIENT_ENCODING) != M_CLIENT_ENCODING)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dmodGetResult: Result Type not supported with MIL_STRING."));
|
||||
}
|
||||
#endif
|
||||
|
||||
MIL_INT InternalStringSize = 0;
|
||||
|
||||
M3dmodGetResult(Result3dmodId, ResultIndex, (ResultType & (~M_HLVLDATATYPE_MASK)) + M_STRING_SIZE + M_TYPE_MIL_INT, &InternalStringSize);
|
||||
|
||||
if(InternalStringSize > 0)
|
||||
{
|
||||
if(ResultArrayPtr.size() < (MIL_UINT)InternalStringSize)
|
||||
{
|
||||
ResultArrayPtr.resize((MIL_UINT)InternalStringSize);
|
||||
}
|
||||
}
|
||||
|
||||
M3dmodGetResult(Result3dmodId, ResultIndex, ResultType, &ResultArrayPtr[0]);
|
||||
return 0.0;
|
||||
}
|
||||
#endif /* M_MIL_UNICODE_API */
|
||||
#else
|
||||
//M3dmodGetResult is only defined in UNICODE
|
||||
#if M_MIL_UNICODE_API
|
||||
inline MIL_DOUBLE MFTYPE M3dmodGetResult(MIL_ID Result3dmodId,MIL_INT64 Index, MIL_INT64 ResultType, MIL_STRING &ResultArrayPtr)
|
||||
{
|
||||
|
||||
MIL_INT InternalStringSize = 0;
|
||||
|
||||
//Inquire the byte content
|
||||
M3dmodGetResult(Result3dmodId, Index, (ResultType & (~M_HLVLDATATYPE_MASK)) + M_STRING_SIZE + M_TYPE_MIL_INT, &InternalStringSize);
|
||||
|
||||
if(InternalStringSize > 0)
|
||||
{
|
||||
ResultArrayPtr.assign(InternalStringSize, MIL_TEXT('\0'));
|
||||
M3dmodGetResult(Result3dmodId, Index, ResultType, &ResultArrayPtr[0]);
|
||||
ResultArrayPtr.resize(InternalStringSize);
|
||||
}
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif /* M_MIL_USE_STRING*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// MIL_UNIQUE_ID support
|
||||
|
||||
#if M_MIL_USE_MIL_UNIQUE_ID
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
template <> inline bool MilIsCorrectObjectType<&M3dmodFree>(MIL_INT64 ObjectType)
|
||||
{
|
||||
return (ObjectType & ~M_USER_DEFINE_LOW_ATTRIBUTE) == M_3DMOD_OBJECT;
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef MIL_UNIQUE_ID<&M3dmodFree> MIL_UNIQUE_3DMOD_ID;
|
||||
|
||||
#if M_MIL_USE_MOVE_SEMANTICS
|
||||
|
||||
inline MIL_UNIQUE_3DMOD_ID M3dmodAlloc(MIL_ID SysId, MIL_INT64 ObjectType, MIL_INT64 InitFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_3DMOD_ID(M3dmodAlloc(SysId, ObjectType, InitFlag, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_3DMOD_ID M3dmodAllocResult(MIL_ID SysId, MIL_INT64 ResultType, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_3DMOD_ID(M3dmodAllocResult(SysId, ResultType, ControlFlag, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_3DMOD_ID M3dmodRestore(MIL_CONST_TEXT_PTR FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_3DMOD_ID(M3dmodRestore(FileName, SysId, ControlFlag, M_NULL));
|
||||
}
|
||||
#if M_MIL_USE_STRING
|
||||
inline MIL_UNIQUE_3DMOD_ID M3dmodRestore(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_3DMOD_ID(M3dmodRestore(FileName.c_str(), SysId, ControlFlag, M_NULL));
|
||||
}
|
||||
#endif // M_MIL_USE_STRING
|
||||
template <MilFreeFuncType FreeFunc> inline void M3dmodFree(const MIL_UNIQUE_ID<FreeFunc>&) = delete;
|
||||
|
||||
inline void M3dmodStream(MilStreamParam MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_UNIQUE_3DMOD_ID* Context3dmodIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
MxxxStreamForMilUniqueId(MemPtrOrFileName, SysId, Operation, StreamType, Version, ControlFlag, Context3dmodIdPtr, SizeByteVarPtr, M3dmodStream);
|
||||
}
|
||||
|
||||
#endif // M_MIL_USE_MOVE_SEMANTICS
|
||||
#endif // M_MIL_USE_MIL_UNIQUE_ID
|
||||
|
||||
// End of MIL_UNIQUE_ID support
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif // !M_MIL_LITE
|
||||
#endif // __MIL_3DMOD_H__
|
||||
808
Include/ClassicMIL/MILDyn/mil3dreg.h
Normal file
808
Include/ClassicMIL/MILDyn/mil3dreg.h
Normal file
@ -0,0 +1,808 @@
|
||||
//==============================================================================
|
||||
//!
|
||||
//! \brief Mil3dreg CAPI header (M3dreg...)
|
||||
//!
|
||||
//! AUTHOR: Matrox Imaging
|
||||
//!
|
||||
//! COPYRIGHT NOTICE:
|
||||
//! Copyright (c) Matrox Electronic Systems Ltd., 1992-2023.
|
||||
//! All Rights Reserved
|
||||
// Revision: 10.60.0776
|
||||
//==============================================================================
|
||||
|
||||
#ifndef __MIL_3DREG_H__
|
||||
#define __MIL_3DREG_H__
|
||||
|
||||
#if (!M_MIL_LITE) /* MIL FULL ONLY */
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
// M3dregAlloc ContextTypes
|
||||
#define M_PAIRWISE_REGISTRATION_CONTEXT 3507
|
||||
#define M_DRAW_3D_CONTEXT 3815 // already defined in milcal.h
|
||||
//==============================================================================
|
||||
// Indexing, used in other M3dreg functions (M3dregInquire(), M3dregControl(), ...)
|
||||
#define M_DEFAULT 0x10000000L // already defined in mil.h
|
||||
#define M_CONTEXT 0x08000000L // already defined in mil.h
|
||||
#define M_GENERAL 0x20000000L // already defined in milmod.h, ..
|
||||
#define M_ALL 0x40000000L // already defined in mil.h
|
||||
#define M_REGISTRATION_INDEX_FLAG 0x00200000L
|
||||
|
||||
#define M_REGISTRATION_INDEX_VALUE 3534
|
||||
|
||||
#define M_MODIFICATION_COUNT 5010L // already defined in mil.h
|
||||
|
||||
//==============================================================================
|
||||
|
||||
//==============================================================================
|
||||
// M3dregControl / M3dregInquire
|
||||
// Context
|
||||
#define M_ENABLE -9997L // also in mil.h
|
||||
#define M_DISABLE -9999L // also in mil.h
|
||||
#define M_TRUE 1L // Already defined in mil.h, milmeas.h, miledge.h
|
||||
#define M_FALSE 0L // Already defined in mil.h, milmeas.h, miledge.h
|
||||
#define M_AUTO 444L // also in mil.h
|
||||
#define M_USER_DEFINED 21L // also in mil.h
|
||||
#define M_TIMEOUT 2077L
|
||||
#define M_MIN 0x02000000L // Already defined in milmeas.h, mil.h, miledge.h
|
||||
#define M_MAX 0x04000000L // also in mil.h
|
||||
#define M_AVERAGE 0x00000020L // also in milim.h
|
||||
#define M_CENTER 0x00000080L // already defined in milim.h
|
||||
#define M_SAVE_PAIRS_INFO 5549L
|
||||
|
||||
#define M_ALLOCATION_FAILURE_REAL_TEST_FLAG 971L // also in milblob.h, milstr.h
|
||||
|
||||
// Context
|
||||
#define M_COMPUTATION_DIRECTION 3587
|
||||
#define M_TO_REFERENCE 3588
|
||||
#define M_FROM_REFERENCE 3589
|
||||
#define M_STOP_CALCULATE 116L // also in milblob.h
|
||||
#define M_CENTROID 1956L // already defined in mil3dim
|
||||
#define M_POINT_TO_POINT 1957L
|
||||
#define M_POINT_TO_PLANE 1958L
|
||||
//==============================================================================
|
||||
// M3dregInquire
|
||||
// Context
|
||||
#define M_NUMBER_OF_REGISTRATION_ELEMENTS 2L //already defined in milreg.h
|
||||
#define M_PREREGISTRATION_MODE 3564
|
||||
#define M_RMS_ERROR_THRESHOLD 3565
|
||||
#define M_RMS_ERROR_RELATIVE_THRESHOLD 3566
|
||||
#define M_ITERATION_INDEX 3568
|
||||
#define M_ERROR_MINIMIZATION_METRIC 1946L
|
||||
#define M_OVERLAP 1966L
|
||||
#define M_ANTICIPATE_OCCLUSIONS 5606L
|
||||
#define M_UNORGANIZED 1919L // already defined in mil3dmap.h
|
||||
#define M_PAIRS_REJECTION_FACTOR 5552L
|
||||
#define M_PAIRS_REJECTION_MODE 5553L
|
||||
#define M_PAIRS_CREATION_MAX_POINT_DISTANCE 5649L
|
||||
#define M_MAX_ITERATIONS 1504L // Already defined in milmeas.h
|
||||
#define M_ALL_ITERATIONS 0x01000000L
|
||||
#define M_INVALID -1 // also in mil.h
|
||||
#define M_SUBSAMPLE 5091L
|
||||
#define M_SUBSAMPLE_CONTEXT_ID 3641
|
||||
#define M_SUBSAMPLE_REFERENCE 5567L
|
||||
#define M_SUBSAMPLE_REFERENCE_CONTEXT_ID 5568L
|
||||
#define M_SUBSAMPLE_TARGET 5569L
|
||||
#define M_SUBSAMPLE_TARGET_CONTEXT_ID 5570L
|
||||
#define M_SET_LOCATION_REFERENCE 1010L
|
||||
#define M_PAIRS_LIMIT_PER_TARGET_POINT_MODE 5555L
|
||||
#define M_PAIRS_CREATION_FROM_TARGET 5556L
|
||||
#define M_PAIRS_CREATION_PER_REFERENCE_POINT_MODE 5564L
|
||||
#define M_ROBUST_STANDARD_DEVIATION 5565L
|
||||
#define M_PAIRS_RANK 5574L
|
||||
#define M_SINGLE 0x01000000L // Also defined in Mil.h
|
||||
#define M_MULTIPLE 0x00400000L // Also defined in milpat.h
|
||||
#define M_GEOMETRIC_STABLE_PARTITIONING 5706L
|
||||
#define M_CACHE_REFERENCE 5750L
|
||||
|
||||
//Result
|
||||
#define M_MERGE_LOCATION 4771
|
||||
|
||||
//==============================================================================
|
||||
// M3dregAllocResult ResultTypes
|
||||
#define M_PAIRWISE_REGISTRATION_RESULT 3500
|
||||
#define M_REGISTRATION_COMPLETED 3501
|
||||
#define M_RMS_ERROR 3502
|
||||
#define M_RMS_ERROR_RELATIVE 3503
|
||||
#define M_REGISTRATION_MATRIX 3504
|
||||
#define M_PREREGISTRATION_MATRIX 3560
|
||||
#define M_RMS_ERROR_THRESHOLD_REACHED 3569
|
||||
#define M_RMS_ERROR_RELATIVE_THRESHOLD_REACHED 3570
|
||||
#define M_MAX_ITERATIONS_REACHED 1965L
|
||||
#define M_NOT_ENOUGH_POINT_PAIRS 1972L
|
||||
#define M_NO_VALID_POINTS 2097L
|
||||
#define M_LAST_ITERATION -1
|
||||
#define M_REGISTRATION_GLOBAL 0x02000000L
|
||||
#define M_STATUS_REGISTRATION_ELEMENT 3925
|
||||
#define M_INTERMEDIATE_ITERATION 0x00050000L
|
||||
#define M_NB_ITERATIONS 1893L // Already defined in milim.h
|
||||
//==============================================================================
|
||||
// M3dregGetResult ResultTypes
|
||||
// General
|
||||
#define M_STATUS 0x00008002L // already defined
|
||||
#define M_EMPTY 236L // also in milmod.h, mildmr.h
|
||||
#define M_CURRENTLY_CALCULATING 2718L //already defined in milreg
|
||||
#define M_TIMEOUT_REACHED 2554L // also in milmod.h, mildmr.h
|
||||
#define M_STOPPED_BY_REQUEST 2555L // also in milmod.h, mildmr.h
|
||||
#define M_NOT_ENOUGH_MEMORY 4L // also in mil.h, mildmr.h
|
||||
#define M_COMPLETE 0x00000000L // also in mil.h, milmod.h, mildmr.h
|
||||
#define M_INTERNAL_ERROR 5L // also in milcal.h, mildmr.h
|
||||
#define M_MAX_PAIRS_RANK 5575L
|
||||
#define M_RESULT_IMAGE_SIZE_X 5226L // already defined in mil3dmet.h
|
||||
#define M_RESULT_IMAGE_SIZE_Y 5227L // already defined in mil3dmet.h
|
||||
|
||||
//==============================================================================
|
||||
// M3dregSetLocation
|
||||
#define M_PREVIOUS 0x40000003L
|
||||
#define M_NEXT 0x40000004L
|
||||
#define M_UNCHANGED 0x40000005L
|
||||
//==============================================================================
|
||||
// M3dregMerge
|
||||
#define M_APPLY_TO_ALL_COMPONENTS 0x0001000L // already defined in mil3dim.h
|
||||
|
||||
//==============================================================================
|
||||
// M3dregCopyResult
|
||||
#define M_DISTANCE_IMAGE 5576L
|
||||
#define M_PAIR_INDEX_IMAGE 5577L
|
||||
#define M_OVERLAP_MASK 5578L
|
||||
#define M_SUBSAMPLED_CONTAINER_REFERENCE 5579L
|
||||
#define M_SUBSAMPLED_CONTAINER_TARGET 5581L
|
||||
|
||||
// Draw context
|
||||
#define M_ROOT_NODE 0 // already defined in mil3dgra.h
|
||||
#define M_GLOBAL_DRAW_SETTINGS M_CONTEXT
|
||||
#define M_DRAW_OVERLAP_POINTS 0x00000400L
|
||||
#define M_DRAW_EXCLUDED_POINTS 0x00003000L // already defined in mil3dblob
|
||||
#define M_DRAW_PAIRS 0x00000020L
|
||||
#define M_PSEUDO_COLOR 0x4000L // already defined in milclass.h
|
||||
#define M_PSEUDO_COLOR_OFFSET 5439L
|
||||
#define M_GRAPHIC_LIST_DEFAULT 0x04005526L // already defined in mil3dblob.h
|
||||
#define M_ACTIVE 1534L // already defined in milmetrol.h
|
||||
#define M_THICKNESS 3L // already defined in mil3dgra.h
|
||||
#define M_OPACITY 4728 // already defined in mil3dgra.h
|
||||
#define M_APPEARANCE 4679 // already defined in mil3dgra.h
|
||||
#define M_COLOR 0x00000100L // already defined in mil3dgra.h
|
||||
|
||||
//==============================================================================
|
||||
// Other defines
|
||||
|
||||
//==============================================================================
|
||||
// CAPI function prototypes
|
||||
MIL_ID MFTYPE M3dregAlloc(MIL_ID SysId,
|
||||
MIL_INT64 ContextType,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Context3dregIdPtr);
|
||||
|
||||
MIL_ID MFTYPE M3dregAllocResult(MIL_ID SysId,
|
||||
MIL_INT64 ResultType,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* Result3dregIdPtr);
|
||||
|
||||
void MFTYPE M3dregFree(MIL_ID ContextOrResult3dregId);
|
||||
|
||||
void MFTYPE M3dregCopyResult(MIL_ID SrcResult3dregId,
|
||||
MIL_INT SrcIndex ,
|
||||
MIL_INT SrcReference ,
|
||||
MIL_ID DstMilObjectId ,
|
||||
MIL_INT64 CopyType ,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dregCalculate(MIL_ID Context3dregId,
|
||||
const MIL_ID* ContainerBufIdArrayPtr,
|
||||
MIL_INT NumContainers,
|
||||
MIL_ID Result3dregId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dregCopy(MIL_ID SrcContext3dregId,
|
||||
MIL_INT SrcIndex,
|
||||
MIL_ID DstMatrix3dgeoId,
|
||||
MIL_INT DstIndex,
|
||||
MIL_INT64 CopyType,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dregSetLocation(MIL_ID Context3dregId,
|
||||
MIL_INT Index,
|
||||
MIL_INT Reference,
|
||||
MIL_ID ParamId,
|
||||
MIL_INT ParamIndex,
|
||||
MIL_INT ParamReference,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE M3dregMerge(MIL_ID Result3dregId,
|
||||
const MIL_ID* ContainerBufIdArrayPtr,
|
||||
MIL_INT NumContainers,
|
||||
MIL_ID DstContainerBufId,
|
||||
MIL_ID SubsampleContext3dimId,
|
||||
MIL_INT64 ControlFlag);
|
||||
//#if M_MIL_USE_64BIT
|
||||
void MFTYPE M3dregControlInt64(MIL_ID ContextOrResult3dregId,
|
||||
MIL_INT64 Index,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_INT64 ControlValue);
|
||||
void MFTYPE M3dregControlDouble(MIL_ID ContextOrResult3dregId,
|
||||
MIL_INT64 Index,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_DOUBLE ControlValue);
|
||||
|
||||
|
||||
MIL_INT64 MFTYPE M3dregInquire(MIL_ID ContextOrResult3dregId,
|
||||
MIL_INT64 Index,
|
||||
MIL_INT64 InquireType,
|
||||
void* UserVarPtr);
|
||||
|
||||
void MFTYPE M3dregControlDrawInt64(MIL_ID DrawContext3dregId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_INT64 ControlValue);
|
||||
|
||||
void MFTYPE M3dregControlDrawDouble(MIL_ID DrawContext3dregId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_DOUBLE ControlValue);
|
||||
|
||||
MIL_INT64 MFTYPE M3dregInquireDraw(MIL_ID DrawContext3dregId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 InquireType,
|
||||
void* UserVarPtr);
|
||||
|
||||
MIL_DOUBLE MFTYPE M3dregGetResult(MIL_ID Result3dregId,
|
||||
MIL_INT64 ResultIndex,
|
||||
MIL_INT64 ResultType,
|
||||
void* ResultArrayPtr);
|
||||
|
||||
MIL_INT64 MFTYPE M3dregDraw3d(MIL_ID OperationDraw3dContext3dregId,
|
||||
MIL_ID SrcResult3dregId,
|
||||
MIL_INT Index,
|
||||
MIL_INT IterationIndex,
|
||||
MIL_INT PairsRank,
|
||||
MIL_ID DstList3dgraId,
|
||||
MIL_INT64 DstParentLabel,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
#if M_MIL_USE_UNICODE
|
||||
void MFTYPE M3dregSaveA(MIL_CONST_TEXTA_PTR FileName,
|
||||
MIL_ID ContextOrResult3dregId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_ID MFTYPE M3dregRestoreA(MIL_CONST_TEXTA_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextOrResult3dregIdPtr);
|
||||
|
||||
void MFTYPE M3dregStreamA(MIL_TEXTA_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextOrResult3dregIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
|
||||
|
||||
|
||||
void MFTYPE M3dregSaveW(MIL_CONST_TEXTW_PTR FileName,
|
||||
MIL_ID ContextOrResult3dregId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_ID MFTYPE M3dregRestoreW(MIL_CONST_TEXTW_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextOrResult3dregIdPtr);
|
||||
|
||||
void MFTYPE M3dregStreamW(MIL_TEXTW_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextOrResult3dregIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
|
||||
|
||||
|
||||
#if M_MIL_UNICODE_API
|
||||
#define M3dregSave M3dregSaveW
|
||||
#define M3dregRestore M3dregRestoreW
|
||||
#define M3dregStream M3dregStreamW
|
||||
#else
|
||||
#define M3dregSave M3dregSaveA
|
||||
#define M3dregRestore M3dregRestoreA
|
||||
#define M3dregStream M3dregStreamA
|
||||
#endif //M_MIL_UNICODE_API
|
||||
|
||||
#else
|
||||
|
||||
void MFTYPE M3dregSave(MIL_CONST_TEXT_PTR FileName,
|
||||
MIL_ID ContextOrResult3dregId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_ID MFTYPE M3dregRestore(MIL_CONST_TEXT_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextOrResult3dregIdPtr);
|
||||
|
||||
void MFTYPE M3dregStream(MIL_TEXT_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextOrResult3dregIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
|
||||
#endif //M_MIL_USE_UNICODE
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#ifdef __cplusplus
|
||||
//C++ overloads
|
||||
|
||||
inline void MFTYPE M3dregStreamCpp(MilStreamParam MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextOrResult3dregIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
M3dregStream(MemPtrOrFileName.m_Param, SysId, Operation, StreamType, Version, ControlFlag, ContextOrResult3dregIdPtr, SizeByteVarPtr);
|
||||
}
|
||||
|
||||
#undef M3dregStream
|
||||
#define M3dregStream M3dregStreamCpp
|
||||
#else
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
|
||||
//==============================================================================
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
//=========================================================
|
||||
// See milos.h for explanation about these functions.
|
||||
//=========================================================
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// M3dregInquire
|
||||
|
||||
inline MIL_INT64 MFTYPE M3dregInquireSafeType(MIL_ID ContextOrResult3dregId, MIL_INT64 Index, MIL_INT64 InquireType, MilVoidPtr UserVarPtr)
|
||||
{
|
||||
MIL_INT64 RequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
if(!(M_DEFAULT_DATA_TYPE_BIT_SET(InquireType) || M_RECOMMENDED_DATA_TYPE_BIT_SET(InquireType)))
|
||||
{
|
||||
M3dregInquire(ContextOrResult3dregId, Index, InquireType | M_DEFAULT_DATA_TYPE, &RequiredParamType);
|
||||
}
|
||||
if(!MfuncPointerIsCompatible(RequiredParamType, UserVarPtr.Type, InquireType))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dregInquire"));
|
||||
}
|
||||
return M3dregInquire(ContextOrResult3dregId, Index, InquireType, UserVarPtr.Ptr);
|
||||
}
|
||||
|
||||
inline MIL_INT64 MFTYPE M3dregInquireUnsafe(MIL_ID ContextOrResult3dregId, MIL_INT64 Index, MIL_INT64 InquireType, void* UserVarPtr)
|
||||
{
|
||||
return M3dregInquire(ContextOrResult3dregId,Index, InquireType, UserVarPtr);
|
||||
}
|
||||
|
||||
inline MIL_INT64 MFTYPE M3dregInquireDrawSafeType(MIL_ID DrawContext3dregId, MIL_INT64 Operation, MIL_INT64 InquireType, MilVoidPtr UserVarPtr)
|
||||
{
|
||||
MIL_INT64 RequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
if(!(M_DEFAULT_DATA_TYPE_BIT_SET(InquireType) || M_RECOMMENDED_DATA_TYPE_BIT_SET(InquireType)))
|
||||
{
|
||||
M3dregInquireDraw(DrawContext3dregId, Operation, InquireType | M_DEFAULT_DATA_TYPE, &RequiredParamType);
|
||||
}
|
||||
if(!MfuncPointerIsCompatible(RequiredParamType, UserVarPtr.Type, InquireType))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dblobInquireDraw"));
|
||||
}
|
||||
return M3dregInquireDraw(DrawContext3dregId, Operation, InquireType, UserVarPtr.Ptr);
|
||||
}
|
||||
|
||||
inline MIL_INT64 MFTYPE M3dregInquireDrawUnsafe(MIL_ID DrawContext3dblobId, MIL_INT64 Operation, MIL_INT64 InquireType, void* UserVarPtr)
|
||||
{
|
||||
return M3dregInquireDraw(DrawContext3dblobId, Operation, InquireType, UserVarPtr);
|
||||
}
|
||||
|
||||
#define M3dregInquire M3dregInquireSafeType
|
||||
#define M3dregInquireDraw M3dregInquireDrawSafeType
|
||||
|
||||
#else // #if M_MIL_USE_SAFE_TYPE
|
||||
#define M3dregInquireUnsafe M3dregInquire
|
||||
#define M3dregInquireDrawUnsafe M3dregInquireDraw
|
||||
#endif // #if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
// -------------------------------------------------------------------------
|
||||
// M3dregGetResult safe type definitions
|
||||
//
|
||||
inline MIL_DOUBLE MFTYPE M3dregGetResultSafeType(MIL_ID Result3dregId, MIL_INT64 ResultIndex, MIL_INT64 ResultType, MilVoidPtr ResultArrayPtr)
|
||||
{
|
||||
MIL_INT64 RequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
if(!(M_DEFAULT_DATA_TYPE_BIT_SET(ResultType) || M_RECOMMENDED_DATA_TYPE_BIT_SET(ResultType)))
|
||||
{
|
||||
M3dregGetResult(Result3dregId, ResultIndex, ResultType | M_DEFAULT_DATA_TYPE, &RequiredParamType);
|
||||
}
|
||||
if(!MfuncPointerIsCompatible(RequiredParamType, ResultArrayPtr.Type, ResultType))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dregGetResult"));
|
||||
}
|
||||
return M3dregGetResult(Result3dregId, ResultIndex, ResultType, ResultArrayPtr.Ptr);
|
||||
}
|
||||
|
||||
inline MIL_DOUBLE MFTYPE M3dregGetResultUnsafe(MIL_ID Result3dregId, MIL_INT64 ResultIndex, MIL_INT64 ResultType, void* ResultArrayPtr)
|
||||
{
|
||||
return M3dregGetResult(Result3dregId, ResultIndex, ResultType, ResultArrayPtr);
|
||||
}
|
||||
|
||||
#define M3dregGetResult M3dregGetResultSafeType
|
||||
|
||||
#else // #if M_MIL_USE_SAFE_TYPE
|
||||
#define M3dregGetResultUnsafe M3dregGetResult
|
||||
#endif // #if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
//#if M_MIL_USE_64BIT
|
||||
#ifdef __cplusplus
|
||||
|
||||
//=========================================================
|
||||
// M3dregControl function overloads when compiling c++ files
|
||||
//=========================================================
|
||||
template <typename T>
|
||||
inline void M3dregControl(MIL_ID ContextOrResult3dregId, MIL_INT64 Index, MIL_INT64 ControlType, T ControlValue)
|
||||
{
|
||||
M3dregControlInt64(ContextOrResult3dregId, Index, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void M3dregControl(MIL_ID ContextOrResult3dregId, MIL_INT64 Index, MIL_INT64 ControlType, float ControlValue)
|
||||
{ M3dregControlDouble(ContextOrResult3dregId, Index, ControlType, ControlValue); }
|
||||
|
||||
inline void M3dregControl(MIL_ID ContextOrResult3dregId, MIL_INT64 Index, MIL_INT64 ControlType, MIL_DOUBLE ControlValue)
|
||||
{ M3dregControlDouble(ContextOrResult3dregId, Index, ControlType, ControlValue); }
|
||||
|
||||
template <typename T>
|
||||
inline void M3dregControlDraw(MIL_ID DrawContext3dregId, MIL_INT64 Operation, MIL_INT64 ControlType, T ControlValue)
|
||||
{
|
||||
M3dregControlDrawInt64(DrawContext3dregId, Operation, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void M3dregControlDraw(MIL_ID DrawContext3dregId, MIL_INT64 Operation, MIL_INT64 ControlType, float ControlValue)
|
||||
{
|
||||
M3dregControlDrawDouble(DrawContext3dregId, Operation, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void M3dregControlDraw(MIL_ID DrawContext3dregId, MIL_INT64 Operation, MIL_INT64 ControlType, MIL_DOUBLE ControlValue)
|
||||
{
|
||||
M3dregControlDrawDouble(DrawContext3dregId, Operation, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
#else // __cplusplus
|
||||
//=========================================================
|
||||
// For C file, call the default function, i.e. Double one
|
||||
//=========================================================
|
||||
#define M3dregControl M3dregControlDouble
|
||||
#define M3dregControlDraw M3dregControlDrawDouble
|
||||
#endif // __cplusplus
|
||||
//#endif // M_MIL_USE_64BIT
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// Overload for std::vector.
|
||||
#if defined(M_MIL_USE_VECTOR) && M_MIL_USE_VECTOR
|
||||
template <typename UserType>
|
||||
inline MIL_INT64 MFTYPE M3dregInquire(MIL_ID ContextOrResult3dregId, MIL_INT Index, MIL_INT64 InquireType, std::vector<UserType> &UserVarPtr)
|
||||
{
|
||||
// If the given MIL data type is not the same as the SrcType, change it to the correct one
|
||||
// and give a warning.
|
||||
MIL_INT64 InternalTrueDataTypeForStdVector = MilTraits<UserType>::TypeFlag;
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(M_GET_HLVLDATATYPE(InquireType) != 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dregInquire"), MIL_TEXT("Combination value for the required data type is not supported with std::vector overload."));
|
||||
}
|
||||
#endif
|
||||
|
||||
InquireType = M_STRIP_HLVLDATATYPE(InquireType) + InternalTrueDataTypeForStdVector;
|
||||
|
||||
MIL_INT InternalNumberOfElementsForStdVector = 0;
|
||||
M3dregInquire(ContextOrResult3dregId, Index, M_STRIP_HLVLDATATYPE(InquireType) + M_NB_ELEMENTS + M_TYPE_MIL_INT, &InternalNumberOfElementsForStdVector);
|
||||
|
||||
UserVarPtr.resize(InternalNumberOfElementsForStdVector);
|
||||
|
||||
if(InternalNumberOfElementsForStdVector > 0)
|
||||
{
|
||||
return M3dregInquire(ContextOrResult3dregId, Index, InquireType, &UserVarPtr[0]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
template <typename UserType>
|
||||
inline MIL_DOUBLE MFTYPE M3dregGetResult(MIL_ID Result3dregId, MIL_INT Index, MIL_INT64 ResultType, std::vector<UserType> &ResultArrayPtr)
|
||||
{
|
||||
//! If the given MIL data type is not the same as the SrcType, change it to the correct one
|
||||
//! and give a warning.
|
||||
MIL_INT64 InternalTrueDataTypeForStdVector = MilTraits<UserType>::TypeFlag;
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(M_GET_HLVLDATATYPE(ResultType) != 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dregGetResult"), MIL_TEXT("Combination value for the required data type is not supported with std::vector overload."));
|
||||
}
|
||||
#endif
|
||||
|
||||
ResultType = M_STRIP_HLVLDATATYPE(ResultType) + InternalTrueDataTypeForStdVector;
|
||||
|
||||
MIL_INT InternalNumberOfElementsForStdVector = 0;
|
||||
M3dregGetResult(Result3dregId, Index, M_STRIP_HLVLDATATYPE(ResultType) + M_NB_ELEMENTS + M_TYPE_MIL_INT, &InternalNumberOfElementsForStdVector);
|
||||
|
||||
ResultArrayPtr.resize(InternalNumberOfElementsForStdVector);
|
||||
|
||||
if(InternalNumberOfElementsForStdVector > 0)
|
||||
{
|
||||
M3dregGetResult(Result3dregId, Index, ResultType, &ResultArrayPtr[0]);
|
||||
}
|
||||
return 0.0;
|
||||
}
|
||||
// ----------------------------------------------------------
|
||||
// Overloads for std::vector in M3dregCalculate
|
||||
inline void MFTYPE M3dregCalculate(MIL_ID Context3dregId,
|
||||
const std::vector<MIL_ID>& ContainerBufIdArrayPtr,
|
||||
MIL_INT NumContainers,
|
||||
MIL_ID ResultId,
|
||||
MIL_INT64 ControlFlag)
|
||||
{
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(ContainerBufIdArrayPtr.empty())
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dregCalculate"), MIL_TEXT("The input vectors cannot be empty."));
|
||||
}
|
||||
if(NumContainers <= 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dregCalculate"), MIL_TEXT("NumContainers parameter must be greater than zero."));
|
||||
}
|
||||
if(NumContainers > (MIL_INT)ContainerBufIdArrayPtr.size() && NumContainers != M_DEFAULT)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dregCalculate"), MIL_TEXT("NumContainers parameter must be smaller or equal (M_DEFAULT) to the size of input vector."));
|
||||
}
|
||||
#endif
|
||||
|
||||
if(NumContainers == M_DEFAULT || NumContainers > (MIL_INT)ContainerBufIdArrayPtr.size())
|
||||
{
|
||||
NumContainers = (MIL_INT)ContainerBufIdArrayPtr.size();
|
||||
}
|
||||
|
||||
M3dregCalculate(Context3dregId,
|
||||
&ContainerBufIdArrayPtr[0],
|
||||
NumContainers,
|
||||
ResultId,
|
||||
ControlFlag);
|
||||
}
|
||||
// ----------------------------------------------------------
|
||||
// Overloads for std::vector in M3dregMerge
|
||||
inline void MFTYPE M3dregMerge(MIL_ID Result3dregId,
|
||||
const std::vector<MIL_ID>& ContainerBufIdArrayPtr,
|
||||
MIL_INT NumContainers,
|
||||
MIL_ID DstContainerBufId,
|
||||
MIL_ID SubsampleContext3dimId,
|
||||
MIL_INT64 ControlFlag)
|
||||
{
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(ContainerBufIdArrayPtr.empty())
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dregMerge"), MIL_TEXT("The input vectors cannot be empty."));
|
||||
}
|
||||
if(NumContainers <= 1)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dregMerge"), MIL_TEXT("NumContainers parameter must be greater than one."));
|
||||
}
|
||||
if(NumContainers > (MIL_INT)ContainerBufIdArrayPtr.size() && NumContainers != M_DEFAULT)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dregMerge"), MIL_TEXT("NumContainers parameter must be smaller or equal (M_DEFAULT) to the size of input vector."));
|
||||
}
|
||||
#endif
|
||||
|
||||
if(NumContainers == M_DEFAULT || NumContainers > (MIL_INT)ContainerBufIdArrayPtr.size())
|
||||
{
|
||||
NumContainers = (MIL_INT)ContainerBufIdArrayPtr.size();
|
||||
}
|
||||
|
||||
M3dregMerge(Result3dregId,
|
||||
&ContainerBufIdArrayPtr[0],
|
||||
NumContainers,
|
||||
DstContainerBufId,
|
||||
SubsampleContext3dimId,
|
||||
ControlFlag);
|
||||
}
|
||||
// Overloads for std::vector in M3dregStream.
|
||||
inline void MFTYPE M3dregStream(std::vector<MIL_UINT8> &MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextOrResult3dregIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
MxxxStreamForStdVector(MemPtrOrFileName,
|
||||
SysId,
|
||||
Operation,
|
||||
StreamType,
|
||||
Version,
|
||||
ControlFlag,
|
||||
ContextOrResult3dregIdPtr,
|
||||
SizeByteVarPtr,
|
||||
M3dregStream);
|
||||
}
|
||||
|
||||
#endif // defined(M_MIL_USE_VECTOR) && M_MIL_USE_VECTOR
|
||||
#if M_MIL_USE_STRING
|
||||
/***************************************************************************/
|
||||
/* 3dreg MODULE */
|
||||
/***************************************************************************/
|
||||
#if M_MIL_USE_UNICODE
|
||||
#if M_MIL_UNICODE_API
|
||||
|
||||
inline void MFTYPE M3dregSaveW(const MIL_STRING& FileName, MIL_ID ContextOrResult3dregId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dregSaveW(FileName.c_str(), ContextOrResult3dregId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE M3dregRestoreW(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* ContextOrResult3dregIdPtr)
|
||||
{
|
||||
return M3dregRestoreW(FileName.c_str(), SysId, ControlFlag, ContextOrResult3dregIdPtr);
|
||||
}
|
||||
|
||||
#else // M_MIL_UNICODE_API
|
||||
inline void MFTYPE M3dregSaveA(const MIL_STRING& FileName, MIL_ID ContextOrResult3dregId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dregSaveA(FileName.c_str(), ContextOrResult3dregId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE M3dregRestoreA(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* ContextOrResult3dregIdPtr)
|
||||
{
|
||||
return M3dregRestoreA(FileName.c_str(), SysId, ControlFlag, ContextOrResult3dregIdPtr);
|
||||
}
|
||||
|
||||
#endif /* M_MIL_UNICODE_API*/
|
||||
|
||||
#else // M_MIL_USE_UNICODE
|
||||
inline void MFTYPE M3dregSave(const MIL_STRING& FileName, MIL_ID ContextOrResult3dregId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return M3dregSave(FileName.c_str(), ContextOrResult3dregId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE M3dregRestore(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* ContextOrResult3dregIdPtr)
|
||||
{
|
||||
return M3dregRestore(FileName.c_str(), SysId, ControlFlag, ContextOrResult3dregIdPtr);
|
||||
}
|
||||
|
||||
#endif /* M_MIL_USE_UNICODE */
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
#if M_MIL_UNICODE_API
|
||||
|
||||
inline MIL_DOUBLE MFTYPE M3dregGetResultSafeType(MIL_ID Result3dregId, MIL_INT64 ResultIndex, MIL_INT64 ResultType, MIL_STRING& ResultArrayPtr)
|
||||
{
|
||||
#if MIL_COMPILE_VERSION >= MIL_COMPILE_TRUNK_VERSION && M_MIL_USE_SAFE_TYPE
|
||||
if((ResultType & M_CLIENT_ENCODING) != M_CLIENT_ENCODING)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("M3dregGetResult: Result Type not supported with MIL_STRING."));
|
||||
}
|
||||
#endif
|
||||
|
||||
MIL_INT InternalStringSize = 0;
|
||||
|
||||
M3dregGetResult(Result3dregId, ResultIndex, (ResultType & (~M_HLVLDATATYPE_MASK)) + M_STRING_SIZE + M_TYPE_MIL_INT, &InternalStringSize);
|
||||
|
||||
if(InternalStringSize > 0)
|
||||
{
|
||||
if(ResultArrayPtr.size() < (MIL_UINT)InternalStringSize)
|
||||
{
|
||||
ResultArrayPtr.resize((MIL_UINT)InternalStringSize);
|
||||
}
|
||||
}
|
||||
|
||||
M3dregGetResult(Result3dregId, ResultIndex, ResultType, &ResultArrayPtr[0]);
|
||||
return 0.0;
|
||||
}
|
||||
#endif /* M_MIL_UNICODE_API */
|
||||
#else
|
||||
//M3dregGetResult is only defined in UNICODE
|
||||
#if M_MIL_UNICODE_API
|
||||
inline MIL_DOUBLE MFTYPE M3dregGetResult(MIL_ID Result3dregId,MIL_INT64 Index, MIL_INT64 ResultType, MIL_STRING &ResultArrayPtr)
|
||||
{
|
||||
|
||||
MIL_INT InternalStringSize = 0;
|
||||
|
||||
//Inquire the byte content
|
||||
M3dregGetResult(Result3dregId, Index, (ResultType & (~M_HLVLDATATYPE_MASK)) + M_STRING_SIZE + M_TYPE_MIL_INT, &InternalStringSize);
|
||||
|
||||
if(InternalStringSize > 0)
|
||||
{
|
||||
ResultArrayPtr.assign(InternalStringSize, MIL_TEXT('\0'));
|
||||
M3dregGetResult(Result3dregId, Index, ResultType, &ResultArrayPtr[0]);
|
||||
ResultArrayPtr.resize(InternalStringSize);
|
||||
}
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif /* M_MIL_USE_STRING*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// MIL_UNIQUE_ID support
|
||||
|
||||
#if M_MIL_USE_MIL_UNIQUE_ID
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
template <> inline bool MilIsCorrectObjectType<&M3dregFree>(MIL_INT64 ObjectType)
|
||||
{
|
||||
return (ObjectType & ~M_USER_DEFINE_LOW_ATTRIBUTE) == M_3DREG_OBJECT;
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef MIL_UNIQUE_ID<&M3dregFree> MIL_UNIQUE_3DREG_ID;
|
||||
|
||||
#if M_MIL_USE_MOVE_SEMANTICS
|
||||
|
||||
inline MIL_UNIQUE_3DREG_ID M3dregAlloc(MIL_ID SysId, MIL_INT64 ObjectType, MIL_INT64 InitFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_3DREG_ID(M3dregAlloc(SysId, ObjectType, InitFlag, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_3DREG_ID M3dregAllocResult(MIL_ID SysId, MIL_INT64 ResultType, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_3DREG_ID(M3dregAllocResult(SysId, ResultType, ControlFlag, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_3DREG_ID M3dregRestore(MIL_CONST_TEXT_PTR FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_3DREG_ID(M3dregRestore(FileName, SysId, ControlFlag, M_NULL));
|
||||
}
|
||||
#if M_MIL_USE_STRING
|
||||
inline MIL_UNIQUE_3DREG_ID M3dregRestore(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_3DREG_ID(M3dregRestore(FileName.c_str(), SysId, ControlFlag, M_NULL));
|
||||
}
|
||||
#endif // M_MIL_USE_STRING
|
||||
template <MilFreeFuncType FreeFunc> inline void M3dregFree(const MIL_UNIQUE_ID<FreeFunc>&) = delete;
|
||||
|
||||
inline void M3dregStream(MilStreamParam MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_UNIQUE_3DREG_ID* Context3dregIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
MxxxStreamForMilUniqueId(MemPtrOrFileName, SysId, Operation, StreamType, Version, ControlFlag, Context3dregIdPtr, SizeByteVarPtr, M3dregStream);
|
||||
}
|
||||
inline void M3dregCalculate(MIL_ID ContextId, MilConstArrayIdParam ContArrayPtr, MIL_INT NumContainers, MIL_ID ResultorMatrixId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
M3dregCalculate(ContextId, ContArrayPtr.m_IdArrayPtr, NumContainers, ResultorMatrixId, ControlFlag);
|
||||
}
|
||||
inline void MFTYPE M3dregMerge(MIL_ID Result3dregId, MilConstArrayIdParam ContainerArrayPtr, MIL_INT NumContainers, MIL_ID DstContainerId, MIL_ID SubsampleContext3dimId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
M3dregMerge(Result3dregId, ContainerArrayPtr.m_IdArrayPtr, NumContainers, DstContainerId, SubsampleContext3dimId, ControlFlag);
|
||||
}
|
||||
|
||||
#endif // M_MIL_USE_MOVE_SEMANTICS
|
||||
#endif // M_MIL_USE_MIL_UNIQUE_ID
|
||||
|
||||
// End of MIL_UNIQUE_ID support
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif // !M_MIL_LITE
|
||||
#endif // __MIL_3DREG_H__
|
||||
677
Include/ClassicMIL/MILDyn/milagm.h
Normal file
677
Include/ClassicMIL/MILDyn/milagm.h
Normal file
@ -0,0 +1,677 @@
|
||||
//==============================================================================
|
||||
//!
|
||||
//! \brief Milagm CAPI header (Magm...)
|
||||
//!
|
||||
//! AUTHOR: Matrox Imaging
|
||||
//!
|
||||
//! COPYRIGHT NOTICE:
|
||||
//! Copyright (c) Matrox Electronic Systems Ltd., 1992-2023.
|
||||
//! All Rights Reserved
|
||||
// Revision: 10.60.0776
|
||||
//==============================================================================
|
||||
|
||||
#ifndef __MIL_AGM_H__
|
||||
#define __MIL_AGM_H__
|
||||
|
||||
#if (!M_MIL_LITE)
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
// MagmAlloc/MagmAllocResult Context/ResultTypes
|
||||
#define M_GLOBAL_EDGE_BASED_TRAIN 0x00001000L // TBM
|
||||
#define M_GLOBAL_EDGE_BASED_TRAIN_RESULT 0x00002000L // TBM
|
||||
#define M_GLOBAL_EDGE_BASED_FIND 0x00004000L // TBM
|
||||
#define M_GLOBAL_EDGE_BASED_FIND_RESULT 0x00008000L // TBM
|
||||
|
||||
//==============================================================================
|
||||
// MagmDefine Operations
|
||||
#define M_ADD 0x0000L // already defined in milim.h
|
||||
#define M_DELETE 3L // already defined in mil.h
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// MagmControl / MagmInquire
|
||||
// Context
|
||||
#define M_STOP_FIND 115L // already defined in milmod.h
|
||||
#define M_SMOOTHNESS 108L // already defined in milmod.h
|
||||
#define M_THRESHOLD_MODE 33L // Already defined in miledge.h
|
||||
#define M_MODEL_PRECISION 5656L
|
||||
|
||||
#define M_LOW 1L // Already defined in miledge.h, milcode.h, milmod.h, milocr, milpat.h, mil.h
|
||||
#define M_MEDIUM 2L // Already defined in miledge.h, milcode.h, milmod.h, milocr, milpat.h
|
||||
#define M_HIGH 3L // Already defined in miledge.h, milcode.h, milmod.h, milocr, milpat.h, mil.h
|
||||
#define M_VERY_HIGH 4L // Already defined in miledge.h, milcode.h, milmod.h, milocr, milpat.h
|
||||
|
||||
|
||||
#define M_AUTO 444L // Already defined in mil.h
|
||||
#define M_USER_DEFINED 21L // Already defined in mil.h
|
||||
#define M_ENABLE -9997L // Already defined in mil.h
|
||||
#define M_DISABLE -9999L // Already defined in mil.h
|
||||
|
||||
#define M_TRUE 1L // Already defined in mil.h, milmeas.h, miledge.h, milmod.h
|
||||
#define M_FALSE 0L // Already defined in mil.h, milmeas.h, miledge.h, milmod.h
|
||||
|
||||
#define M_ACCEPTANCE_DETECTION_SOURCE 5838L
|
||||
#define M_ACCEPTANCE_DETECTION_FROM_TRAIN 5839L
|
||||
#define M_ACCEPTANCE_DETECTION 5840L
|
||||
#define M_ACCEPTANCE_FIT 5841L
|
||||
#define M_ACCEPTANCE_COVERAGE 5842L
|
||||
#define M_MAX_ASSOCIATION_DISTANCE 1503L // Already defined in milmeas.h
|
||||
|
||||
#define M_EDGEL_ANGLE_MODE 5658L
|
||||
#define M_SINGLE 0x01000000L // Already defined in mil.h
|
||||
#define M_COMPOSITE 1L // Already defined in mil.h
|
||||
|
||||
#define M_MAX_ACCEPTED_OVERLAP 5661L
|
||||
|
||||
#define M_MODEL_IMAGE 1019L // Already defined in milim.h
|
||||
|
||||
#define M_EDGEL_ANGLE_FACTOR 5663L
|
||||
#define M_NUMBER_OF_MODELS 5664L
|
||||
#define M_ORIENTATION 0x00002400L // Already defined in milmeas.h
|
||||
#define M_EMPTY_REGIONS_MODE 5668L
|
||||
#define M_NO_NEIGHBOR 5669L
|
||||
#define M_USE_EDGELS_MAGNITUDE 5670L
|
||||
#define M_NEIGHBOR_TYPE 5671L
|
||||
#define M_STABLE_EDGELS_MODE 5856L
|
||||
#define M_SMOOTHNESS_STABLE 5857L
|
||||
#define M_TRAINED_MODEL 5672L
|
||||
|
||||
#define M_PERSEVERANCE_DETECTION 5859L
|
||||
#define M_MODEL_SOURCE 5860L
|
||||
#define M_USER_IMAGE 5861L
|
||||
#define M_HAS_USER_MODEL 5862L
|
||||
#define M_FROM_TRAIN 5863L
|
||||
|
||||
#define M_SMOOTHNESS_SOURCE 5864L
|
||||
#define M_SMOOTHNESS_FROM_TRAIN 5865L
|
||||
#define M_THRESHOLD_MODE_SOURCE 5866L
|
||||
#define M_THRESHOLD_MODE_FROM_TRAIN 5867L
|
||||
|
||||
#define M_STEP_X 3971L // Already defind
|
||||
#define M_STEP_Y 3972L // Already defind
|
||||
#define M_CERTAINTY 202L // Already defined in milmod.h
|
||||
#define M_APPROXIMATION_TOLERANCE 26L // already defined
|
||||
|
||||
#define M_GENERAL 0x20000000L // Already defined in milmod.h
|
||||
#define M_CONTEXT 0x08000000L // Already defined in milmod.h, milreg.h, milstr.h, milocr.h
|
||||
#define M_ALL 0x40000000L // Already defined in milmod.h, milmeas.h, milocr.h, milpat.h, mil.h, miledge.h
|
||||
#define M_DEFAULT 0x10000000L // Already defined in milmod.h, milocr.h, milcode.h, mil.h, miledge.h
|
||||
|
||||
#define M_MODIFICATION_COUNT 5010L // Already define in mil.h
|
||||
#define M_OWNER_SYSTEM 1101L // Already define in mil.h
|
||||
|
||||
#define M_SIZE_X 1536L // Already in mil.h
|
||||
#define M_SIZE_Y 1537L // Already in mil.h
|
||||
|
||||
#define M_REFERENCE_X 100L // Already defined in milreg.h
|
||||
#define M_REFERENCE_Y 101L // Already defined in milreg.h
|
||||
|
||||
#define M_RESET 9L // Already defined
|
||||
|
||||
// Model
|
||||
#define M_AGM_MODEL_INDEX_FLAG 0x02000000L
|
||||
#define M_AGM_MODEL_INDEX(IndexValue) (M_AGM_MODEL_INDEX_FLAG | (IndexValue))
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// MagmGetResult ResultTypes
|
||||
|
||||
#define M_STATUS 0x00008002L // Already defined
|
||||
#define M_TIMEOUT_REACHED 2554L // Already defined
|
||||
#define M_STOPPED_BY_REQUEST 2555L // Already defined
|
||||
#define M_NOT_ENOUGH_MEMORY 4L // Already defined
|
||||
#define M_COMPLETE 0x00000000L // Already defined
|
||||
#define M_INTERNAL_ERROR 5L // Already defined
|
||||
#define M_CURRENTLY_CALCULATING 2718L // Already defined
|
||||
|
||||
#define M_STATUS 0x00008002L // Already defined
|
||||
|
||||
#define M_SCORE_FIT 2461L // Already defined in milmod.h
|
||||
#define M_SCORE_DETECTION 5674L
|
||||
#define M_SCORE_COVERAGE 5675L
|
||||
|
||||
#define M_SORT_CANDIDATES_SCORE 5868L
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// MagmDraw options
|
||||
#define M_DRAW_IMAGE 0x00000002L // Already defined in milmod.h
|
||||
#define M_DRAW_EDGES 0x00000004L // Already defined in milmod.h
|
||||
|
||||
#define M_DRAW_BOX 0x00000020L // Already defined in milmod.h
|
||||
#define M_DRAW_POSITION 0x00000040L // Already defined in milmod.h
|
||||
#define M_DRAW_TRAINED_MODEL 0x00000800L
|
||||
#define M_DRAW_AXIS 0x00000200L // Already define in MilBlob.h
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// CAPI function prototypes
|
||||
MIL_ID MFTYPE MagmAlloc(MIL_ID SysId,
|
||||
MIL_INT64 ContextType,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextIdPtr);
|
||||
|
||||
MIL_ID MFTYPE MagmAllocResult(MIL_ID SysId,
|
||||
MIL_INT64 ResultType,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* AgmResultIdPtr);
|
||||
|
||||
MIL_INT64 MFTYPE MagmInquire(MIL_ID ContextOrResultId,
|
||||
MIL_INT64 Index,
|
||||
MIL_INT64 InquireType,
|
||||
void* UserVarPtr);
|
||||
|
||||
MIL_DOUBLE MFTYPE MagmGetResult(MIL_ID AgmResultId,
|
||||
MIL_INT64 Index,
|
||||
MIL_INT64 AgmResultType,
|
||||
void* ResultArrayPtr);
|
||||
|
||||
void MFTYPE MagmPreprocess(MIL_ID AgmContextId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT64 MFTYPE MagmDefine(MIL_ID ContextId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 SourceType,
|
||||
MIL_INT64 ModelType,
|
||||
MIL_INT64 Param1,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE MagmFind(MIL_ID AgmContextId,
|
||||
MIL_ID TargetImageId,
|
||||
MIL_ID AgmResultId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE MagmTrain(MIL_ID TrainContextId,
|
||||
const MIL_ID* ImageArrayPtr,
|
||||
MIL_INT NumImages,
|
||||
MIL_ID TrainResultId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE MagmCopyResult(MIL_ID SrcTrainResultId,
|
||||
MIL_INT64 SrcIndex,
|
||||
MIL_ID DstContextId,
|
||||
MIL_INT64 DstIndex,
|
||||
MIL_INT64 CopyType,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE MagmDraw(MIL_ID ContextGraId,
|
||||
MIL_ID ContextOrResultAgmId,
|
||||
MIL_ID DstImageBufOrListGraId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 Index,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE MagmFree(MIL_ID ContextOrResultAgmId);
|
||||
|
||||
#if M_MIL_USE_64BIT
|
||||
// Prototypes for 64 bits OSs
|
||||
void MFTYPE MagmControlInt64(MIL_ID ContextId,
|
||||
MIL_INT64 Index,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_INT64 ControlValue);
|
||||
|
||||
void MFTYPE MagmControlDouble(MIL_ID ContextId,
|
||||
MIL_INT64 Index,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_DOUBLE ControlValue);
|
||||
|
||||
#else
|
||||
// Prototypes for 32 bits OSs
|
||||
#define MagmControlInt64 MagmControl
|
||||
#define MagmControlDouble MagmControl
|
||||
|
||||
void MFTYPE MagmControl(MIL_ID ContextId,
|
||||
MIL_INT64 Index,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_DOUBLE ControlValue);
|
||||
#endif //M_MIL_USE_64BIT
|
||||
|
||||
|
||||
#if M_MIL_USE_UNICODE
|
||||
void MFTYPE MagmSaveA(MIL_CONST_TEXTA_PTR FileName,
|
||||
MIL_ID ContextId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_ID MFTYPE MagmRestoreA(MIL_CONST_TEXTA_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextAgmPtr);
|
||||
|
||||
void MFTYPE MagmStreamA(MIL_TEXTA_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextAgmIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
|
||||
void MFTYPE MagmSaveW(MIL_CONST_TEXTW_PTR FileName,
|
||||
MIL_ID ContextId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_ID MFTYPE MagmRestoreW(MIL_CONST_TEXTW_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextAgmPtr);
|
||||
|
||||
void MFTYPE MagmStreamW(MIL_TEXTW_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextAgmIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
|
||||
#if M_MIL_UNICODE_API
|
||||
#define MagmSave MagmSaveW
|
||||
#define MagmRestore MagmRestoreW
|
||||
#define MagmStream MagmStreamW
|
||||
#else
|
||||
#define MagmSave MagmSaveA
|
||||
#define MagmRestore MagmRestoreA
|
||||
#define MagmStream MagmStreamA
|
||||
#endif //M_MIL_UNICODE_API
|
||||
|
||||
#else
|
||||
|
||||
void MFTYPE MagmSave(MIL_CONST_TEXT_PTR FileName,
|
||||
MIL_ID ContextId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_ID MFTYPE MagmRestore(MIL_CONST_TEXT_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextAgmPtr);
|
||||
|
||||
void MFTYPE MagmStream(MIL_TEXT_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextAgmIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
|
||||
#endif //M_MIL_USE_UNICODE
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
#ifdef __cplusplus
|
||||
inline void MFTYPE MagmStreamCpp(MilStreamParam MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextAgmIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
MagmStream(MemPtrOrFileName.m_Param, SysId, Operation, StreamType, Version, ControlFlag, ContextAgmIdPtr, SizeByteVarPtr);
|
||||
}
|
||||
|
||||
#undef MagmStream
|
||||
#define MagmStream MagmStreamCpp
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#if M_MIL_USE_STRING
|
||||
#if M_MIL_USE_UNICODE
|
||||
#if M_MIL_UNICODE_API
|
||||
|
||||
inline void MFTYPE MagmSaveW(const MIL_STRING& FileName, MIL_ID ContextId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return MagmSaveW(FileName.c_str(), ContextId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE MagmRestoreW(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* ContextAgmPtr)
|
||||
{
|
||||
return MagmRestoreW(FileName.c_str(), SysId, ControlFlag, ContextAgmPtr);
|
||||
}
|
||||
|
||||
#else // M_MIL_UNICODE_API
|
||||
inline void MFTYPE MagmSaveA(const MIL_STRING& FileName, MIL_ID ContextId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return MagmSaveA(FileName.c_str(), ContextId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE MagmRestoreA(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* ContextAgmPtr)
|
||||
{
|
||||
return MagmRestoreA(FileName.c_str(), SysId, ControlFlag, ContextAgmPtr);
|
||||
}
|
||||
|
||||
#endif // M_MIL_UNICODE_API
|
||||
|
||||
#else // M_MIL_USE_UNICODE
|
||||
inline void MFTYPE MagmSave(const MIL_STRING& FileName, MIL_ID ContextId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return MagmSave(FileName.c_str(), ContextId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE MagmRestore(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* ContextAgmPtr)
|
||||
{
|
||||
return MagmRestore(FileName.c_str(), SysId, ControlFlag, ContextAgmPtr);
|
||||
}
|
||||
#endif // M_MIL_USE_UNICODE
|
||||
|
||||
#endif // M_MIL_USE_STRING
|
||||
|
||||
|
||||
|
||||
#if M_MIL_USE_64BIT
|
||||
#ifdef __cplusplus
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// MagmControl function overloads when compiling c++ files
|
||||
//////////////////////////////////////////////////////////////
|
||||
inline void MagmControl(MIL_ID ContextId, MIL_INT64 Index, MIL_INT64 ControlType, float ControlValue)
|
||||
{
|
||||
MagmControlDouble(ContextId, Index, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void MagmControl(MIL_ID ContextId, MIL_INT64 Index, MIL_INT64 ControlType, MIL_DOUBLE ControlValue)
|
||||
{
|
||||
MagmControlDouble(ContextId, Index, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
#if M_MIL_USE_MIL_UNIQUE_ID
|
||||
// Overload for applicable MIL_UNIQUE_..._IDs.
|
||||
inline void MagmControl(MIL_ID ContextId, MIL_INT64 Index, MIL_INT64 ControlType, const MIL_UNIQUE_BUF_ID& ControlValue)
|
||||
{
|
||||
MagmControlInt64(ContextId, Index, ControlType, ControlValue.get());
|
||||
}
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
inline void MagmControl(MIL_ID ContextId, MIL_INT64 Index, MIL_INT64 ControlType, T* ControlValue)
|
||||
{
|
||||
MagmControlInt64(ContextId, Index, ControlType, M_PTR_TO_MIL_INT(ControlValue));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline void MagmControl(MIL_ID ContextId, MIL_INT64 Index, MIL_INT64 ControlType, T ControlValue)
|
||||
{
|
||||
MagmControlInt64(ContextId, Index, ControlType, (MIL_INT64) ControlValue);
|
||||
}
|
||||
|
||||
#else // __cplusplus
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// For C file, call the default function, i.e. Double one
|
||||
//////////////////////////////////////////////////////////////
|
||||
#define MagmControl MagmControlDouble
|
||||
|
||||
#endif // __cplusplus
|
||||
#endif // M_MIL_USE_64BIT
|
||||
|
||||
|
||||
//==============================================================================
|
||||
// MIL_UNIQUE_ID support
|
||||
|
||||
#if M_MIL_USE_MIL_UNIQUE_ID
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
template <> inline bool MilIsCorrectObjectType<&MagmFree>(MIL_INT64 ObjectType)
|
||||
{
|
||||
return (ObjectType & ~M_USER_DEFINE_LOW_ATTRIBUTE) == M_AGM_OBJECT;
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef MIL_UNIQUE_ID<&MagmFree> MIL_UNIQUE_AGM_ID;
|
||||
|
||||
#if M_MIL_USE_MOVE_SEMANTICS
|
||||
|
||||
inline MIL_UNIQUE_AGM_ID MagmAlloc(MIL_ID SysId, MIL_INT64 ObjectType, MIL_INT64 InitFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_AGM_ID(MagmAlloc(SysId, ObjectType, InitFlag, M_NULL));
|
||||
}
|
||||
|
||||
inline MIL_UNIQUE_AGM_ID MagmAllocResult(MIL_ID SysId, MIL_INT64 AgmResultType, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_AGM_ID(MagmAllocResult(SysId, AgmResultType, ControlFlag, M_NULL));
|
||||
}
|
||||
|
||||
inline MIL_UNIQUE_AGM_ID MagmRestore(MIL_CONST_TEXT_PTR FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_AGM_ID(MagmRestore(FileName, SysId, ControlFlag, M_NULL));
|
||||
}
|
||||
|
||||
#if M_MIL_USE_STRING
|
||||
inline MIL_UNIQUE_AGM_ID MagmRestore(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_AGM_ID(MagmRestore(FileName.c_str(), SysId, ControlFlag, M_NULL));
|
||||
}
|
||||
#endif // M_MIL_USE_STRING
|
||||
|
||||
template <MilFreeFuncType FreeFunc> inline void MagmFree(const MIL_UNIQUE_ID<FreeFunc>&) = delete;
|
||||
|
||||
inline void MagmStream(MilStreamParam MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_UNIQUE_AGM_ID* ContextAgmIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
MxxxStreamForMilUniqueId(MemPtrOrFileName, SysId, Operation, StreamType, Version, ControlFlag, ContextAgmIdPtr, SizeByteVarPtr, MagmStream);
|
||||
}
|
||||
|
||||
inline void MagmTrain(MIL_ID TrainContextId,
|
||||
MilConstArrayIdParam ImageArrayPtr,
|
||||
MIL_INT NumImages,
|
||||
MIL_ID TrainResultId,
|
||||
MIL_INT64 ControlFlag)
|
||||
{
|
||||
MagmTrain(TrainContextId,
|
||||
ImageArrayPtr.m_IdArrayPtr,
|
||||
NumImages,
|
||||
TrainResultId,
|
||||
ControlFlag);
|
||||
}
|
||||
|
||||
#endif // M_MIL_USE_MOVE_SEMANTICS
|
||||
#endif // M_MIL_USE_MIL_UNIQUE_ID
|
||||
|
||||
// End of MIL_UNIQUE_ID support
|
||||
//=====================================================
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// MagmGetResult safe type definitions
|
||||
inline MIL_DOUBLE MagmGetResultSafeType(MIL_ID AgmResultId, MIL_INT64 Index, MIL_INT64 AgmResultType, MilVoidPtr ResultArrayPtr)
|
||||
{
|
||||
MIL_INT64 RequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
if((AgmResultType & M_DATA_TYPE_MASK) == 0)
|
||||
{
|
||||
MagmGetResult(AgmResultId, Index, AgmResultType | M_DEFAULT_DATA_TYPE, &RequiredParamType);
|
||||
}
|
||||
if(!MfuncPointerIsCompatible(RequiredParamType, ResultArrayPtr.Type, AgmResultType))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MagmGetResult"));
|
||||
}
|
||||
return MagmGetResult(AgmResultId, Index, AgmResultType, ResultArrayPtr.Ptr);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// MagmGetResult Unsafe type definitions
|
||||
inline MIL_DOUBLE MagmGetResultUnsafe(MIL_ID AgmResultId, MIL_INT64 Index, MIL_INT64 AgmResultType, void* ResultArrayPtr)
|
||||
{
|
||||
return MagmGetResult(AgmResultId, Index, AgmResultType, ResultArrayPtr);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// MagmInquire safe type definitions
|
||||
|
||||
inline MIL_INT64 MFTYPE MagmInquireSafeType(MIL_ID ContextOrResultId, MIL_INT64 Index, MIL_INT64 InquireType, MilVoidPtr UserVarPtr)
|
||||
{
|
||||
MIL_INT64 RequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
if((InquireType & M_DATA_TYPE_MASK) == 0)
|
||||
{
|
||||
MagmInquire(ContextOrResultId, Index, InquireType | M_DEFAULT_DATA_TYPE, &RequiredParamType);
|
||||
}
|
||||
if(!MfuncPointerIsCompatible(RequiredParamType, UserVarPtr.Type, InquireType))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MagmInquire"));
|
||||
}
|
||||
return MagmInquire(ContextOrResultId, Index, InquireType, UserVarPtr.Ptr);
|
||||
}
|
||||
|
||||
inline MIL_INT64 MFTYPE MagmInquireUnsafe(MIL_ID ContextOrResultId, MIL_INT64 Index, MIL_INT64 InquireType, void* UserVarPtr)
|
||||
{
|
||||
return MagmInquire(ContextOrResultId, Index, InquireType, UserVarPtr);
|
||||
}
|
||||
|
||||
//------------------------------
|
||||
// Safetype functions assignment
|
||||
|
||||
#define MagmGetResult MagmGetResultSafeType
|
||||
#define MagmInquire MagmInquireSafeType
|
||||
|
||||
|
||||
#else // #if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
#define MagmGetResultUnsafe MagmGetResult
|
||||
#define MagmInquireUnsafe MagmInquire
|
||||
|
||||
#endif // #if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// Overload for std::vector.
|
||||
#if defined(M_MIL_USE_VECTOR) && M_MIL_USE_VECTOR
|
||||
|
||||
|
||||
template <typename UserType>
|
||||
inline MIL_DOUBLE MFTYPE MagmGetResult(MIL_ID AgmResultId, MIL_INT64 Index, MIL_INT64 AgmResultType, std::vector<UserType> &ResultArrayPtr)
|
||||
{
|
||||
//! If the given MIL data type is not the same as the SrcType, change it to the correct one
|
||||
//! and give a warning.
|
||||
MIL_INT64 InternalTrueDataTypeForStdVector = MilTraits<UserType>::TypeFlag;
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(M_GET_HLVLDATATYPE(AgmResultType) != 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MagmGetResult"), MIL_TEXT("Combination value for the required data type is not supported with std::vector overload."));
|
||||
}
|
||||
#endif
|
||||
|
||||
AgmResultType = M_STRIP_HLVLDATATYPE(AgmResultType) + InternalTrueDataTypeForStdVector;
|
||||
|
||||
MIL_INT InternalNumberOfElementsForStdVector = 0;
|
||||
MagmGetResult(AgmResultId, Index, M_STRIP_HLVLDATATYPE(AgmResultType) + M_NB_ELEMENTS + M_TYPE_MIL_INT, &InternalNumberOfElementsForStdVector);
|
||||
|
||||
ResultArrayPtr.resize(InternalNumberOfElementsForStdVector);
|
||||
|
||||
if(InternalNumberOfElementsForStdVector > 0)
|
||||
{
|
||||
return MagmGetResult(AgmResultId, Index, AgmResultType, &ResultArrayPtr[0]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <typename UserType>
|
||||
inline MIL_INT64 MFTYPE MagmInquire(MIL_ID ContextOrResultId, MIL_INT64 Index, MIL_INT64 InquireType, std::vector<UserType> &UserVarPtr)
|
||||
{
|
||||
// If the given MIL data type is not the same as the SrcType, change it to the correct one
|
||||
// and give a warning.
|
||||
MIL_INT64 InternalTrueDataTypeForStdVector = MilTraits<UserType>::TypeFlag;
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(M_GET_HLVLDATATYPE(InquireType) != 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MagmInquire"), MIL_TEXT("Combination value for the required data type is not supported with std::vector overload."));
|
||||
}
|
||||
#endif
|
||||
|
||||
InquireType = M_STRIP_HLVLDATATYPE(InquireType) + InternalTrueDataTypeForStdVector;
|
||||
|
||||
MIL_INT InternalNumberOfElementsForStdVector = 0;
|
||||
MagmInquire(ContextOrResultId, Index, M_STRIP_HLVLDATATYPE(InquireType) + M_NB_ELEMENTS + M_TYPE_MIL_INT, &InternalNumberOfElementsForStdVector);
|
||||
|
||||
UserVarPtr.resize(InternalNumberOfElementsForStdVector);
|
||||
|
||||
if(InternalNumberOfElementsForStdVector > 0)
|
||||
{
|
||||
return MagmInquire(ContextOrResultId, Index, InquireType, &UserVarPtr[0]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=======================================================================================
|
||||
inline void MFTYPE MagmTrain(MIL_ID TrainContextId,
|
||||
const std::vector<MIL_ID>& ImageVector,
|
||||
MIL_INT NumImages,
|
||||
MIL_ID TrainResultId,
|
||||
MIL_INT64 ControlFlag)
|
||||
{
|
||||
MIL_INT ImageVectorSize = static_cast<MIL_INT>(ImageVector.size());
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if((NumImages > ImageVectorSize) && (NumImages != M_DEFAULT))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MagmTrain"), MIL_TEXT("NumImages parameter must be smaller or equal (M_DEFAULT) to the size of input vector."));
|
||||
}
|
||||
if(NumImages < 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MagmTrain"), MIL_TEXT("NumImages parameter must be positive."));
|
||||
}
|
||||
#endif
|
||||
|
||||
MIL_INT SafeNumImages = NumImages;
|
||||
if((NumImages > ImageVectorSize) || (NumImages == M_DEFAULT))
|
||||
{
|
||||
SafeNumImages = ImageVectorSize;
|
||||
}
|
||||
else if(NumImages < 0)
|
||||
{
|
||||
SafeNumImages = 0;
|
||||
}
|
||||
|
||||
MagmTrain(TrainContextId,
|
||||
ImageVector.empty() ? nullptr : &ImageVector[0],
|
||||
SafeNumImages,
|
||||
TrainResultId,
|
||||
ControlFlag);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// Overloads for std::vector in MxxxStream.
|
||||
inline void MFTYPE MagmStream(std::vector<MIL_UINT8> &MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextAgmIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
MxxxStreamForStdVector(MemPtrOrFileName,
|
||||
SysId,
|
||||
Operation,
|
||||
StreamType,
|
||||
Version,
|
||||
ControlFlag,
|
||||
ContextAgmIdPtr,
|
||||
SizeByteVarPtr,
|
||||
MagmStream);
|
||||
}
|
||||
|
||||
#endif // defined(M_MIL_USE_VECTOR) && M_MIL_USE_VECTOR
|
||||
|
||||
|
||||
|
||||
#endif // !M_MIL_LITE
|
||||
#endif // __MIL_AGM_H__
|
||||
864
Include/ClassicMIL/MILDyn/milbead.h
Normal file
864
Include/ClassicMIL/MILDyn/milbead.h
Normal file
@ -0,0 +1,864 @@
|
||||
/***************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: MilBead.h
|
||||
Owner : Matrox Imaging
|
||||
Revision: 10.60.0776
|
||||
Content : This file contains the defines and the prototypes for the
|
||||
MIL bead verifier. (Mbead...)
|
||||
|
||||
Copyright © Matrox Electronic Systems Ltd., 1992-2023.
|
||||
All Rights Reserved
|
||||
|
||||
*/
|
||||
/***************************************************************************/
|
||||
#ifndef __MIL_BEAD_H__
|
||||
#define __MIL_BEAD_H__
|
||||
|
||||
#if (!M_MIL_LITE) // MIL FULL ONLY
|
||||
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/***************************************************************************/
|
||||
/* MBead CAPI defines */
|
||||
/***************************************************************************/
|
||||
#define M_CONTEXT 0x08000000L // Already defined in milmod.h, milreg.h, milstr.h, milocr.h, milcol.h, ...
|
||||
#define M_GENERAL 0x20000000L // Already defined in milmod.h, milreg.h, milstr.h, milocr.h, milcol.h, ...
|
||||
#define M_ALL 0x40000000L // Already defined in milmod.h, milmeas.h, milocr.h, milpat.h, mil.h, miledge.h, milcol.h, ...
|
||||
|
||||
// Control Flags for Context
|
||||
#define M_TRAINING_BOX_WIDTH 17L // Width of the search boxes in world units.
|
||||
#define M_BOX_WIDTH_MARGIN 2L // Additional width margin of the search boxes in %.
|
||||
#define M_TRAINING_BOX_HEIGHT 3L // Height of the search boxes in world units.
|
||||
#define M_TRAINED_BOX_SPACING 25L // Readable: inquire the real spacing used for verify operation.
|
||||
#define M_TRAINING_BOX_SPACING 40L // Space between search boxes in world units.
|
||||
#define M_TRAINING_BOX_INPUT_UNITS 78L //
|
||||
#define M_TEMPLATE_INPUT_UNITS 79L //
|
||||
#define M_SMOOTHNESS 108L // Sets the degree of smoothness (strength of denoising), Already defined in milmod.h, milmeas.h, miledge.h, milmetrol.h, mil.h, ...
|
||||
#define M_TRAINED_WIDTH_NOMINAL 92L //
|
||||
#define M_THRESHOLD_MODE 33L // Sets the threshold mode setting, Already defined in milcode.h, miledge.h, milmetrol.h, milstr.h, ...
|
||||
#define M_THRESHOLD_VALUE 953L // Sets the threshold value, Already defined in milcode.h, milstr.h, ...
|
||||
#define M_FOREGROUND_VALUE 4L // Set the color of the bead, Already defined in milblob.h, milcal.h, milcode.h, miledge.h, milmod.h, milocr.h, milstr.h, ...
|
||||
#define M_WIDTH_NOMINAL 5L // Set the nominal width of the bead, Already defined in milmeas.h, milblob,h, ...
|
||||
#define M_WIDTH_DELTA_NEG 6L // Set the delta neg tolerance of the bead's width
|
||||
#define M_WIDTH_DELTA_POS 7L // Set the delta pos tolerance of the bead's width
|
||||
#define M_OFFSET_MAX 88L // Set the max offset tolerance of the bead position relative to the Template, in world units.
|
||||
#define M_FAIL_WARNING_OFFSET 99L // Set the max offset to find the bead position relative to the Template, in world units.
|
||||
#define M_FOUND_OFFSET_MAX M_FAIL_WARNING_OFFSET // deprecated
|
||||
#define M_GAP_MAX_LENGTH 9L // Set the max valid gap length in world units
|
||||
#define M_GAP_COVERAGE 216L // Retrieve the % of bead found for a Template to be valid
|
||||
#define M_ACCEPTANCE 200L // Set the min % of valid beads for a Template to be valid, Already defined in milmod.h, milpat.h, milreg.h, milcol.h
|
||||
#define M_ACCURACY 106L // Set the bead verification accuracy level for a Template, Already defined in milmod.h,...
|
||||
#if OldDefinesSupport
|
||||
#define M_ACCURACY_MAX_ANGULAR_DEVIATION 107L
|
||||
#define M_ACCURACY_MAX_ANGLE_DEVIATION 107L
|
||||
MIL_DEPRECATED(M_ACCURACY_MAX_ANGULAR_DEVIATION, 1010)
|
||||
MIL_DEPRECATED(M_ACCURACY_MAX_ANGLE_DEVIATION , 1010)
|
||||
#endif
|
||||
#define M_ANGLE_ACCURACY_MAX_DEVIATION 107L
|
||||
#define M_WIDTH_NOMINAL_MODE 12L // Set the nominal width mode of the bead
|
||||
#define M_ASSOCIATED_CALIBRATION 125L // Set the associated calibration to the training image. // Already defined in milmod.h, milmet.h,...
|
||||
#define M_CLOSEST_POINT_MAX_DISTANCE 176L // Set the max distance value for template closest operations
|
||||
#if OldDefinesSupport
|
||||
#define M_GLOBAL_FRAME_OFFSET_X 1000L
|
||||
#define M_GLOBAL_FRAME_OFFSET_Y 1001L
|
||||
#define M_GLOBAL_FRAME_ROTATION 1002L
|
||||
MIL_DEPRECATED(M_GLOBAL_FRAME_OFFSET_X, 1010)
|
||||
MIL_DEPRECATED(M_GLOBAL_FRAME_OFFSET_Y, 1010)
|
||||
MIL_DEPRECATED(M_GLOBAL_FRAME_ROTATION, 1010)
|
||||
#endif
|
||||
#if OldDefinesSupport
|
||||
#define M_POSITION_MODE 1462L // deprecated flag
|
||||
MIL_DEPRECATED(M_POSITION_MODE, 1010)
|
||||
#endif
|
||||
#define M_TRAINING_PATH 1462L
|
||||
#if OldDefinesSupport
|
||||
#define M_TEMPLATE_INDEX_FROM_LABEL M_INDEX_VALUE // deprecated flag
|
||||
MIL_DEPRECATED(M_TEMPLATE_INDEX_FROM_LABEL, 1010)
|
||||
#endif
|
||||
#define M_TRAINED_INDIVIDUAL_WIDTH_NOMINAL 207L //
|
||||
#define M_TRAINED_SIZE 209L //
|
||||
#define M_TRAINED_POSITION_X 210L //
|
||||
#define M_TRAINED_POSITION_Y 211L //
|
||||
#define M_INDIVIDUAL_WIDTH_NOMINAL 212L //
|
||||
|
||||
#define M_CIRCLE 0x00000008L // already defined
|
||||
#define M_TEMPLATE_CIRCLE_CENTER_X 302L
|
||||
#define M_TEMPLATE_CIRCLE_CENTER_Y 303L
|
||||
#define M_TEMPLATE_CIRCLE_RADIUS 304L
|
||||
|
||||
#define M_SEGMENT 0x00000082L // already defined
|
||||
#define M_TEMPLATE_SEGMENT_START_X 305L
|
||||
#define M_TEMPLATE_SEGMENT_START_Y 306L
|
||||
#define M_TEMPLATE_SEGMENT_END_X 307L
|
||||
#define M_TEMPLATE_SEGMENT_END_Y 308L
|
||||
|
||||
#define M_POLYLINE_SEED 444L // = deprecated M_AUTO
|
||||
#define M_POLYLINE 0x00000020L // deprecated M_USER_DEFINED
|
||||
|
||||
// Control Flags for Context or Result
|
||||
#if OldDefinesSupport
|
||||
#define M_DRAW_RELATIVE_ORIGIN_X 319L // deprecated : Use MgraControl(... M_DRAW_OFFSET_X...)
|
||||
#define M_DRAW_RELATIVE_ORIGIN_Y 320L // deprecated : Use MgraControl(... M_DRAW_OFFSET_Y...)
|
||||
#define M_DRAW_SCALE_X 3203L // deprecated : Use MgraControl(... M_DRAW_ZOOM_X ...)
|
||||
#define M_DRAW_SCALE_Y 3204L // deprecated : Use MgraControl(... M_DRAW_ZOOM_Y ...)
|
||||
// MIL_DEPRECATED(M_DRAW_RELATIVE_ORIGIN_X, 1010) Already defined in mil.h
|
||||
// MIL_DEPRECATED(M_DRAW_RELATIVE_ORIGIN_Y, 1010) Already defined in mil.h
|
||||
// MIL_DEPRECATED(M_DRAW_SCALE_X, 1010) Already defined in mil.h
|
||||
// MIL_DEPRECATED(M_DRAW_SCALE_Y, 1010) Already defined in mil.h
|
||||
#endif
|
||||
#define M_WORLD 0x2000L // Already defined in milmeas.h,...
|
||||
#define M_PIXEL 0x1000L // Already defined in milmeas.h,...
|
||||
#define M_ENHANCED 1L
|
||||
|
||||
// Control values
|
||||
#define M_USER_DEFINED 21L // Already defined in milcal.h, milcode.h, milcolor.h, miledge.h, milmetrol.h, milocr.h, milstr.h, ...
|
||||
#define M_FOREGROUND_BLACK 0x100L // Already defined in milblob.h, milmod.h, milcode.h, milocr.h, miledge.h
|
||||
#define M_FOREGROUND_WHITE 0x80L // Already defined in milblob.h, milmod.h, milcode.h, milocr.h, miledge.h
|
||||
#define M_AUTO 444L // Already defined in mil.h, ...
|
||||
#define M_AUTO_UNIFORM M_AUTO
|
||||
#define M_AUTO_CONTINUOUS 445
|
||||
#define M_DISABLE -9999L // Already defined in milblob.h, milcal.h, milmeas.h, mil.h, ...
|
||||
|
||||
// Strategy Flag
|
||||
|
||||
// Inquire Flags for Context or Result
|
||||
#define M_MODIFICATION_COUNT 5010L // To retrieve the modification counter, Already defined in mil.h, ...
|
||||
#define M_NUMBER_OF_TEMPLATES 1L // To retrieve the number of Template in context or result
|
||||
#define M_LABEL_VALUE 1L // Already defined in mil.h, ...
|
||||
#define M_INDEX_VALUE M_INDEX // Already defined in mil.h, ...
|
||||
#define M_SIZE 0xC00L // Retrieve the size of a template. Already defined in milmod, miledge,...
|
||||
#define M_POSITION_X 0x00003400L // Already defined in miledge.h, milcode.h, ...
|
||||
#define M_POSITION_Y 0x00004400L // Already defined in miledge.h, milcode.h, ...
|
||||
|
||||
// Template function flags
|
||||
#define M_BEAD_STRIPE 1L // Type (stripe) of template to add
|
||||
#define M_BEAD_EDGE 2L // Type (edge) of template to add
|
||||
#define M_TYPE 1008L // Already defined in mil.h,...
|
||||
#define M_BEAD_TYPE M_TYPE // Type of the template
|
||||
#define M_ADD 0x0000L // Add a new Template in the context, Already defined in milcode.h, milim.h, milocr.h, ...
|
||||
#define M_ADD_FROM_GRAPHIC_LIST 12L // Add a new Template in the context from a graphic list primitive (polyline or polygon)
|
||||
#define M_REPLACE 0x01000060L // Already defined in mil.h, milocr.h, miledge.h
|
||||
#define M_INSERT 5L // Insert points to an existing Template
|
||||
#define M_DELETE 3L // Delete a Template in the context, Already defined in milblob.h, milcode.h, milcolor.h, miledge.h, milmetrol.h, milmod.h, mil.h, ...
|
||||
#define M_TRANSLATE_POINTS 8L // Move all points of a Template (rigid transformation only)
|
||||
#define M_SCALE_POINTS 229L // Scale all points of a Template
|
||||
#define M_ROTATE_POINTS 210L // Rotate all points of a Template
|
||||
#define M_SET_WIDTH_NOMINAL 11L // To set the width nominal values
|
||||
#define M_RESET_WIDTH 0L // Value to reset the user defined width setting for a specific bead section
|
||||
|
||||
// GetNeighbors function flags
|
||||
#define M_CLOSEST_TEMPLATE 11L // Retrieve closest Templates from a user-defined point
|
||||
#define M_CLOSEST_POINT 12L // Retrieve closest point of a Template from a user-defined point
|
||||
|
||||
// Train operation flag (bitwise)
|
||||
#define M_SAVE_TRAINING_IMAGE 2L // To save the training image into the context
|
||||
#define M_TRAINING_IMAGE_SIZE_X 15L // Size of the training image
|
||||
#define M_TRAINING_IMAGE_SIZE_Y 16L // Size of the training image
|
||||
#define M_TRAINING_IMAGE_TYPE 17L // Type of the training image
|
||||
|
||||
// Context status flag
|
||||
#define M_COMPLETE 0x00000000L // Already defined in mil.h, milmod.h
|
||||
#define M_PARTIAL 0x00000001L // Already defined in mil.h, milmod.h
|
||||
#define M_NOT_TRAINED 2L
|
||||
|
||||
// Result type Flag
|
||||
#define M_STATUS 0x00008002L // Already defined in milcode.h, milcolor.h, miledge.h, ...
|
||||
#define M_NUMBER 1009L // Already defined in mil.h, ...
|
||||
#define M_GAP_TOLERANCE 216L // Already defined in milmetrol.h, ...
|
||||
#define M_WIDTH_MIN 74L //
|
||||
#define M_WIDTH_MAX 30L //
|
||||
#define M_WIDTH_AVERAGE 3L //
|
||||
#define M_POSITION_X 0x00003400L // Already defined in milmod, milpat.h, ...
|
||||
#define M_POSITION_Y 0x00004400L // Already defined in milmod, milpat.h, ...
|
||||
#define M_OFFSET 2L
|
||||
#define M_ANGLE 0x00000800L // Already defined in milmod, milpat.h, ...
|
||||
#define M_TRAINED_BOX_WIDTH 48L
|
||||
#define M_TRAINED_BOX_HEIGHT 49L
|
||||
#define M_WIDTH_MIN_INDEX 10L //
|
||||
#define M_WIDTH_MAX_INDEX 20L //
|
||||
#define M_STATUS_GAP_TOLERANCE 22L
|
||||
#define M_STATUS_GAP_MAX 23L
|
||||
#define M_STATUS_SCORE 24L
|
||||
#define M_TRAINED_INDEX 25L
|
||||
#define M_STATUS_SEARCH 26L
|
||||
#define M_STATUS_OFFSET 27L
|
||||
#define M_STATUS_WIDTH_MIN 28L
|
||||
#define M_STATUS_WIDTH_MAX 29L
|
||||
#define M_WIDTH_VALUE 31L
|
||||
#define M_STATUS_FOUND 32L
|
||||
#define M_SCORE 0x00001400L // Already defined in milmod, milpat.h, ...
|
||||
#define M_STATUS_INTENSITY_MIN 50L
|
||||
#define M_STATUS_INTENSITY_MAX 51L
|
||||
#define M_INTENSITY 52L
|
||||
#define M_TRAINING_WIDTH_NOMINAL 60L
|
||||
#define M_TRAINING_WIDTH_SCALE_MIN 61L
|
||||
#define M_TRAINING_WIDTH_SCALE_MAX 62L
|
||||
#define M_CLOSURE 77L // Also defined in miledge.h
|
||||
#define M_INTENSITY_NOMINAL_MODE 80L
|
||||
#define M_INTENSITY_NOMINAL 81L
|
||||
#define M_INTENSITY_DELTA_POS 82L
|
||||
#define M_INTENSITY_DELTA_NEG 83L
|
||||
#define M_INTENSITY_MIN 84L
|
||||
#define M_INTENSITY_MAX 85L
|
||||
#define M_INTENSITY_MIN_INDEX 86L
|
||||
#define M_INTENSITY_MAX_INDEX 87L
|
||||
#define M_OFFSET_MAX_INDEX 89L
|
||||
#define M_NUMBER_FOUND 90L
|
||||
|
||||
#define M_START_POS_X 2820 // Already defined in milmod.h
|
||||
#define M_START_POS_Y 2821 // Already defined in milmod.h
|
||||
#define M_END_POS_X 2822 // Already defined in milmod.h
|
||||
#define M_END_POS_Y 2823 // Already defined in milmod.h
|
||||
|
||||
// General values
|
||||
#define M_BEGIN -1L
|
||||
#define M_END -2L
|
||||
#define M_INFINITE -1L // Also defined in Mil.h
|
||||
|
||||
// Result values
|
||||
#define M_PASS 0x0002L // Already defined in milim.h, ...
|
||||
#define M_FAIL 4L // Already defined in milmetrol.h, ...
|
||||
#define M_FAIL_WIDTH_MIN 7L //
|
||||
#define M_FAIL_WIDTH_MAX 8L //
|
||||
#define M_FAIL_GAP_MAX 9L //
|
||||
#define M_FAIL_OFFSET 10L //
|
||||
#define M_FAIL_NOT_FOUND 11L //
|
||||
#define M_FAIL_INTENSITY_MIN 12L //
|
||||
#define M_FAIL_INTENSITY_MAX 13L //
|
||||
|
||||
// Draw operation flags
|
||||
#define M_DRAW_POSITION 0x00000040L // Already defined in milmod.h, milpat.h, ...
|
||||
#define M_DRAW_POSITION_POLYLINE 2L //
|
||||
#define M_DRAW_INDEX 0x00000100L // Already defines in miledge.h
|
||||
#define M_DRAW_SEARCH_BOX 6L //
|
||||
#define M_DRAW_WIDTH 0x00000008L // Already
|
||||
#define M_DRAW_LABEL 0x00000001L // Already defines in miledge.h, milmetrol.h, ...
|
||||
#define M_DRAW_TRAINING_IMAGE 15L
|
||||
#define M_DRAW_POSITION_INDEX 20L
|
||||
|
||||
// Draw option flags
|
||||
#define M_USER 0x00000001L // Already defines in mil.h,...
|
||||
#define M_TRAINED 12L
|
||||
#define M_TRAINED_PASS 11L
|
||||
#define M_TRAINED_FAIL 9L
|
||||
#define M_ALL 0x40000000L // Already defines in milmetrol.h,...
|
||||
#define M_PASS 0x0002L // Already defines in milmetrol.h,...
|
||||
#define M_FAIL 4L // Already defines in milmetrol.h,...
|
||||
#define M_FAIL_WIDTH_MAX 8L
|
||||
#define M_FAIL_WIDTH_MIN 7L
|
||||
#define M_FAIL_OFFSET 10L
|
||||
|
||||
/***************************************************************************/
|
||||
/* MbeadSave()/MbeadRestore()/MbeadStream() */
|
||||
/***************************************************************************/
|
||||
#define M_MEMORY (M_APP_INQUIRE_SYS_START+120L) /*5120*/ // Already defined in Mil.h
|
||||
#define M_INTERACTIVE M_NULL // Already defined in mil.h, milcal.h, milcode.h, milmeas.h, milocr.h, milpat.h, milmod.h
|
||||
|
||||
#define M_SAVE 0x100L
|
||||
|
||||
#define M_RESTORE 0x10L
|
||||
|
||||
#define M_LOAD 1L
|
||||
#define M_INQUIRE_SIZE_BYTE 2L
|
||||
|
||||
#define M_WITH_CALIBRATION 0x00020000L // Already in mil.h
|
||||
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
/* Utilities */
|
||||
/***************************************************************************/
|
||||
|
||||
#define M_TEMPLATE_LABEL_TAG 0x01000000L // =utilities=
|
||||
#define M_TEMPLATE_INDEX_TAG 0x02000000L // =utilities=
|
||||
|
||||
#define M_TEMPLATE_LABEL(i) (M_TEMPLATE_LABEL_TAG | (i))
|
||||
#define M_TEMPLATE_INDEX(i) (M_TEMPLATE_INDEX_TAG | (i))
|
||||
|
||||
//*****************************************************************************************
|
||||
// CAPI function prototypes
|
||||
|
||||
#if M_MIL_USE_64BIT
|
||||
// Prototypes for 64 bits OS
|
||||
void MFTYPE MbeadControlInt64(MIL_ID ContextBeadId,
|
||||
MIL_INT LabelOrIndex,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_INT64 ControlValue);
|
||||
|
||||
void MFTYPE MbeadControlDouble(MIL_ID ContextBeadId,
|
||||
MIL_INT LabelOrIndex,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_DOUBLE ControlValue);
|
||||
#else
|
||||
|
||||
// Prototypes for 32 bits OS
|
||||
#define MbeadControlInt64 MbeadControl
|
||||
#define MbeadControlDouble MbeadControl
|
||||
|
||||
void MFTYPE MbeadControl(MIL_ID ContextBeadId,
|
||||
MIL_INT LabelOrIndex,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_DOUBLE ControlValue);
|
||||
#endif
|
||||
|
||||
MIL_ID MFTYPE MbeadAlloc(MIL_ID SysId,
|
||||
MIL_INT64 Strategy,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextBeadIdPtr);
|
||||
|
||||
MIL_ID MFTYPE MbeadAllocResult(MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ResultBeadIdPtr);
|
||||
|
||||
void MFTYPE MbeadFree(MIL_ID ContextOrResultBeadId);
|
||||
|
||||
|
||||
MIL_INT MFTYPE MbeadInquire(MIL_ID ContextOrResultBeadId,
|
||||
MIL_INT LabelOrIndex,
|
||||
MIL_INT64 InquireType,
|
||||
void* UserVarPtr);
|
||||
|
||||
void MFTYPE MbeadTemplate(MIL_ID ContextBeadId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 BeadType,
|
||||
MIL_INT LabelOrIndex,
|
||||
MIL_INT GraListIdOrSizeOfArray,
|
||||
const MIL_DOUBLE* FirstArrayPtr,
|
||||
const MIL_DOUBLE* SecondArrayPtr,
|
||||
const MIL_INT* ThirdArrayPtr,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE MbeadTrain(MIL_ID ContextBeadId,
|
||||
MIL_ID TrainingImageBufId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE MbeadVerify(MIL_ID ContextBeadId,
|
||||
MIL_ID TargetImageBufId,
|
||||
MIL_ID ResultBeadId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE MbeadGetResult(MIL_ID ResultBeadId,
|
||||
MIL_INT LabelOrIndex,
|
||||
MIL_INT ResultIndex,
|
||||
MIL_INT64 ResultType,
|
||||
void* UserVarPtr);
|
||||
|
||||
void MFTYPE MbeadGetNeighbors(MIL_ID ContextBeadId,
|
||||
MIL_INT LabelOrIndex,
|
||||
MIL_DOUBLE PositionX,
|
||||
MIL_DOUBLE PositionY,
|
||||
MIL_INT* TemplateLabelPtr,
|
||||
MIL_INT* PointIndexPtr,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE MbeadDraw(MIL_ID ContextGraId,
|
||||
MIL_ID ContextOrResultBeadId,
|
||||
MIL_ID DstImageBufOrListGraId,
|
||||
MIL_INT64 DrawOperation,
|
||||
MIL_INT64 DrawOption,
|
||||
MIL_INT LabelOrIndex,
|
||||
MIL_INT Index,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
#if M_MIL_USE_UNICODE
|
||||
|
||||
MIL_ID MFTYPE MbeadRestoreW(MIL_CONST_TEXTW_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextBeadIdPtr);
|
||||
|
||||
void MFTYPE MbeadSaveW(MIL_CONST_TEXTW_PTR FileName,
|
||||
MIL_ID ContextBeadId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE MbeadStreamW(MIL_TEXTW_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextBeadIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
|
||||
MIL_ID MFTYPE MbeadRestoreA(MIL_CONST_TEXTA_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextBeadIdPtr);
|
||||
|
||||
void MFTYPE MbeadSaveA(MIL_CONST_TEXTA_PTR FileName,
|
||||
MIL_ID ContextBeadId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE MbeadStreamA(MIL_TEXTA_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextBeadIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
|
||||
#if M_MIL_UNICODE_API
|
||||
#define MbeadSave MbeadSaveW
|
||||
#define MbeadRestore MbeadRestoreW
|
||||
#define MbeadStream MbeadStreamW
|
||||
#else
|
||||
#define MbeadSave MbeadSaveA
|
||||
#define MbeadRestore MbeadRestoreA
|
||||
#define MbeadStream MbeadStreamA
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
MIL_ID MFTYPE MbeadRestore(MIL_CONST_TEXT_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextBeadIdPtr);
|
||||
|
||||
void MFTYPE MbeadSave(MIL_CONST_TEXT_PTR FileName,
|
||||
MIL_ID ContextBeadId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE MbeadStream(MIL_TEXT_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextBeadIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
#endif
|
||||
|
||||
//*****************************************************************************************
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
inline void MFTYPE MbeadStreamCpp(MilStreamParam MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextBeadIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
MbeadStream(MemPtrOrFileName.m_Param, SysId, Operation, StreamType, Version, ControlFlag, ContextBeadIdPtr, SizeByteVarPtr);
|
||||
}
|
||||
|
||||
#undef MbeadStream
|
||||
#define MbeadStream MbeadStreamCpp
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#if M_MIL_USE_64BIT
|
||||
#ifdef __cplusplus
|
||||
//////////////////////////////////////////////////////////////
|
||||
// M3dmapControl function definition when compiling c++ files
|
||||
//////////////////////////////////////////////////////////////
|
||||
#if !M_MIL_USE_LINUX
|
||||
inline void MbeadControl(MIL_ID ContextBeadId, MIL_INT LabelOrIndex, MIL_INT64 ControlType, int ControlValue)
|
||||
{
|
||||
MbeadControlInt64(ContextBeadId, LabelOrIndex, ControlType, ControlValue);
|
||||
};
|
||||
#endif
|
||||
inline void MbeadControl(MIL_ID ContextBeadId, MIL_INT LabelOrIndex, MIL_INT64 ControlType, MIL_INT32 ControlValue)
|
||||
{
|
||||
MbeadControlInt64(ContextBeadId, LabelOrIndex, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void MbeadControl(MIL_ID ContextBeadId, MIL_INT LabelOrIndex, MIL_INT64 ControlType, MIL_INT64 ControlValue)
|
||||
{
|
||||
MbeadControlInt64(ContextBeadId, LabelOrIndex, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void MbeadControl(MIL_ID ContextBeadId, MIL_INT LabelOrIndex, MIL_INT64 ControlType, MIL_DOUBLE ControlValue)
|
||||
{
|
||||
MbeadControlDouble(ContextBeadId, LabelOrIndex, ControlType, ControlValue);
|
||||
}
|
||||
#else
|
||||
//////////////////////////////////////////////////////////////
|
||||
// For C file, call the default function, i.e. Double one
|
||||
//////////////////////////////////////////////////////////////
|
||||
#define MbeadControl MbeadControlDouble
|
||||
|
||||
#endif // __cplusplus
|
||||
#endif // M_MIL_USE_64BIT
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// See milos.h for explanation about these functions.
|
||||
//////////////////////////////////////////////////////////////
|
||||
// -------------------------------------------------------------------------
|
||||
// MbeadGetResult
|
||||
inline void MFTYPE MbeadGetResultSafeType(MIL_ID ResultBeadId, MIL_INT LabelOrIndex, MIL_INT ResultIndex, MIL_INT64 ResultType, MilVoidPtr ResultArrayPtr)
|
||||
{
|
||||
MIL_INT64 RequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
if(!(M_DEFAULT_DATA_TYPE_BIT_SET(ResultType) || M_RECOMMENDED_DATA_TYPE_BIT_SET(ResultType)))
|
||||
{
|
||||
MbeadGetResult(ResultBeadId, LabelOrIndex, ResultIndex, ResultType | M_DEFAULT_DATA_TYPE, &RequiredParamType);
|
||||
}
|
||||
if(!MfuncPointerIsCompatible(RequiredParamType, ResultArrayPtr.Type, ResultType))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MbeadGetResult"));
|
||||
}
|
||||
MbeadGetResult(ResultBeadId, LabelOrIndex, ResultIndex, ResultType, ResultArrayPtr.Ptr);
|
||||
}
|
||||
|
||||
inline void MFTYPE MbeadGetResultUnsafe(MIL_ID ResultBeadId, MIL_INT LabelOrIndex, MIL_INT ResultIndex, MIL_INT64 ResultType, void *ResultArrayPtr)
|
||||
{
|
||||
MbeadGetResult(ResultBeadId, LabelOrIndex, ResultIndex, ResultType, ResultArrayPtr);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// MbeadInquire
|
||||
inline MIL_INT MFTYPE MbeadInquireSafeType(MIL_ID ContextOrResultBeadId, MIL_INT LabelOrIndex, MIL_INT64 InquireType, MilVoidPtr UserVarPtr)
|
||||
{
|
||||
MIL_INT64 RequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
if(!(M_DEFAULT_DATA_TYPE_BIT_SET(InquireType) || M_RECOMMENDED_DATA_TYPE_BIT_SET(InquireType)))
|
||||
{
|
||||
MbeadInquire(ContextOrResultBeadId, LabelOrIndex, InquireType | M_DEFAULT_DATA_TYPE, &RequiredParamType);
|
||||
}
|
||||
if(!MfuncPointerIsCompatible(RequiredParamType, UserVarPtr.Type, InquireType))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MbeadInquire"));
|
||||
}
|
||||
return MbeadInquire(ContextOrResultBeadId, LabelOrIndex, InquireType, UserVarPtr.Ptr);
|
||||
}
|
||||
|
||||
inline MIL_INT MFTYPE MbeadInquireUnsafe(MIL_ID ContextOrResultBeadId, MIL_INT LabelOrIndex, MIL_INT64 InquireType, void *UserVarPtr)
|
||||
{
|
||||
return MbeadInquire(ContextOrResultBeadId, LabelOrIndex, InquireType, UserVarPtr);
|
||||
}
|
||||
|
||||
#define MbeadGetResult MbeadGetResultSafeType
|
||||
#define MbeadInquire MbeadInquireSafeType
|
||||
|
||||
#else // #if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
#define MbeadGetResultUnsafe MbeadGetResult
|
||||
#define MbeadInquireUnsafe MbeadInquire
|
||||
|
||||
#endif // #if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// Overload for std::vector.
|
||||
#if defined(M_MIL_USE_VECTOR) && M_MIL_USE_VECTOR
|
||||
template <typename UserType>
|
||||
inline MIL_INT MFTYPE MbeadInquire(MIL_ID ContextOrResultBeadId, MIL_INT LabelOrIndex, MIL_INT64 InquireType, std::vector<UserType> &UserVarPtr)
|
||||
{
|
||||
// If the given MIL data type is not the same as the SrcType, change it to the correct one
|
||||
// and give a warning.
|
||||
MIL_INT64 InternalTrueDataTypeForStdVector = MilTraits<UserType>::TypeFlag;
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(M_GET_HLVLDATATYPE(InquireType) != 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MbeadInquire"), MIL_TEXT("Combination value for the required data type is not supported with std::vector overload."));
|
||||
}
|
||||
#endif
|
||||
|
||||
InquireType = M_STRIP_HLVLDATATYPE(InquireType) + InternalTrueDataTypeForStdVector;
|
||||
|
||||
MIL_INT InternalNumberOfElementsForStdVector = 0;
|
||||
MbeadInquire(ContextOrResultBeadId, LabelOrIndex, M_STRIP_HLVLDATATYPE(InquireType) + M_NB_ELEMENTS + M_TYPE_MIL_INT, &InternalNumberOfElementsForStdVector);
|
||||
|
||||
UserVarPtr.resize(InternalNumberOfElementsForStdVector);
|
||||
|
||||
if(InternalNumberOfElementsForStdVector > 0)
|
||||
{
|
||||
return MbeadInquire(ContextOrResultBeadId, LabelOrIndex, InquireType, &UserVarPtr[0]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
template <typename UserType>
|
||||
inline void MFTYPE MbeadGetResult(MIL_ID ResultBeadId, MIL_INT LabelOrIndex, MIL_INT ResultIndex, MIL_INT64 ResultType, std::vector<UserType> &ResultArrayPtr)
|
||||
{
|
||||
//! If the given MIL data type is not the same as the SrcType, change it to the correct one
|
||||
//! and give a warning.
|
||||
MIL_INT64 InternalTrueDataTypeForStdVector = MilTraits<UserType>::TypeFlag;
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(M_GET_HLVLDATATYPE(ResultType) != 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MbeadGetResult"), MIL_TEXT("Combination value for the required data type is not supported with std::vector overload."));
|
||||
}
|
||||
#endif
|
||||
|
||||
ResultType = M_STRIP_HLVLDATATYPE(ResultType) + InternalTrueDataTypeForStdVector;
|
||||
|
||||
MIL_INT InternalNumberOfElementsForStdVector = 0;
|
||||
MbeadGetResult(ResultBeadId, LabelOrIndex, ResultIndex, M_STRIP_HLVLDATATYPE(ResultType) + M_NB_ELEMENTS + M_TYPE_MIL_INT, &InternalNumberOfElementsForStdVector);
|
||||
|
||||
ResultArrayPtr.resize(InternalNumberOfElementsForStdVector);
|
||||
|
||||
if(InternalNumberOfElementsForStdVector > 0)
|
||||
{
|
||||
MbeadGetResult(ResultBeadId, LabelOrIndex, ResultIndex, ResultType, &ResultArrayPtr[0]);
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// Overloads for std::vector in MbeadTemplate.
|
||||
inline void MFTYPE MbeadTemplate(MIL_ID ContextBeadId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 BeadType,
|
||||
MIL_INT LabelOrIndex,
|
||||
MIL_INT GraListIdOrSizeOfArray,
|
||||
CMilArrayParamIn FirstArrayPtr,
|
||||
CMilArrayParamIn SecondArrayPtr,
|
||||
CMilArrayParamIn ThirdArrayPtr,
|
||||
MIL_INT64 ControlFlag)
|
||||
{
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(!FirstArrayPtr.IsValidParam() || !SecondArrayPtr.IsValidParam() || !ThirdArrayPtr.IsValidParam())
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MbeadTemplate"), MIL_TEXT("FirstArrayPtr, SecondArrayPtr or ThirdArrayPtr cannot be an non zero integer."));
|
||||
}
|
||||
if(GraListIdOrSizeOfArray <= 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MbeadTemplate"), MIL_TEXT("GraListIdOrSizeOfArray parameter must be greater than zero."));
|
||||
}
|
||||
if(!FirstArrayPtr.IsNullPtr() && FirstArrayPtr.GetMilDataType() != MilTraits<MIL_DOUBLE>::TypeFlag)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MbeadTemplate"), MIL_TEXT("The data type of FirstArrayPtr must be MIL_DOUBLE."));
|
||||
}
|
||||
if(!SecondArrayPtr.IsNullPtr() && SecondArrayPtr.GetMilDataType() != MilTraits<MIL_DOUBLE>::TypeFlag)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MbeadTemplate"), MIL_TEXT("The data type of SecondArrayPtr must be MIL_DOUBLE."));
|
||||
}
|
||||
if(!ThirdArrayPtr.IsNullPtr() && ThirdArrayPtr.GetMilDataType() != MilTraits<MIL_INT>::TypeFlag)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MbeadTemplate"), MIL_TEXT("The data type of ThirdArrayPtr must be MIL_INT."));
|
||||
}
|
||||
if((FirstArrayPtr.Size<MIL_DOUBLE>() != SecondArrayPtr.Size<MIL_DOUBLE>() && !FirstArrayPtr.IsNullPtr() && !SecondArrayPtr.IsNullPtr()) ||
|
||||
(FirstArrayPtr.Size<MIL_DOUBLE>() != ThirdArrayPtr.Size<MIL_INT>() && !FirstArrayPtr.IsNullPtr() && !ThirdArrayPtr.IsNullPtr()) ||
|
||||
(SecondArrayPtr.Size<MIL_DOUBLE>() != ThirdArrayPtr.Size<MIL_INT>() && !SecondArrayPtr.IsNullPtr() && !ThirdArrayPtr.IsNullPtr()))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MbeadTemplate"), MIL_TEXT("The input vectors must have the same size!"));
|
||||
}
|
||||
if(FirstArrayPtr.IsEmpty<MIL_DOUBLE>() || SecondArrayPtr.IsEmpty<MIL_DOUBLE>() || ThirdArrayPtr.IsEmpty<MIL_INT>())
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MbeadTemplate"), MIL_TEXT("The input vectors cannot be empty."));
|
||||
}
|
||||
#endif
|
||||
|
||||
MIL_INT GraListIdOrSizeOfArrayMax = !FirstArrayPtr.IsNullPtr() ? FirstArrayPtr.Size<MIL_DOUBLE>() :
|
||||
!SecondArrayPtr.IsNullPtr() ? SecondArrayPtr.Size<MIL_DOUBLE>() :
|
||||
!ThirdArrayPtr.IsNullPtr() ? ThirdArrayPtr.Size<MIL_INT>() : M_NULL;
|
||||
|
||||
if(GraListIdOrSizeOfArray == M_DEFAULT || GraListIdOrSizeOfArray > GraListIdOrSizeOfArrayMax)
|
||||
{
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(GraListIdOrSizeOfArray > GraListIdOrSizeOfArrayMax && GraListIdOrSizeOfArray != M_DEFAULT)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MbeadTemplate"), MIL_TEXT("GraListIdOrSizeOfArray parameter must be smaller or equal (M_DEFAULT) to the size of input vectors."));
|
||||
}
|
||||
#endif
|
||||
GraListIdOrSizeOfArray = GraListIdOrSizeOfArrayMax;
|
||||
}
|
||||
|
||||
MbeadTemplate(ContextBeadId,
|
||||
Operation,
|
||||
BeadType,
|
||||
LabelOrIndex,
|
||||
GraListIdOrSizeOfArray,
|
||||
FirstArrayPtr.GetData<MIL_DOUBLE>(),
|
||||
SecondArrayPtr.GetData<MIL_DOUBLE>(),
|
||||
ThirdArrayPtr.GetData<MIL_INT>(),
|
||||
ControlFlag);
|
||||
}
|
||||
inline void MFTYPE MbeadTemplate(MIL_ID ContextBeadId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 BeadType,
|
||||
MIL_INT LabelOrIndex,
|
||||
MIL_INT GraListIdOrSizeOfArray,
|
||||
CMilArrayParamIn FirstArrayPtr,
|
||||
CMilArrayParamIn SecondArrayPtr,
|
||||
const MIL_INT* ThirdArrayPtr,
|
||||
MIL_INT64 ControlFlag)
|
||||
{
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(!FirstArrayPtr.IsValidParam() || !SecondArrayPtr.IsValidParam())
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MbeadTemplate"), MIL_TEXT("FirstArrayPtr or SecondArrayPtr cannot be an non zero integer."));
|
||||
}
|
||||
if(GraListIdOrSizeOfArray <= 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MbeadTemplate"), MIL_TEXT("GraListIdOrSizeOfArray parameter must be greater than zero."));
|
||||
}
|
||||
if(!FirstArrayPtr.IsNullPtr() && FirstArrayPtr.GetMilDataType() != MilTraits<MIL_DOUBLE>::TypeFlag)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MbeadTemplate"), MIL_TEXT("The data type of FirstArrayPtr must be MIL_DOUBLE."));
|
||||
}
|
||||
if(!SecondArrayPtr.IsNullPtr() && SecondArrayPtr.GetMilDataType() != MilTraits<MIL_DOUBLE>::TypeFlag)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MbeadTemplate"), MIL_TEXT("The data type of SecondArrayPtr must be MIL_DOUBLE."));
|
||||
}
|
||||
if(FirstArrayPtr.Size<MIL_DOUBLE>() != SecondArrayPtr.Size<MIL_DOUBLE>() && !FirstArrayPtr.IsNullPtr() && !SecondArrayPtr.IsNullPtr())
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MbeadTemplate"), MIL_TEXT("The input vectors must have the same size!"));
|
||||
}
|
||||
if(FirstArrayPtr.IsEmpty<MIL_DOUBLE>() || SecondArrayPtr.IsEmpty<MIL_DOUBLE>())
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MbeadTemplate"), MIL_TEXT("The input vectors cannot be empty."));
|
||||
}
|
||||
#endif
|
||||
|
||||
MIL_INT GraListIdOrSizeOfArrayMax = !FirstArrayPtr.IsNullPtr() ? FirstArrayPtr.Size<MIL_DOUBLE>() :
|
||||
!SecondArrayPtr.IsNullPtr() ? SecondArrayPtr.Size<MIL_DOUBLE>() : M_NULL;
|
||||
|
||||
if(GraListIdOrSizeOfArray == M_DEFAULT || GraListIdOrSizeOfArray > GraListIdOrSizeOfArrayMax)
|
||||
{
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(GraListIdOrSizeOfArray > GraListIdOrSizeOfArrayMax && GraListIdOrSizeOfArray != M_DEFAULT)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MbeadTemplate"), MIL_TEXT("GraListIdOrSizeOfArray parameter must be smaller or equal (M_DEFAULT) to the size of input vectors."));
|
||||
}
|
||||
#endif
|
||||
GraListIdOrSizeOfArray = GraListIdOrSizeOfArrayMax;
|
||||
}
|
||||
|
||||
MbeadTemplate(ContextBeadId,
|
||||
Operation,
|
||||
BeadType,
|
||||
LabelOrIndex,
|
||||
GraListIdOrSizeOfArray,
|
||||
FirstArrayPtr.GetData<MIL_DOUBLE>(),
|
||||
SecondArrayPtr.GetData<MIL_DOUBLE>(),
|
||||
ThirdArrayPtr,
|
||||
ControlFlag);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// Overloads for std::vector in MxxxStream.
|
||||
inline void MFTYPE MbeadStream(std::vector<MIL_UINT8> &MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* McontextIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
MxxxStreamForStdVector(MemPtrOrFileName,
|
||||
SysId,
|
||||
Operation,
|
||||
StreamType,
|
||||
Version,
|
||||
ControlFlag,
|
||||
McontextIdPtr,
|
||||
SizeByteVarPtr,
|
||||
MbeadStream);
|
||||
}
|
||||
#endif // defined(M_MIL_USE_VECTOR) && M_MIL_USE_VECTOR
|
||||
|
||||
#if M_MIL_USE_STRING
|
||||
/***************************************************************************/
|
||||
/* BEAD MODULE */
|
||||
/***************************************************************************/
|
||||
|
||||
#if M_MIL_USE_UNICODE
|
||||
#if M_MIL_UNICODE_API
|
||||
|
||||
inline void MFTYPE MbeadSaveW(const MIL_STRING& FileName, MIL_ID ContextBeadId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return MbeadSaveW(FileName.c_str(), ContextBeadId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE MbeadRestoreW(const MIL_STRING& sFileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* ContextBeadIdPtr)
|
||||
{
|
||||
return MbeadRestoreW(sFileName.c_str(), SysId, ControlFlag, ContextBeadIdPtr);
|
||||
}
|
||||
|
||||
#else
|
||||
inline void MFTYPE MbeadSaveA(const MIL_STRING& FileName, MIL_ID ContextBeadId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return MbeadSaveA(FileName.c_str(), ContextBeadId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE MbeadRestoreA(const MIL_STRING& sFileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* ContextBeadIdPtr)
|
||||
{
|
||||
return MbeadRestoreA(sFileName.c_str(), SysId, ControlFlag, ContextBeadIdPtr);
|
||||
}
|
||||
|
||||
#endif /* M_MIL_UNICODE_API */
|
||||
#else
|
||||
inline void MFTYPE MbeadSave(const MIL_STRING& FileName, MIL_ID ContextBeadId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return MbeadSave(FileName.c_str(), ContextBeadId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE MbeadRestore(const MIL_STRING& sFileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* ContextBeadIdPtr)
|
||||
{
|
||||
return MbeadRestore(sFileName.c_str(), SysId, ControlFlag, ContextBeadIdPtr);
|
||||
}
|
||||
|
||||
#endif /* M_MIL_USE_UNICODE */
|
||||
#endif /* M_MIL_USE_STRING*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// MIL_UNIQUE_ID support
|
||||
|
||||
#if M_MIL_USE_MIL_UNIQUE_ID
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
template <> inline bool MilIsCorrectObjectType<&MbeadFree>(MIL_INT64 ObjectType)
|
||||
{
|
||||
return (ObjectType & ~M_USER_DEFINE_LOW_ATTRIBUTE) == M_BEAD_OBJECT;
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef MIL_UNIQUE_ID<&MbeadFree> MIL_UNIQUE_BEAD_ID;
|
||||
|
||||
#if M_MIL_USE_MOVE_SEMANTICS
|
||||
|
||||
inline MIL_UNIQUE_BEAD_ID MbeadAlloc(MIL_ID SysId, MIL_INT64 Strategy, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_BEAD_ID(MbeadAlloc(SysId, Strategy, ControlFlag, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_BEAD_ID MbeadAllocResult(MIL_ID SysId, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_BEAD_ID(MbeadAllocResult(SysId, ControlFlag, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_BEAD_ID MbeadRestore(MIL_CONST_TEXT_PTR FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_BEAD_ID(MbeadRestore(FileName, SysId, ControlFlag, M_NULL));
|
||||
}
|
||||
#if M_MIL_USE_STRING
|
||||
inline MIL_UNIQUE_BEAD_ID MbeadRestore(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_BEAD_ID(MbeadRestore(FileName, SysId, ControlFlag, M_NULL));
|
||||
}
|
||||
#endif // M_MIL_USE_STRING
|
||||
template <MilFreeFuncType FreeFunc> inline void MbeadFree(const MIL_UNIQUE_ID<FreeFunc>&) = delete;
|
||||
|
||||
inline void MbeadStream(MilStreamParam MemPtrOrFileName,
|
||||
MIL_ID SysId ,
|
||||
MIL_INT64 Operation ,
|
||||
MIL_INT64 StreamType ,
|
||||
MIL_DOUBLE Version ,
|
||||
MIL_INT64 ControlFlag ,
|
||||
MIL_UNIQUE_BEAD_ID* ContextBeadIdPtr,
|
||||
MIL_INT* SizeByteVarPtr )
|
||||
{
|
||||
MxxxStreamForMilUniqueId(MemPtrOrFileName, SysId, Operation, StreamType, Version, ControlFlag, ContextBeadIdPtr, SizeByteVarPtr, MbeadStream);
|
||||
}
|
||||
|
||||
#endif // M_MIL_USE_MOVE_SEMANTICS
|
||||
#endif // M_MIL_USE_MIL_UNIQUE_ID
|
||||
|
||||
// End of MIL_UNIQUE_ID support
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif // !M_MIL_LITE
|
||||
#endif // __MIL_BEAD_H__
|
||||
1261
Include/ClassicMIL/MILDyn/milblob.h
Normal file
1261
Include/ClassicMIL/MILDyn/milblob.h
Normal file
File diff suppressed because it is too large
Load Diff
1444
Include/ClassicMIL/MILDyn/milcal.h
Normal file
1444
Include/ClassicMIL/MILDyn/milcal.h
Normal file
File diff suppressed because it is too large
Load Diff
2256
Include/ClassicMIL/MILDyn/milclass.h
Normal file
2256
Include/ClassicMIL/MILDyn/milclass.h
Normal file
File diff suppressed because it is too large
Load Diff
1739
Include/ClassicMIL/MILDyn/milcode.h
Normal file
1739
Include/ClassicMIL/MILDyn/milcode.h
Normal file
File diff suppressed because it is too large
Load Diff
893
Include/ClassicMIL/MILDyn/milcolor.h
Normal file
893
Include/ClassicMIL/MILDyn/milcolor.h
Normal file
@ -0,0 +1,893 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//!
|
||||
//! \file milcolor.h
|
||||
//!
|
||||
//! \brief This file contains the defines and the prototypes for the
|
||||
//! MIL color module. (Mcol...).
|
||||
//!
|
||||
//! AUTHOR: Matrox Imaging
|
||||
//!
|
||||
//! COPYRIGHT NOTICE:
|
||||
//! Copyright © Matrox Electronic Systems Ltd., 1992-2023.
|
||||
//! All Rights Reserved
|
||||
// Revision: 10.60.0776
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __MILCOLOR_H__
|
||||
#define __MILCOLOR_H__
|
||||
|
||||
#if (!M_MIL_LITE) // MIL FULL ONLY
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/***************************************************************************/
|
||||
/* MilColor CAPI defines */
|
||||
/***************************************************************************/
|
||||
#define M_CONTEXT 0x08000000L // Already defined in milmod.h, milreg.h, milstr.h, milocr.h
|
||||
#define M_GENERAL 0x20000000L // Already defined in milmod.h, milreg.h, milstr.h, milocr.h
|
||||
#define M_ALL 0x40000000L // Already defined in milmod.h, milmeas.h, milocr.h, milpat.h, mil.h, miledge.h
|
||||
|
||||
// High level result types modifiers
|
||||
#define M_AVAILABLE MAKE_INT64(0x0000400000000000) // Also defined in mil.h
|
||||
#define M_SUPPORTED MAKE_INT64(0x0000800000000000) // Also defined in mil.h
|
||||
|
||||
// Allocation Macros
|
||||
#define M_SAMPLE_LABEL_TAG 0x01000000L // must not clash with M_ALL, M_GENERAL, M_CONTEXT
|
||||
#define M_SAMPLE_INDEX_TAG 0x02000000L // must not clash with M_ALL, M_GENERAL, M_CONTEXT
|
||||
#define M_COLOR_ITEM_TAG 0x04000000L
|
||||
|
||||
#define M_SAMPLE_LABEL(lbl) ((lbl) | M_SAMPLE_LABEL_TAG)
|
||||
#define M_SAMPLE_INDEX(idx) ((idx) | M_SAMPLE_INDEX_TAG)
|
||||
#define M_SAMPLE_LABEL_ITEM(lbl, subidx) ((lbl | (subidx << 12)) | M_COLOR_ITEM_TAG | M_SAMPLE_LABEL_TAG)
|
||||
#define M_SAMPLE_INDEX_ITEM(idx, subidx) ((idx | (subidx << 12)) | M_COLOR_ITEM_TAG | M_SAMPLE_INDEX_TAG)
|
||||
|
||||
// Define reference sample info. for color calibration.
|
||||
#define M_REFERENCE_SAMPLE_INDEX 0x00000FFEL // used in color calibration (value = LAST_VALID_SAMPLE_INDEX_CALIBRATION)
|
||||
#define M_REFERENCE_SAMPLE_LABEL 0x00000FFFL // used in color calibration (value = LAST_VALID_SAMPLE_LABEL_CALIBRATION)
|
||||
#define M_REFERENCE_SAMPLE M_SAMPLE_LABEL(M_REFERENCE_SAMPLE_LABEL) // used in color calibration
|
||||
#define M_REFERENCE_SAMPLE_ITEM(subidx) ((M_REFERENCE_SAMPLE_LABEL | (subidx << 12)) | M_COLOR_ITEM_TAG | M_SAMPLE_LABEL_TAG)
|
||||
|
||||
// Color Macros
|
||||
#define M_COLOR888(Component0, Component1, Component2) M_RGB888(Component0, Component1, Component2)
|
||||
|
||||
// Allocation Flag
|
||||
#define M_COLOR_MATCHING_RESULT 0x00001000L // used in McolAllocResult
|
||||
#define M_COLOR_MATCHING 0x00000100L // used in McolAlloc
|
||||
#define M_COLOR_PROJECTION 0x00000200L // used in McolAlloc
|
||||
#define M_COLOR_CALIBRATION_RELATIVE 0x00000400L // used in McolAlloc
|
||||
|
||||
// Control Flags for Context
|
||||
#define M_CONTEXT_TYPE 162
|
||||
#define M_DISTANCE_TYPE 1L // used in matching context (read-only)
|
||||
#define M_PREPROCESSED 14L // used in matching context *also defined in milpat.h, milmod.h, milmetrol.h, milstr.h
|
||||
#define M_DISTANCE_TOLERANCE_MODE 20L // used in matching context
|
||||
#define M_DISTANCE_TOLERANCE_METHOD M_DISTANCE_TOLERANCE_MODE // keep synonym because PP1 EA released (TBR in MIL10)
|
||||
#define M_OUTLIER_LABEL 30L // used in matching context
|
||||
#define M_OUTLIER_DRAW_COLOR 31L // used in matching context
|
||||
#define M_BACKGROUND_DRAW_COLOR 32L // used in matching context
|
||||
#define M_NUMBER_OF_SAMPLES 35L // used in matching context
|
||||
#define M_CONVERSION_MODE 40L // used in matching context (read-only)
|
||||
#define M_PRECONVERT_MODE M_CONVERSION_MODE // keep synonym because PP1 EA released (TBR in MIL10)
|
||||
#define M_MATCH_MODE 50L // used in matching context (read-only)
|
||||
#define M_MATCH_METHOD M_MATCH_MODE // keep synonym because PP1 EA released (TBR in MIL10)
|
||||
#define M_BAND_MODE 90L // used in matching context
|
||||
#define M_ACCEPTANCE 200L // used in matching context *also used in milpat.h, milmod.h
|
||||
#define M_ACCEPTANCE_RELEVANCE 202L // used in matching context
|
||||
#define M_RELEVANCE_ACCEPTANCE M_ACCEPTANCE_RELEVANCE // keep synonym because PP1 EA released (TBR in MIL10)
|
||||
#define M_TIE_EPSILON 205L // used in matching context
|
||||
#define M_SAMPLE_BUFFER_FORMAT 210L // used in matching context *undocumented internal flag
|
||||
#define M_DISTANCE_IMAGE_NORMALIZE 215L // used in matching context and matching result
|
||||
#define M_DISTANCE_PARAM_1 221L // used in matching context
|
||||
#define M_DISTANCE_PARAM_2 222L // used in matching context
|
||||
#define M_DISTANCE_PARAM_3 223L // used in matching context
|
||||
#define M_DISTANCE_PARAM_4 224L // used in matching context
|
||||
#define M_DISTANCE_PARAM_5 225L // used in matching context
|
||||
#define M_ENCODING 0x00008005L // used in matching context *also used in milstr.h, milcode.h
|
||||
#define M_CONVERSION_GAMMA 226L // used in matching context
|
||||
#define M_PRECONVERT_GAMMA M_CONVERSION_GAMMA // keep synonym because PP1 EA released (TBR in MIL10)
|
||||
#define M_NB_BINS_BAND_0 1420L // used in matching context
|
||||
#define M_NB_BINS_BAND_1 1421L // used in matching context
|
||||
#define M_NB_BINS_BAND_2 1422L // used in matching context
|
||||
#define M_KERNEL_SIZE 301L // used in matching context *also used in miledge.h, milmod.h
|
||||
#define M_CALIBRATION_MODE 205L // used in color calibration context * also used in milcal.h
|
||||
#define M_CALIBRATION_INTENT 1874L // used in color calibration context
|
||||
#define M_CALIBRATION_COMPUTE_OPTION 1878L // used in color calibration context
|
||||
#define M_COLOR_CALIBRATION_COMPUTE_OPTION M_CALIBRATION_COMPUTE_OPTION
|
||||
|
||||
|
||||
// Encoding controls per-band
|
||||
#define M_SCALE_BAND_0 241L // used in matching context
|
||||
#define M_SCALE_BAND_1 242L // used in matching context
|
||||
#define M_SCALE_BAND_2 243L // used in matching context
|
||||
#define M_OFFSET_BAND_0 244L // used in matching context
|
||||
#define M_OFFSET_BAND_1 245L // used in matching context
|
||||
#define M_OFFSET_BAND_2 246L // used in matching context
|
||||
// Internal controls
|
||||
#define M_SCORE_MAX_DIST_PARAM 250L // used in matching context
|
||||
#define M_SCORE_K_PARAM 252L // used in matching context
|
||||
#define M_TRIPLET_ITEM_SIZE 1624L // used for draw of sample mosaic
|
||||
|
||||
// Controls for output images (read-only)
|
||||
// --> To be deprecated !
|
||||
#define M_LABEL_PIXEL_IMAGE_SIZE_BIT 352L // used in matching result and matching context
|
||||
#define M_LABEL_AREA_IMAGE_SIZE_BIT 372L // used in matching result and matching context
|
||||
// <--
|
||||
|
||||
// Alloc-time controls (read-only)
|
||||
#define M_COLOR_SPACE 230L // used in matching context (read-only)
|
||||
|
||||
// Supported color spaces
|
||||
#define M_RGB 8L // used in McolAlloc *also defined in mil.h
|
||||
#define M_CIELAB 41L // used in McolAlloc
|
||||
#define M_HSL 2L // used in McolAlloc
|
||||
#define M_YUV 4L // used in McolAlloc *also defined in mil.h
|
||||
|
||||
// Control/Inquire Flags for Samples
|
||||
#define M_SAMPLE_8BIT_AVERAGE_COLOR_BAND_0 1424L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_8BIT_AVERAGE_COLOR_BAND_1 1425L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_8BIT_AVERAGE_COLOR_BAND_2 1426L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_AVERAGE_COLOR_BAND_0 1427L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_AVERAGE_COLOR_BAND_1 1428L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_AVERAGE_COLOR_BAND_2 1429L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_PCA_VECTOR1_1 1430L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_PCA_VECTOR1_2 1431L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_PCA_VECTOR1_3 1432L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_PCA_VECTOR2_1 1433L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_PCA_VECTOR2_2 1434L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_PCA_VECTOR2_3 1435L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_PCA_VECTOR3_1 1436L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_PCA_VECTOR3_2 1437L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_PCA_VECTOR3_3 1438L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_PCA_VAR1 1439L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_PCA_VAR2 1440L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_PCA_VAR3 1441L // used in inquiring samples (read-only)
|
||||
#define M_DISTANCE_TOLERANCE 120L // used in matching samples
|
||||
#define M_SAMPLE_TYPE 121L // used in matching samples (read-only)
|
||||
#define M_SAMPLE_IMAGE_SIZE_X 122L // used in matching samples (read-only)
|
||||
#define M_SAMPLE_IMAGE_SIZE_Y 123L // used in matching samples (read-only)
|
||||
#define M_SAMPLE_IMAGE_SIZE_BIT 124L // used in matching samples (read-only)
|
||||
#define M_SAMPLE_IMAGE_SIZE_BAND 125L // used in matching samples (read-only)
|
||||
#define M_SAMPLE_IMAGE_SIGN 126L // used in matching samples (read-only)
|
||||
#define M_SAMPLE_IMAGE_TYPE 127L // used in matching samples (read-only)
|
||||
#define M_SAMPLE_MASK_SIZE_X 128L // used in matching samples (read-only)
|
||||
#define M_SAMPLE_MASK_SIZE_Y 129L // used in matching samples (read-only)
|
||||
#define M_SAMPLE_MASK_SIZE_BIT 130L // used in matching samples (read-only)
|
||||
#define M_SAMPLE_MASK_SIZE_BAND 131L // used in matching samples (read-only)
|
||||
#define M_SAMPLE_MASK_SIGN 132L // used in matching samples (read-only)
|
||||
#define M_SAMPLE_MASK_TYPE 133L // used in matching samples (read-only)
|
||||
#define M_SAMPLE_MASKED 135L // used in matching samples (read-only)
|
||||
#define M_SAMPLE_COLOR_BAND_0 140L // used in matching samples (read-only)
|
||||
#define M_SAMPLE_COLOR_BAND_1 141L // used in matching samples (read-only)
|
||||
#define M_SAMPLE_COLOR_BAND_2 142L // used in matching samples (read-only)
|
||||
#define M_MATCH_SAMPLE_COLOR_BAND_0 145L // used in matching samples (read-only)
|
||||
#define M_MATCH_SAMPLE_COLOR_BAND_1 146L // used in matching samples (read-only)
|
||||
#define M_MATCH_SAMPLE_COLOR_BAND_2 147L // used in matching samples (read-only)
|
||||
#define M_NUMBER_OF_COLOR_ITEMS 1585L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_MOSAIC_SIZE_X 1610L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_MOSAIC_SIZE_Y 1611L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_MOSAIC_SIZE_BIT 1612L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_MOSAIC_SIZE_BAND 1613L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_MOSAIC_SIGN 1614L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_MOSAIC_TYPE 1615L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_MOSAIC_DONT_CARE_SIZE_X 1616L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_MOSAIC_DONT_CARE_SIZE_Y 1617L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_MOSAIC_DONT_CARE_SIZE_BIT 1618L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_MOSAIC_DONT_CARE_SIZE_BAND 1619L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_MOSAIC_DONT_CARE_SIGN 1620L // used in inquiring samples (read-only)
|
||||
#define M_SAMPLE_MOSAIC_DONT_CARE_TYPE 1621L // used in inquiring samples (read-only)
|
||||
#define M_HISTOGRAM_FREQUENCY_THRESHOLD 1627L // used in matching samples
|
||||
|
||||
// Control/Inquire Flags for Context
|
||||
#define M_SAMPLE_LUT_SIZE_X 150L // used in matching context (read-only)
|
||||
#define M_SAMPLE_LUT_SIZE_Y 151L // used in matching context (read-only)
|
||||
#define M_SAMPLE_LUT_SIZE_BIT 152L // used in matching context (read-only)
|
||||
#define M_SAMPLE_LUT_SIZE_BAND 153L // used in matching context (read-only)
|
||||
#define M_SAMPLE_LUT_SIGN 154L // used in matching context (read-only)
|
||||
#define M_SAMPLE_LUT_TYPE 155L // used in matching context (read-only)
|
||||
#define M_SAMPLE_ABSOLUTE_TOLERANCE 160L // used in matching context (read-only)
|
||||
#define M_PIXEL_SCORE_TOLERANCE 1442L // used in matching context
|
||||
#define M_NUMBER_OF_TRANSFORM 1491L // used in calibration context (read-only)
|
||||
|
||||
// Control Values
|
||||
#define M_NONE 0x08000000L // value for M_CONVERSION_MODE *also defined in milcal.h,
|
||||
#define M_EUCLIDEAN 2L // value for M_DISTANCE_TYPE
|
||||
#define M_MANHATTAN 3L // value for M_DISTANCE_TYPE
|
||||
#define M_DELTA_E 4L // value for M_DISTANCE_TYPE
|
||||
#define M_MAHALANOBIS_SAMPLE 5L // value for M_DISTANCE_TYPE
|
||||
#define M_ANGULAR 5470 // value for M_DISTANCE_TYPE
|
||||
#define M_MAHALANOBIS M_MAHALANOBIS_SAMPLE
|
||||
#define M_MAHALANOBIS_TARGET 8L // value for M_DISTANCE_TYPE
|
||||
#define M_EUCLIDEAN_SQR 22L // value for M_DISTANCE_TYPE
|
||||
#define M_MANHATTAN_SQR 23L // value for M_DISTANCE_TYPE
|
||||
#define M_DELTA_E_SQR 24L // value for M_DISTANCE_TYPE
|
||||
#define M_MAHALANOBIS_SAMPLE_SQR 25L // value for M_DISTANCE_TYPE
|
||||
#define M_MAHALANOBIS_TARGET_SQR 28L // value for M_DISTANCE_TYPE
|
||||
#define M_ABSOLUTE 1L // value for M_DISTANCE_TOLERANCE_MODE *also defined in milpat.h,
|
||||
#define M_RELATIVE 21L // value for M_DISTANCE_TOLERANCE_MODE
|
||||
#define M_SAMPLE_STDDEV 33L // value for M_DISTANCE_TOLERANCE_MODE
|
||||
#define M_AUTO 444L // value for M_DISTANCE_TOLERANCE *also defined in miledge.h, milmetrol.h, milmod.h, milocr.h
|
||||
#define M_NONE 0x08000000L // value for M_CONVERSION_MODE *also defined in milstr.h, milcal.h
|
||||
#define M_CIELAB 41L // value for M_CONVERSION_MODE
|
||||
#define M_MIN_DIST_VOTE 51L // value for M_MATCH_MODE
|
||||
#define M_STAT_MIN_DIST 52L // value for M_MATCH_MODE
|
||||
#define M_HISTOGRAM_MATCHING 1443L // value for M_MATCH_MODE
|
||||
#define M_HISTOGRAM_VOTE 1626L // value for M_MATCH_MODE
|
||||
#define M_HISTOGRAM_CLASSIFY_PIXEL 1444L // value for M_MATCH_MODE
|
||||
#define M_ALL_BAND -1L // value for M_BAND_MODE *also defined in MIL.H
|
||||
#define M_ALL_BANDS M_ALL_BAND // value for M_BAND_MODE *also defined in MIL.H
|
||||
#define M_TRANSPARENT 0x01000059L // value for M_BACKGROUND_DRAW_COLOR *also defined in MIL.H
|
||||
#define M_CIELCH 1468L // value for M_CONVERSION_MODE
|
||||
#define M_CMC_PERCEPTIBILITY 1469L // value for M_DISTANCE_TYPE
|
||||
#define M_CMC_ACCEPTABILITY 1470L // value for M_DISTANCE_TYPE
|
||||
#define M_CIE94_GRAPHIC_ARTS 1471L // value for M_DISTANCE_TYPE
|
||||
#define M_CIEDE94_GRAPHIC_ARTS M_CIE94_GRAPHIC_ARTS // old erroneous name released in 9.0 PP2, kept for backward compatibility (TBR in MIL10)
|
||||
#define M_CIE94_TEXTILE 1472L // value for M_DISTANCE_TYPE
|
||||
#define M_CIEDE94_TEXTILE M_CIE94_TEXTILE // old erroneous name released in 9.0 PP2, kept for backward compatibility (TBR in MIL10)
|
||||
#define M_CIEDE2000 1473L // value for M_DISTANCE_TYPE
|
||||
#define M_CMC_PERCEPTIBILITY_SQR 1474L // value for M_DISTANCE_TYPE
|
||||
#define M_CMC_ACCEPTABILITY_SQR 1475L // value for M_DISTANCE_TYPE
|
||||
#define M_CIE94_GRAPHIC_ARTS_SQR 1476L // value for M_DISTANCE_TYPE
|
||||
#define M_CIEDE94_GRAPHIC_ARTS_SQR M_CIE94_GRAPHIC_ARTS_SQR // old erroneous name released in 9.0 PP2, kept for backward compatibility (TBR in MIL10)
|
||||
#define M_CIE94_TEXTILE_SQR 1477L // value for M_DISTANCE_TYPE
|
||||
#define M_CIEDE94_TEXTILE_SQR M_CIE94_TEXTILE_SQR // old erroneous name released in 9.0 PP2, kept for backward compatibility (TBR in MIL10)
|
||||
#define M_CIEDE2000_SQR 1478L // value for M_DISTANCE_TYPE
|
||||
#define M_COLOR_TO_COLOR 1479L // value for M_CALIBRATION_MODE
|
||||
#define M_HISTOGRAM_BASED 1480L // value for M_CALIBRATION_MODE
|
||||
#define M_GLOBAL_MEAN_VARIANCE 1481L // value for M_CALIBRATION_MODE
|
||||
#define M_PRECISION 1482L // value for M_CALIBRATION_INTENT
|
||||
#define M_BALANCE 1483L // value for M_CALIBRATION_INTENT
|
||||
#define M_GENERALIZATION 1484L // value for M_CALIBRATION_INTENT
|
||||
#define M_COMPUTE_ITEM_STAT 1491L // value for M_COLOR_TO_COLOR
|
||||
#define M_COMPUTE_ITEM_PIXELS 1492L // value for M_COLOR_TO_COLOR
|
||||
|
||||
// To work independently from RGB space we define new names for bands
|
||||
#define M_COLOR_BAND_0 0x00000100 // value for M_BAND_MODE & McolDistance
|
||||
#define M_COLOR_BAND_1 0x00000200 // value for M_BAND_MODE & McolDistance
|
||||
#define M_COLOR_BAND_2 0x00000400 // value for M_BAND_MODE & McolDistance
|
||||
#define M_MAX_NORMALIZE 0 // value for M_DISTANCE_IMAGE_NORMALIZE
|
||||
#define M_NO_NORMALIZE -1.0 // value for M_DISTANCE_IMAGE_NORMALIZE
|
||||
// Encodings
|
||||
#define M_ENCODING_START 60L
|
||||
#define M_8BIT M_ENCODING_START+8L // used in matching context
|
||||
#define M_10BIT M_ENCODING_START+10L // used in matching context
|
||||
#define M_12BIT M_ENCODING_START+12L // used in matching context
|
||||
#define M_14BIT M_ENCODING_START+14L // used in matching context
|
||||
#define M_16BIT M_ENCODING_START+16L // used in matching context
|
||||
#define M_USER_DEFINED 21L // used in matching context *also defined in MIL.H
|
||||
|
||||
// Control/Inquire Flags for Matching Result
|
||||
#define M_GENERATE_PIXEL_MATCH 300L // used in matching result
|
||||
#define M_GENERATE_SAMPLE_COLOR_LUT 305L // used in matching result
|
||||
#define M_GENERATE_DISTANCE_IMAGE 310L // used in matching result
|
||||
#define M_SAVE_AREA_IMAGE 315L // used in matching result
|
||||
|
||||
#if OldDefinesSupport
|
||||
#define M_DRAW_RELATIVE_ORIGIN_X 319L // deprecated : Use MgraControl(... M_DRAW_OFFSET_X...)
|
||||
#define M_DRAW_RELATIVE_ORIGIN_Y 320L // deprecated : Use MgraControl(... M_DRAW_OFFSET_Y...)
|
||||
// MIL_DEPRECATED(M_DRAW_RELATIVE_ORIGIN_X, 1010) Already defined in mil.h
|
||||
// MIL_DEPRECATED(M_DRAW_RELATIVE_ORIGIN_Y, 1010) Already defined in mil.h
|
||||
#endif
|
||||
|
||||
#define M_DISTANCE_IMAGE_NORMALIZE 215L // used in matching context and macthing result
|
||||
// --> To be deprecated in MIL10.0
|
||||
#define M_GENERATE_LABEL_PIXEL_IMAGE M_GENERATE_PIXEL_MATCH
|
||||
// <--
|
||||
|
||||
|
||||
// Result type Flag for Matching Result
|
||||
#define M_AREA_IMAGE_SIZE_X 330L // used in matching result
|
||||
#define M_AREA_IMAGE_SIZE_Y 331L // used in matching result
|
||||
#define M_AREA_IMAGE_SIZE_BIT 332L // used in matching result
|
||||
#define M_AREA_IMAGE_SIZE_BAND 333L // used in matching result // (TBR: confusing, can't we just assume 1-band?)
|
||||
#define M_AREA_IMAGE_SIGN 334L // used in matching result
|
||||
#define M_AREA_IMAGE_TYPE 335L // used in matching result
|
||||
|
||||
#define M_DISTANCE_IMAGE_SIZE_X 340L // used in matching result
|
||||
#define M_DISTANCE_IMAGE_SIZE_Y 341L // used in matching result
|
||||
#define M_DISTANCE_IMAGE_SIZE_BIT 342L // used in matching result
|
||||
#define M_DISTANCE_IMAGE_SIZE_BAND 343L // used in matching result // (TBR: confusing, can't we just assume 1-band?)
|
||||
#define M_DISTANCE_IMAGE_SIGN 344L // used in matching result
|
||||
#define M_DISTANCE_IMAGE_TYPE 345L // used in matching result
|
||||
|
||||
#define M_PIXEL_MATCH_IMAGE_SIZE_X 1447L // used in matching result
|
||||
#define M_PIXEL_MATCH_IMAGE_SIZE_Y 1448L // used in matching result
|
||||
#define M_AREA_MATCH_IMAGE_SIZE_X 1449L // used in matching result
|
||||
#define M_AREA_MATCH_IMAGE_SIZE_Y 1450L // used in matching result
|
||||
#define M_SAMPLE_LABEL_SIZE_BIT 1451L // used in matching result and matching context
|
||||
#define M_SAMPLE_LABEL_SIZE_BAND 1452L // used in matching result // (TBR: confusing, can't we just assume 1-band?)
|
||||
#define M_SAMPLE_LABEL_SIGN 1453L // used in matching result
|
||||
#define M_SAMPLE_LABEL_TYPE 1454L // used in matching result
|
||||
#define M_SAMPLE_COLOR_SIZE_BIT 1455L // used in matching result
|
||||
#define M_SAMPLE_COLOR_SIZE_BAND 1456L // used in matching result
|
||||
#define M_SAMPLE_COLOR_SIGN 1457L // used in matching result
|
||||
#define M_SAMPLE_COLOR_TYPE 1458L // used in matching result
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// --> Flags to be deprecated in MIL 10.0 !
|
||||
#define M_LABEL_PIXEL_IMAGE_SIZE_X 350L // used in matching result
|
||||
#define M_LABEL_PIXEL_IMAGE_SIZE_Y 351L // used in matching result
|
||||
#define M_LABEL_PIXEL_IMAGE_SIZE_BIT 352L // used in matching result and matching context
|
||||
#define M_LABEL_PIXEL_IMAGE_SIZE_BAND 353L // used in matching result
|
||||
#define M_LABEL_PIXEL_IMAGE_SIGN 354L // used in matching result
|
||||
#define M_LABEL_PIXEL_IMAGE_TYPE 355L // used in matching result
|
||||
|
||||
#define M_COLORED_LABEL_PIXEL_IMAGE_SIZE_X 360L // used in matching result
|
||||
#define M_COLORED_LABEL_PIXEL_IMAGE_SIZE_Y 361L // used in matching result
|
||||
#define M_COLORED_LABEL_PIXEL_IMAGE_SIZE_BIT 362L // used in matching result
|
||||
#define M_COLORED_LABEL_PIXEL_IMAGE_SIZE_BAND 363L // used in matching result
|
||||
#define M_COLORED_LABEL_PIXEL_IMAGE_SIGN 364L // used in matching result
|
||||
#define M_COLORED_LABEL_PIXEL_IMAGE_TYPE 365L // used in matching result
|
||||
|
||||
#define M_LABEL_AREA_IMAGE_SIZE_X 370L // used in matching result
|
||||
#define M_LABEL_AREA_IMAGE_SIZE_Y 371L // used in matching result
|
||||
#define M_LABEL_AREA_IMAGE_SIZE_BIT 372L // used in matching result and matching context
|
||||
#define M_LABEL_AREA_IMAGE_SIZE_BAND 373L // used in matching result
|
||||
#define M_LABEL_AREA_IMAGE_SIGN 374L // used in matching result
|
||||
#define M_LABEL_AREA_IMAGE_TYPE 375L // used in matching result
|
||||
|
||||
#define M_COLORED_LABEL_AREA_IMAGE_SIZE_X 380L // used in matching result
|
||||
#define M_COLORED_LABEL_AREA_IMAGE_SIZE_Y 381L // used in matching result
|
||||
#define M_COLORED_LABEL_AREA_IMAGE_SIZE_BIT 382L // used in matching result
|
||||
#define M_COLORED_LABEL_AREA_IMAGE_SIZE_BAND 383L // used in matching result
|
||||
#define M_COLORED_LABEL_AREA_IMAGE_SIGN 384L // used in matching result
|
||||
#define M_COLORED_LABEL_AREA_IMAGE_TYPE 385L // used in matching result
|
||||
// <--
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
#define M_MAX_DISTANCE 12L // used in matching result
|
||||
#define M_LABEL_VALUE 1L // used in matching result *also defined in miledge.h, milblob.h, milmetrol.h
|
||||
#define M_SAMPLE_LABEL_VALUE M_LABEL_VALUE
|
||||
#define M_AREA_LABEL_VALUE 802L // used in matching result
|
||||
#define M_BEST_MATCH_INDEX 804L // used in matching result
|
||||
#define M_BEST_MATCH_LABEL 805L // used in matching result
|
||||
#define M_COLOR_DISTANCE 806L // used in matching result
|
||||
#define M_SCORE 0x00001400L // used in matching result *also defined in milpat.h
|
||||
#define M_NUMBER_OF_AREAS 832L // used in matching context
|
||||
#define M_OUTLIER_COVERAGE 808L // used in matching result
|
||||
#define M_STATUS 0x00008002L // used in matching result Already defined in milcode.h (in decimal: 32770)
|
||||
#define M_SAMPLE_MATCH_STATUS 809L // used in matching result
|
||||
#define M_NB_BEST_MATCH_SAMPLE 810L // used in matching result
|
||||
#define M_NB_MATCH_SAMPLE 811L // used in matching result
|
||||
#define M_NB_NO_MATCH_SAMPLE 812L // used in matching result
|
||||
#define M_MATCH_INDEX 820L // used in matching result
|
||||
#define M_MATCH_LABEL 822L // used in matching result
|
||||
#define M_NO_MATCH_INDEX 824L // used in matching result
|
||||
#define M_NO_MATCH_LABEL 826L // used in matching result
|
||||
#define M_SAMPLE_COVERAGE 830L // used in matching result
|
||||
#define M_SAMPLE_PIXEL_COUNT 832L // used in matching result
|
||||
#define M_SCORE_RELEVANCE 834L // used in matching result
|
||||
#define M_RELEVANCE_SCORE M_SCORE_RELEVANCE // keep synonym because PP1 EA released (TBR in MIL10)
|
||||
#define M_AREA_PIXEL_COUNT 838L // used in matching result
|
||||
|
||||
// Result values
|
||||
#define M_SUCCESS 0x00000000L // Already defined in milreg.h, used as status result
|
||||
#define M_FAILURE 0x00000001L // Already defined in milreg.h, used as status result
|
||||
#define M_TIE 0x00000002L // used as status result
|
||||
#define M_MATCH 6L // Already defined in milim.h, used as sample match status result
|
||||
#define M_NO_MATCH 7L // used as sample match status result
|
||||
|
||||
// Operation Flag
|
||||
#define M_DELETE 3L // used in McolDefine *also defined in milmod.h, miledge.h, milblob.h, milmetrol.h
|
||||
#define M_IMAGE 0x00000004L // used in McolDefine *also defined in mil.h, milmod.h
|
||||
#define M_TRIPLET 8L // used in McolDefine
|
||||
#define M_ADD_COLOR_TO_SAMPLE 0x00001000L // used in McolDefine as combination flag
|
||||
#define M_DONT_CARE 0x00008000L // used in McolMask *also defined in mil.h, milpat.h, milmod.h
|
||||
|
||||
// Draw flags
|
||||
#define M_DRAW_PIXEL_MATCH_USING_LABEL 400L // used in McolDraw and McolMatch
|
||||
#define M_DRAW_PIXEL_MATCH_USING_COLOR 402L // used in McolDraw and McolMatch
|
||||
#define M_DRAW_AREA_MATCH_USING_LABEL 403L // used in McolDraw and McolMatch
|
||||
#define M_DRAW_AREA_MATCH_USING_COLOR 404L // used in McolDraw and McolMatch
|
||||
#define M_DRAW_DISTANCE 405L // used in McolDraw
|
||||
#define M_DRAW_AREA 410L // used in McolDraw
|
||||
#define M_DRAW_SAMPLE 415L // used in McolDraw
|
||||
#define M_DRAW_SAMPLE_MASK 416L // used in McolDraw
|
||||
#define M_DRAW_SAMPLE_COLOR_LUT 420L // used in McolDraw
|
||||
#define M_DRAW_SAMPLE_MOSAIC 1622L // used in McolDraw
|
||||
#define M_DRAW_SAMPLE_MOSAIC_DONT_CARE 1623L // used in McolDraw
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// --> Flags to be deprecated in MIL 10.0 !
|
||||
#define M_DRAW_LABEL_PIXEL_IMAGE M_DRAW_PIXEL_MATCH_USING_LABEL
|
||||
#define M_DRAW_COLORED_LABEL_PIXEL_IMAGE M_DRAW_PIXEL_MATCH_USING_COLOR
|
||||
#define M_DRAW_LABEL_AREA_IMAGE M_DRAW_AREA_MATCH_USING_LABEL
|
||||
#define M_DRAW_COLORED_LABEL_AREA_IMAGE M_DRAW_AREA_MATCH_USING_COLOR
|
||||
#define M_DRAW_DISTANCE_IMAGE M_DRAW_DISTANCE
|
||||
#define M_DRAW_AREA_IMAGE M_DRAW_AREA
|
||||
#define M_DRAW_SAMPLE_IMAGE M_DRAW_SAMPLE
|
||||
#define M_DRAW_SAMPLE_MASK_IMAGE M_DRAW_SAMPLE_MASK
|
||||
// <--
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Draw combination flags
|
||||
#define M_INVERTED_COLORS 0x00100000L // used in McolDraw and McolMatch
|
||||
|
||||
// Projection flags
|
||||
#define M_COLOR_SEPARATION 600L // used in McolProject
|
||||
#define M_PRINCIPAL_COMPONENT_PROJECTION 605L // used in McolProject
|
||||
#define M_COVARIANCE 610L // used in McolProject (McolSetMethod)
|
||||
#define M_PRINCIPAL_COMPONENTS 615L // used in McolProject
|
||||
#define M_MASK_CONTRAST_ENHANCEMENT 620L // used in McolProject
|
||||
#define M_BACKGROUND_LABEL 43L // used in McolProject
|
||||
#define M_SELECTED_LABEL 103L // used in McolProject
|
||||
#define M_REJECTED_LABEL 73L // used in McolProject
|
||||
#define M_SOURCE_LABEL 163L // used in McolProject
|
||||
#define M_BRIGHT_LABEL 253L // used in McolProject
|
||||
#define M_DARK_LABEL 83L // used in McolProject
|
||||
// McolProject result statuses
|
||||
#define M_NO_BACKGROUND_DEFINED 650L // used in McolProject
|
||||
#define M_NO_SELECTED_DEFINED 652L // used in McolProject
|
||||
#define M_NO_REJECTED_DEFINED 654L // used in McolProject
|
||||
#define M_REJECTED_EQUAL_SELECTED 660L // used in McolProject
|
||||
#define M_REJECTED_EQUAL_BACKGROUND 662L // used in McolProject
|
||||
#define M_SELECTED_EQUAL_BACKGROUND 664L // used in McolProject
|
||||
#define M_3_COLORS_COLLINEAR 668L // used in McolProject
|
||||
#define M_NO_SOURCE_DEFINED 670L // used in McolProject
|
||||
#define M_UNSTABLE_POLARITY 672L // used in McolProject
|
||||
#define M_UNSTABLE_PRINCIPAL_COMPONENT_2 680L // used in McolProject
|
||||
#define M_UNSTABLE_PRINCIPAL_COMPONENTS_12 682L // used in McolProject
|
||||
#define M_UNSTABLE_PRINCIPAL_COMPONENTS_012 684L // used in McolProject
|
||||
/***************************************************************************/
|
||||
/* MilColor CAPI function prototypes */
|
||||
/***************************************************************************/
|
||||
|
||||
MIL_ID MFTYPE McolAlloc(MIL_ID SysId,
|
||||
MIL_INT64 ContextType,
|
||||
MIL_INT64 SourceColorSpace,
|
||||
MIL_ID ColorSpaceProfileId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextIdPtr);
|
||||
|
||||
MIL_ID MFTYPE McolAllocResult(MIL_ID SysId,
|
||||
MIL_INT64 ResultType,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ResultIdPtr);
|
||||
|
||||
void MFTYPE McolDefine(MIL_ID ContextId,
|
||||
MIL_ID SrcImageBufId,
|
||||
MIL_INT UserLabelOrIndex,
|
||||
MIL_INT64 ColorSampleType,
|
||||
MIL_DOUBLE Param1,
|
||||
MIL_DOUBLE Param2,
|
||||
MIL_DOUBLE Param3,
|
||||
MIL_DOUBLE Param4);
|
||||
|
||||
void MFTYPE McolPreprocess(MIL_ID ContextId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE McolMatch(MIL_ID ContextId,
|
||||
MIL_ID TargetColorImageId,
|
||||
MIL_ID TargetColorProfileId,
|
||||
MIL_ID AreaIdentifierImageId,
|
||||
MIL_ID ColorResultOrDestImageId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE McolFree(MIL_ID ContextIdOrResultId);
|
||||
|
||||
MIL_INT MFTYPE McolInquire(MIL_ID ContextOrResultId,
|
||||
MIL_INT IndexOrLabel,
|
||||
MIL_INT64 InquireType,
|
||||
void *UserVarPtr);
|
||||
|
||||
void MFTYPE McolGetResult(MIL_ID ResultId,
|
||||
MIL_INT AreaLabel,
|
||||
MIL_INT ColorSampleIndexOrLabel,
|
||||
MIL_INT64 ResultType,
|
||||
void *ResultArrayPtr);
|
||||
|
||||
void MFTYPE McolDistance(MIL_ID Src1Id,
|
||||
MIL_ID Src2Id,
|
||||
MIL_ID DestId,
|
||||
MIL_ID MaskId,
|
||||
MIL_ID DistanceAttributesArrayId,
|
||||
MIL_INT64 DistType,
|
||||
MIL_DOUBLE NormalizeValue,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE McolDraw(MIL_ID GraphContId,
|
||||
MIL_ID ContextOrResultId,
|
||||
MIL_ID DestImageBufId,
|
||||
MIL_INT64 DrawOperation,
|
||||
MIL_INT AreaLabel,
|
||||
MIL_INT SampleIndexOrLabel,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE McolMask(MIL_ID ContextId,
|
||||
MIL_INT ColorSampleIndexOrLabel,
|
||||
MIL_ID MaskBufferId,
|
||||
MIL_INT64 MaskType,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE McolSetMethod(MIL_ID ContextId,
|
||||
MIL_INT64 OperationMode,
|
||||
MIL_INT64 DistTypeOrCalIntent,
|
||||
MIL_INT64 ConversionModeOrComputeOption,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE McolProject(MIL_ID Src1ImageId,
|
||||
MIL_ID Src2ImageOrArrayId,
|
||||
MIL_ID DestImageOrArrayId,
|
||||
MIL_ID DestMaskImageId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_INT* StatusPtr);
|
||||
|
||||
void MFTYPE McolTransform(MIL_ID ContextId,
|
||||
MIL_INT SampleIndexOrLabel,
|
||||
MIL_ID SrcImageBufId,
|
||||
MIL_ID DestImageBufId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
#if M_MIL_USE_64BIT
|
||||
// Prototypes for 64 bits OSs
|
||||
void MFTYPE McolControlInt64 (MIL_ID ContextId,
|
||||
MIL_INT IndexOrLabel,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_INT64 ControlValue);
|
||||
|
||||
void MFTYPE McolControlDouble (MIL_ID ContextId,
|
||||
MIL_INT IndexOrLabel,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_DOUBLE ControlValue);
|
||||
|
||||
#else
|
||||
// Prototypes for 32 bits OSs
|
||||
#define McolControlInt64 McolControl
|
||||
#define McolControlDouble McolControl
|
||||
void MFTYPE McolControl (MIL_ID ContextId,
|
||||
MIL_INT IndexOrLabel,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_DOUBLE ControlValue);
|
||||
#endif
|
||||
|
||||
#if M_MIL_USE_UNICODE
|
||||
|
||||
MIL_ID MFTYPE McolRestoreW(MIL_CONST_TEXTW_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID *ContextIdPtr);
|
||||
|
||||
void MFTYPE McolSaveW(MIL_CONST_TEXTW_PTR FileName,
|
||||
MIL_ID ContextId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE McolStreamW(MIL_TEXTW_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextColIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
|
||||
MIL_ID MFTYPE McolRestoreA(MIL_CONST_TEXTA_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextIdPtr);
|
||||
|
||||
void MFTYPE McolSaveA(MIL_CONST_TEXTA_PTR FileName,
|
||||
MIL_ID ContextId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE McolStreamA(MIL_TEXTA_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextColIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
|
||||
#if M_MIL_UNICODE_API
|
||||
#define McolSave McolSaveW
|
||||
#define McolRestore McolRestoreW
|
||||
#define McolStream McolStreamW
|
||||
#else
|
||||
#define McolSave McolSaveA
|
||||
#define McolRestore McolRestoreA
|
||||
#define McolStream McolStreamA
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
MIL_ID MFTYPE McolRestore(MIL_CONST_TEXT_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID *ContextIdPtr);
|
||||
|
||||
void MFTYPE McolSave(MIL_CONST_TEXT_PTR FileName,
|
||||
MIL_ID ContextId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE McolStream(MIL_TEXT_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextColIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
#endif
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
inline void MFTYPE McolStreamCpp(MilStreamParam MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextColIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
McolStream(MemPtrOrFileName.m_Param, SysId, Operation, StreamType, Version, ControlFlag, ContextColIdPtr, SizeByteVarPtr);
|
||||
}
|
||||
|
||||
#undef McolStream
|
||||
#define McolStream McolStreamCpp
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#if M_MIL_USE_64BIT
|
||||
#ifdef __cplusplus
|
||||
//////////////////////////////////////////////////////////////
|
||||
// McolControl function definition when compiling c++ files
|
||||
//////////////////////////////////////////////////////////////
|
||||
#if !M_MIL_USE_LINUX
|
||||
inline void McolControl(MIL_ID ContextId,
|
||||
MIL_INT IndexOrLabel,
|
||||
MIL_INT64 ControlType,
|
||||
int ControlValue)
|
||||
{
|
||||
McolControlInt64(ContextId, IndexOrLabel, ControlType, ControlValue);
|
||||
};
|
||||
#endif
|
||||
|
||||
inline void McolControl(MIL_ID ContextId,
|
||||
MIL_INT IndexOrLabel,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_INT32 ControlValue)
|
||||
{
|
||||
McolControlInt64(ContextId, IndexOrLabel, ControlType, ControlValue);
|
||||
}
|
||||
inline void McolControl(MIL_ID ContextId,
|
||||
MIL_INT IndexOrLabel,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_INT64 ControlValue)
|
||||
{
|
||||
McolControlInt64(ContextId, IndexOrLabel, ControlType, ControlValue);
|
||||
}
|
||||
inline void McolControl(MIL_ID ContextId,
|
||||
MIL_INT IndexOrLabel,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_DOUBLE ControlValue)
|
||||
{
|
||||
McolControlDouble(ContextId, IndexOrLabel, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
#else
|
||||
//////////////////////////////////////////////////////////////
|
||||
// For C file, call the default function, i.e. Double one
|
||||
//////////////////////////////////////////////////////////////
|
||||
#define McolControl McolControlDouble
|
||||
|
||||
#endif // __cplusplus
|
||||
#endif // M_MIL_USE_64BIT
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// See milos.h for explanation about these functions.
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// McolGetResult
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// McolGetResult safe type definitions
|
||||
inline void MFTYPE McolGetResultSafeType(MIL_ID ResultId, MIL_INT AreaLabel, MIL_INT ColorSampleIndexOrLabel, MIL_INT64 ResultType, MilVoidPtr UserVarPtr)
|
||||
{
|
||||
MIL_INT64 RequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
if(!(M_DEFAULT_DATA_TYPE_BIT_SET(ResultType) || M_RECOMMENDED_DATA_TYPE_BIT_SET(ResultType)))
|
||||
{
|
||||
McolGetResult(ResultId, AreaLabel, ColorSampleIndexOrLabel, ResultType | M_DEFAULT_DATA_TYPE, &RequiredParamType);
|
||||
}
|
||||
if(!MfuncPointerIsCompatible(RequiredParamType, UserVarPtr.Type, ResultType))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("McolGetResult"));
|
||||
}
|
||||
McolGetResult(ResultId, AreaLabel, ColorSampleIndexOrLabel, ResultType, UserVarPtr.Ptr);
|
||||
}
|
||||
|
||||
inline void MFTYPE McolGetResultUnsafe (MIL_ID ResultId, MIL_INT AreaLabel, MIL_INT ColorSampleIndexOrLabel, MIL_INT64 ResultType, void *ResultArrayPtr){McolGetResult (ResultId, AreaLabel, ColorSampleIndexOrLabel, ResultType, ResultArrayPtr);}
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// McolInquire
|
||||
// ----------------------------------------------------------
|
||||
// McolInquire safe type definitions
|
||||
inline MIL_INT MFTYPE McolInquireSafeType(MIL_ID ContextId, MIL_INT IndexOrLabel, MIL_INT64 InquireType, MilVoidPtr UserVarPtr)
|
||||
{
|
||||
MIL_INT64 RequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
if(!(M_DEFAULT_DATA_TYPE_BIT_SET(InquireType) || M_RECOMMENDED_DATA_TYPE_BIT_SET(InquireType)))
|
||||
{
|
||||
McolInquire(ContextId, IndexOrLabel, InquireType | M_DEFAULT_DATA_TYPE, &RequiredParamType);
|
||||
}
|
||||
if(!MfuncPointerIsCompatible(RequiredParamType, UserVarPtr.Type, InquireType))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("McolInquire"));
|
||||
}
|
||||
return McolInquire(ContextId, IndexOrLabel, InquireType, UserVarPtr.Ptr);
|
||||
}
|
||||
|
||||
inline MIL_INT MFTYPE McolInquireUnsafe (MIL_ID ContextId, MIL_INT IndexOrLabel, MIL_INT64 InquireType, void *UserVarPtr) {return McolInquire (ContextId, IndexOrLabel, InquireType, UserVarPtr );}
|
||||
|
||||
|
||||
#define McolGetResult McolGetResultSafeType
|
||||
#define McolInquire McolInquireSafeType
|
||||
|
||||
#else // #if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
#define McolGetResultUnsafe McolGetResult
|
||||
#define McolInquireUnsafe McolInquire
|
||||
|
||||
#endif // #if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// Overload for std::vector.
|
||||
#if defined(M_MIL_USE_VECTOR) && M_MIL_USE_VECTOR
|
||||
template <typename UserType>
|
||||
inline void MFTYPE McolGetResult(MIL_ID ResultId, MIL_INT AreaLabel, MIL_INT ColorSampleIndexOrLabel, MIL_INT64 ResultType, std::vector<UserType> &ResultArrayPtr)
|
||||
{
|
||||
//! If the given MIL data type is not the same as the SrcType, change it to the correct one
|
||||
//! and give a warning.
|
||||
MIL_INT64 InternalTrueDataTypeForStdVector = MilTraits<UserType>::TypeFlag;
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(M_GET_HLVLDATATYPE(ResultType) != 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("McolGetResult"), MIL_TEXT("Combination value for the required data type is not supported with std::vector overload."));
|
||||
}
|
||||
#endif
|
||||
|
||||
ResultType = M_STRIP_HLVLDATATYPE(ResultType) + InternalTrueDataTypeForStdVector;
|
||||
|
||||
MIL_INT InternalNumberOfElementsForStdVector = 0;
|
||||
McolGetResult(ResultId, AreaLabel, ColorSampleIndexOrLabel, M_STRIP_HLVLDATATYPE(ResultType) + M_NB_ELEMENTS + M_TYPE_MIL_INT, &InternalNumberOfElementsForStdVector);
|
||||
|
||||
ResultArrayPtr.resize(InternalNumberOfElementsForStdVector);
|
||||
|
||||
if(InternalNumberOfElementsForStdVector > 0)
|
||||
{
|
||||
McolGetResult(ResultId, AreaLabel, ColorSampleIndexOrLabel, ResultType, &ResultArrayPtr[0]);
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// Overloads for std::vector in MxxxStream.
|
||||
inline void MFTYPE McolStream(std::vector<MIL_UINT8> &MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* McontextIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
MxxxStreamForStdVector(MemPtrOrFileName,
|
||||
SysId,
|
||||
Operation,
|
||||
StreamType,
|
||||
Version,
|
||||
ControlFlag,
|
||||
McontextIdPtr,
|
||||
SizeByteVarPtr,
|
||||
McolStream);
|
||||
}
|
||||
#endif // defined(M_MIL_USE_VECTOR) && M_MIL_USE_VECTOR
|
||||
|
||||
#if M_MIL_USE_STRING
|
||||
/***************************************************************************/
|
||||
/* COLOR MODULE */
|
||||
/***************************************************************************/
|
||||
|
||||
#if M_MIL_USE_UNICODE
|
||||
#if M_MIL_UNICODE_API
|
||||
inline void MFTYPE McolSaveW(const MIL_STRING& FileName, MIL_ID ContextId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return McolSaveW(FileName.c_str(), ContextId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE McolRestoreW(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* ContextIdPtr)
|
||||
{
|
||||
return McolRestoreW(FileName.c_str(), SysId, ControlFlag, ContextIdPtr);
|
||||
}
|
||||
|
||||
#else
|
||||
inline void MFTYPE McolSaveA(const MIL_STRING& FileName, MIL_ID ContextId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return McolSaveA(FileName.c_str(), ContextId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE McolRestoreA(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* ContextIdPtr)
|
||||
{
|
||||
return McolRestoreA(FileName.c_str(), SysId, ControlFlag, ContextIdPtr);
|
||||
}
|
||||
|
||||
#endif /* M_MIL_UNICODE_API */
|
||||
#else
|
||||
inline void MFTYPE McolSave(const MIL_STRING& FileName, MIL_ID ContextId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return McolSave(FileName.c_str(), ContextId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE McolRestore(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* ContextIdPtr)
|
||||
{
|
||||
return McolRestore(FileName.c_str(), SysId, ControlFlag, ContextIdPtr);
|
||||
}
|
||||
|
||||
#endif /* M_MIL_USE_UNICODE */
|
||||
#endif /* M_MIL_USE_STRING*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// MIL_UNIQUE_ID support
|
||||
|
||||
#if M_MIL_USE_MIL_UNIQUE_ID
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
template <> inline bool MilIsCorrectObjectType<&McolFree>(MIL_INT64 ObjectType)
|
||||
{
|
||||
return (ObjectType & ~M_USER_DEFINE_LOW_ATTRIBUTE) == M_COL_OBJECT;
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef MIL_UNIQUE_ID<&McolFree> MIL_UNIQUE_COL_ID;
|
||||
|
||||
#if M_MIL_USE_MOVE_SEMANTICS
|
||||
|
||||
inline MIL_UNIQUE_COL_ID McolAlloc(MIL_ID SysId, MIL_INT64 ContextType, MIL_INT64 SourceColorSpace, MIL_ID ColorSpaceProfileId, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_COL_ID(McolAlloc(SysId, ContextType, SourceColorSpace, ColorSpaceProfileId, ControlFlag, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_COL_ID McolAllocResult(MIL_ID SysId, MIL_INT64 ResultType, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_COL_ID(McolAllocResult(SysId, ResultType, ControlFlag, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_COL_ID McolRestore(MIL_CONST_TEXT_PTR FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_COL_ID(McolRestore(FileName, SysId, ControlFlag, M_NULL));
|
||||
}
|
||||
#if M_MIL_USE_STRING
|
||||
inline MIL_UNIQUE_COL_ID McolRestore(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_COL_ID(McolRestore(FileName, SysId, ControlFlag, M_NULL));
|
||||
}
|
||||
#endif // M_MIL_USE_STRING
|
||||
template <MilFreeFuncType FreeFunc> inline void McolFree(const MIL_UNIQUE_ID<FreeFunc>&) = delete;
|
||||
|
||||
inline void McolStream(MilStreamParam MemPtrOrFileName,
|
||||
MIL_ID SysId ,
|
||||
MIL_INT64 Operation ,
|
||||
MIL_INT64 StreamType ,
|
||||
MIL_DOUBLE Version ,
|
||||
MIL_INT64 ControlFlag ,
|
||||
MIL_UNIQUE_COL_ID* ContextColIdPtr ,
|
||||
MIL_INT* SizeByteVarPtr )
|
||||
{
|
||||
MxxxStreamForMilUniqueId(MemPtrOrFileName, SysId, Operation, StreamType, Version, ControlFlag, ContextColIdPtr, SizeByteVarPtr, McolStream);
|
||||
}
|
||||
|
||||
#endif // M_MIL_USE_MOVE_SEMANTICS
|
||||
#endif // M_MIL_USE_MIL_UNIQUE_ID
|
||||
|
||||
// End of MIL_UNIQUE_ID support
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif // !M_MIL_LITE
|
||||
#endif // __MILCOLOR_H__
|
||||
485
Include/ClassicMIL/MILDyn/milcom.h
Normal file
485
Include/ClassicMIL/MILDyn/milcom.h
Normal file
@ -0,0 +1,485 @@
|
||||
/////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Filename : MILCOM.H
|
||||
// Content : Define for the Mcom module
|
||||
// Revision : 10.60.0776
|
||||
//
|
||||
// Copyright © Matrox Electronic Systems Ltd., 1992-2023.
|
||||
// All Rights Reserved
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __MILCOM_H__
|
||||
#define __MILCOM_H__
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/* General milcom defines */
|
||||
#define M_COM_SUCCESS 0
|
||||
#define M_COM_ERROR 1
|
||||
|
||||
// Allocation control flags
|
||||
#define M_NO_RXYZ_SWAP 0x00000001
|
||||
#define M_COM_NO_CONNECT 0x00000002
|
||||
#define M_COM_NO_CONNECT_NO_RXYZ_SWAP 0x00000004
|
||||
#define M_COM_EMULATION 0x00000008
|
||||
|
||||
/**************************************************************************/
|
||||
/* McomAlloc TypeofProtocol */
|
||||
/**************************************************************************/
|
||||
#define M_COM_PROTOCOL_PROFINET 1
|
||||
#define M_COM_PROTOCOL_ETHERNETIP 2
|
||||
#define M_COM_PROTOCOL_MODBUS 3
|
||||
#define M_COM_PROTOCOL_EPSON 4
|
||||
#define M_COM_PROTOCOL_ABB 5
|
||||
#define M_COM_PROTOCOL_FANUC 6
|
||||
#define M_COM_PROTOCOL_KUKA 7
|
||||
#define M_COM_PROTOCOL_MOTOMAN 8
|
||||
#define M_COM_PROTOCOL_DENSO 9
|
||||
#define M_COM_PROTOCOL_STAUBLI 10
|
||||
#define M_COM_PROTOCOL_GENERIC 11
|
||||
#define M_COM_PROTOCOL_CCLINK 12
|
||||
#define M_COM_PROTOCOL_OPCUA 13
|
||||
|
||||
/**************************************************************************/
|
||||
/* McomRead/McomWrite description */
|
||||
/**************************************************************************/
|
||||
#define M_COM_MODBUS_DISCRETE_INPUT MIL_TEXT("M_DISCRETE_INPUT")
|
||||
#define M_COM_MODBUS_COILS MIL_TEXT("M_COILS")
|
||||
#define M_COM_MODBUS_HOLDING_REGISTER MIL_TEXT("M_HOLDING_REGISTER")
|
||||
#define M_COM_MODBUS_INPUT_REGISTER MIL_TEXT("M_INPUT_REGISTER")
|
||||
#define M_DISCRETE_INPUT M_COM_MODBUS_DISCRETE_INPUT // Obsolete, use M_COM_MODBUS_DISCRETE_INPUT
|
||||
#define M_COILS M_COM_MODBUS_COILS // Obsolete, use M_COM_MODBUS_COILS
|
||||
#define M_HOLDING_REGISTER M_COM_MODBUS_HOLDING_REGISTER // Obsolete, use M_COM_MODBUS_HOLDING_REGISTER
|
||||
#define M_INPUT_REGISTER M_COM_MODBUS_INPUT_REGISTER // Obsolete, use M_COM_MODBUS_INPUT_REGISTER
|
||||
|
||||
#define M_COM_ETHERNETIP_PRODUCER_ID 110
|
||||
#define M_COM_ETHERNETIP_PRODUCER MIL_TEXT("110")
|
||||
#define M_COM_ETHERNETIP_CONSUMER_ID 111
|
||||
#define M_COM_ETHERNETIP_CONSUMER MIL_TEXT("111")
|
||||
#define M_COM_ETHERNETIP_CONFIG_ID 112
|
||||
#define M_COM_ETHERNETIP_CONFIG MIL_TEXT("112")
|
||||
|
||||
#define M_COM_MODBUS_PATH(id,table) MIL_TEXT(#id) MIL_TEXT("/") table
|
||||
#define M_COM_MODBUS_TCP_PATH(slave,id,table) MIL_TEXT(#id) MIL_TEXT("@") MIL_TEXT(slave) MIL_TEXT("/") table
|
||||
#define M_COM_ETHERNETIP_PATH(assembly) MIL_TEXT("/") MIL_TEXT(#assembly)
|
||||
#define M_COM_ETHERNETIP_REMOTE_PATH(assembly, remote) MIL_TEXT(slave) MIL_TEXT("/") MIL_TEXT(#assembly)
|
||||
#define M_COM_PROFINET_PATH(module) MIL_TEXT("/") MIL_TEXT(#module)
|
||||
|
||||
// CClink Device
|
||||
#define M_COM_CCLINK_RAW MIL_TEXT("RAW")
|
||||
#define M_COM_CCLINK_INPUT_FLAG MIL_TEXT("RX")
|
||||
#define M_COM_CCLINK_OUTPUT_FLAG MIL_TEXT("RY")
|
||||
#define M_COM_CCLINK_INPUT_REGISTER MIL_TEXT("RWR")
|
||||
#define M_COM_CCLINK_OUTPUT_REGISTER MIL_TEXT("RWW")
|
||||
|
||||
// CClink Raw mode Offset
|
||||
#define M_COM_CCLINK_FORCE_READ_INPUT (1UL << 0)
|
||||
|
||||
#define M_COM_CCLINK_FLAGS_MEMORY_BANK (1UL << 1)
|
||||
#define M_COM_CCLINK_INPUT_FLAGS_MEMORY_BANK (M_COM_CCLINK_FLAGS_MEMORY_BANK | M_COM_CCLINK_FORCE_READ_INPUT)
|
||||
#define M_COM_CCLINK_OUTPUT_FLAGS_MEMORY_BANK (M_COM_CCLINK_FLAGS_MEMORY_BANK)
|
||||
|
||||
#define M_COM_CCLINK_REGISTERS_MEMORY_BANK (1UL << 2)
|
||||
#define M_COM_CCLINK_INPUT_REGISTERS_MEMORY_BANK (M_COM_CCLINK_REGISTERS_MEMORY_BANK | M_COM_CCLINK_FORCE_READ_INPUT)
|
||||
#define M_COM_CCLINK_OUTPUT_REGISTERS_MEMORY_BANK (M_COM_CCLINK_REGISTERS_MEMORY_BANK)
|
||||
|
||||
/**************************************************************************/
|
||||
/* Mcom control/Inquire settings */
|
||||
/**************************************************************************/
|
||||
//General
|
||||
#define M_COM_REMOTE_ADDRESS (2|M_CLIENT_ENCODING)
|
||||
#define M_COM_REMOTE_ADDRESS_SIZE (M_STRING_SIZE + M_COM_REMOTE_ADDRESS)
|
||||
#define M_COM_REMOTE_PORT 3
|
||||
|
||||
#define M_COM_PROFINET_DEVICEID 7
|
||||
#define M_COM_PROFINET_GET_MODULES 8
|
||||
#define M_COM_HOOK_ID 9
|
||||
#define M_COM_START 10
|
||||
#define M_COM_TIMEOUT 11
|
||||
#define M_COM_ABORT 12
|
||||
#define M_COM_PROFINET_GET_PLC_STATE 13
|
||||
#define M_COM_GET_CONNECTION_STATE 14
|
||||
#define M_COM_IS_HARDWARE 15
|
||||
#define M_COM_PROTOCOL_TYPE 16
|
||||
#define M_COM_DEVICE_DESCRIPTION (17|M_CLIENT_ENCODING)
|
||||
#define M_COM_DEVICE_DESCRIPTION_SIZE (M_STRING_SIZE + M_COM_DEVICE_DESCRIPTION)
|
||||
#define M_COM_INIT_VALUE 19
|
||||
#define M_COM_EMULATION_MODE 20
|
||||
#define M_COM_EMULATOR_SYNC 21
|
||||
#define M_COM_INSTANCE_NAME (22|M_CLIENT_ENCODING)
|
||||
#define M_COM_PROTOCOL_VERSION 23
|
||||
#define M_COM_INSTANCE_NAME_SIZE (M_STRING_SIZE + M_COM_INSTANCE_NAME)
|
||||
|
||||
//Robot
|
||||
#define M_COM_ROBOT_CONNECT 106
|
||||
#define M_COM_ROBOT_TIMEOUT 107
|
||||
#define M_COM_ROBOT_ISCONNECTED 108
|
||||
#define M_COM_ROBOT_COMMAND_ABORT 109
|
||||
#define M_COM_ROBOT_COMMAND_TIMEOUT 110
|
||||
#define M_COM_ROBOT_DISCONNECT 111
|
||||
#define M_COM_ROBOT_CONNECT_RETRY 112
|
||||
#define M_COM_ROBOT_CONNECT_RETRY_WAIT 113
|
||||
|
||||
//Cclink
|
||||
#define M_COM_CCLINK_START 1000
|
||||
#define M_COM_CCLINK_TOTAL_OCCUPIED_STATIONS M_COM_CCLINK_START + 1
|
||||
#define M_COM_CCLINK_TOTAL_OCCUPIED_STATION M_COM_CCLINK_TOTAL_OCCUPIED_STATIONS // Obsolete, use M_COM_CCLINK_TOTAL_OCCUPIED_STATIONS
|
||||
|
||||
//Opcua - Open Platform Communications Unified Architecture
|
||||
#define M_COM_OPCUA_START 2000
|
||||
#define M_COM_OPCUA_NODESET_LIST M_COM_OPCUA_START + 1
|
||||
|
||||
//Ethernet/IP
|
||||
#define M_COM_ETHERNETIP_START 20000
|
||||
#define M_COM_ETHERNETIP_CONSUMER_SIZE M_COM_ETHERNETIP_START + 1
|
||||
#define M_COM_ETHERNETIP_PRODUCER_SIZE M_COM_ETHERNETIP_START + 2
|
||||
#define M_COM_ETHERNETIP_CONFIG_SIZE M_COM_ETHERNETIP_START + 3
|
||||
#define M_COM_ETHERNETIP_ASSEMBLY_LIST M_COM_ETHERNETIP_START + 4
|
||||
|
||||
//Profinet Array
|
||||
#define M_COM_PROFINET_GET_MODULE_ID 10000
|
||||
#define M_COM_PROFINET_GET_MODULE_ID_RANGE 500
|
||||
//We reserve 500 ID for modules ID
|
||||
|
||||
#define M_COM_PROFINET_GET_SUBMODULE_ID (M_COM_PROFINET_GET_MODULE_ID + M_COM_PROFINET_GET_MODULE_ID_RANGE)
|
||||
#define M_COM_PROFINET_GET_SUBMODULE_ID_RANGE 500
|
||||
//We reserve 500 ID for modules ID
|
||||
|
||||
#define M_COM_PROFINET_GET_MODULE_INSIZE (M_COM_PROFINET_GET_SUBMODULE_ID + M_COM_PROFINET_GET_SUBMODULE_ID_RANGE)
|
||||
#define M_COM_PROFINET_GET_MODULE_INSIZE_RANGE 500
|
||||
//We reserve 500 ID for module IN size
|
||||
|
||||
#define M_COM_PROFINET_GET_MODULE_OUTSIZE (M_COM_PROFINET_GET_MODULE_INSIZE + M_COM_PROFINET_GET_MODULE_INSIZE_RANGE)
|
||||
#define M_COM_PROFINET_GET_MODULE_OUTSIZE_RANGE 500
|
||||
#define M_COM_PROFINET_START (M_COM_PROFINET_GET_MODULE_OUTSIZE + M_COM_PROFINET_GET_MODULE_OUTSIZE_RANGE)
|
||||
#define M_COM_PROFINET_INPUT_SIZE M_COM_PROFINET_START + 1
|
||||
#define M_COM_PROFINET_OUTPUT_SIZE M_COM_PROFINET_START + 2
|
||||
//We reserve 500 ID for module OUT size
|
||||
|
||||
/**************************************************************************/
|
||||
/* McomControl Parameter */
|
||||
/**************************************************************************/
|
||||
|
||||
/**************************************************************************/
|
||||
/* McomInquire Parameter */
|
||||
/**************************************************************************/
|
||||
|
||||
//Values for M_COM_PROFINET_GET_PLC_STATE
|
||||
#define M_COM_PROFINET_STATUS_STOP 0x0001
|
||||
#define M_COM_PROFINET_STATUS_RUN 0x0002
|
||||
#define M_COM_PROFINET_STATUS_PRIMARY 0x0010
|
||||
#define M_COM_PROFINET_STATUS_BACKUP 0x0020
|
||||
#define M_COM_PROFINET_STATUS_STATION_OK 0x0040
|
||||
/**************************************************************************/
|
||||
/* McomHookFunction HookType */
|
||||
/**************************************************************************/
|
||||
#define M_COM_ERROR_TRIGGER 4
|
||||
#define M_COM_DATA_CHANGE 5
|
||||
|
||||
#define M_COM_GET_HOOK_INFO_SIZE 0x8000000000000000
|
||||
/**************************************************************************/
|
||||
/* McomGetHookInfo(), Info type */
|
||||
/**************************************************************************/
|
||||
#define M_COM_ID 99
|
||||
|
||||
#define M_COM_ERROR_NUMBER 56
|
||||
#define M_COM_PROFINET_SLOT_CHANGED_COUNT 57
|
||||
#define M_COM_PROFINET_SLOT_CHANGED_LIST 58
|
||||
#define M_COM_EVENT_ID 59
|
||||
|
||||
#define M_COM_ERR_OFFSET 47000L
|
||||
|
||||
/**************************************************************************/
|
||||
/* McomQueryProtocols */
|
||||
/**************************************************************************/
|
||||
#define M_COM_PROTOCOL_NAME_SIZE 50
|
||||
#define M_COM_PROTOCOL_TYPE_ALL 0
|
||||
#define M_COM_PROTOCOL_TYPE_PLC 1
|
||||
#define M_COM_PROTOCOL_TYPE_ROBOT 2
|
||||
|
||||
/**************************************************************************/
|
||||
/* McomSendPositionXXX */
|
||||
/**************************************************************************/
|
||||
#define M_COM_FIND_POSITION_REQUEST 1
|
||||
#define M_COM_ROBOT_FIND_POSITION_RESULT 2
|
||||
#define M_COM_USER_OPCODE 1000
|
||||
/**************************************************************************/
|
||||
/* Function prototypes */
|
||||
/**************************************************************************/
|
||||
|
||||
typedef MIL_HOOK_FUNCTION_PTR MIL_COM_HOOK_FUNCTION_PTR;
|
||||
|
||||
#if M_MIL_USE_UNICODE
|
||||
MIL_ID MFTYPE McomAllocW(MIL_ID SysId, MIL_INT64 ProtocolType, MIL_CONST_TEXTW_PTR DeviceDescription, MIL_INT64 InitFlag, MIL_INT64 InitValue, MIL_ID* ComIdPtr);
|
||||
MIL_ID MFTYPE McomAllocA(MIL_ID SysId, MIL_INT64 ProtocolType, MIL_CONST_TEXTA_PTR DeviceDescription, MIL_INT64 InitFlag, MIL_INT64 InitValue, MIL_ID* ComIdPtr);
|
||||
void MFTYPE McomReadW(MIL_ID ComId, MIL_CONST_TEXTW_PTR DataObjectEntryName, MIL_INT Offset, MIL_INT Size, void* UserArrayPtr);
|
||||
void MFTYPE McomReadA(MIL_ID ComId, MIL_CONST_TEXTA_PTR DataObjectEntryName, MIL_INT Offset, MIL_INT Size, void* UserArrayPtr);
|
||||
void MFTYPE McomWriteW(MIL_ID ComId, MIL_CONST_TEXTW_PTR DataObjectEntryName, MIL_INT Offset, MIL_INT Size, const void* UserArrayPtr);
|
||||
void MFTYPE McomWriteA(MIL_ID ComId, MIL_CONST_TEXTA_PTR DataObjectEntryName, MIL_INT Offset, MIL_INT Size, const void* UserArrayPtr);
|
||||
MIL_INT MFTYPE McomQueryProtocolsW(MIL_ID SystemId, MIL_INT Type, MIL_INT Version, MIL_INT Index, MIL_TEXTW_PTR Name, MIL_INT64* Id);
|
||||
MIL_INT MFTYPE McomQueryProtocolsA(MIL_ID SystemId, MIL_INT Type, MIL_INT Version, MIL_INT Index, MIL_TEXTA_PTR Name, MIL_INT64* Id);
|
||||
void MFTYPE McomControlText(MIL_ID ComId, MIL_INT64 ControlType, MIL_CONST_TEXT_PTR ControlValue);
|
||||
void MFTYPE McomControlTextW(MIL_ID ComId, MIL_INT64 ControlType, MIL_CONST_TEXTW_PTR ControlValue);
|
||||
void MFTYPE McomControlTextA(MIL_ID ComId, MIL_INT64 ControlType, MIL_CONST_TEXTA_PTR ControlValue);
|
||||
#else
|
||||
MIL_ID MFTYPE McomAlloc(MIL_ID SysId, MIL_INT64 ProtocolType, MIL_CONST_TEXT_PTR DeviceDescription, MIL_INT64 InitFlag, MIL_INT64 InitValue, MIL_ID* ComIdPtr);
|
||||
void MFTYPE McomRead(MIL_ID ComId, MIL_CONST_TEXT_PTR DataObjectEntryName, MIL_INT Offset, MIL_INT Size, void* UserArrayPtr);
|
||||
void MFTYPE McomWrite(MIL_ID ComId, MIL_CONST_TEXT_PTR DataObjectEntryName, MIL_INT Offset, MIL_INT Size, const void* UserArrayPtr);
|
||||
MIL_INT MFTYPE McomQueryProtocols(MIL_ID SystemId, MIL_INT Type, MIL_INT Version, MIL_INT Index, MIL_TEXT_PTR Name, MIL_INT64* Id);
|
||||
void MFTYPE McomControlText(MIL_ID ComId, MIL_INT64 ControlType, MIL_CONST_TEXT_PTR ControlValue);
|
||||
#endif
|
||||
|
||||
#if M_MIL_USE_64BIT
|
||||
// Prototypes for 64 bits OSs
|
||||
void MFTYPE McomControlInt64(MIL_ID ComId,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_INT64 ControlValue);
|
||||
void MFTYPE McomControlDouble(MIL_ID ComId,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_DOUBLE ControlValue);
|
||||
#else
|
||||
// Prototypes for 32 bits OSs
|
||||
#define McomControlInt64 McomControl
|
||||
#define McomControlDouble McomControl
|
||||
void MFTYPE McomControl(MIL_ID ComId,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_DOUBLE ControlValue);
|
||||
#endif
|
||||
|
||||
MIL_INT MFTYPE McomInquire(MIL_ID ComId,
|
||||
MIL_INT64 InquireType,
|
||||
void* UserVarPtr);
|
||||
|
||||
MIL_INT MFTYPE McomHookFunction(MIL_ID ComId, MIL_INT HookType, MIL_COM_HOOK_FUNCTION_PTR HookHandlerPtr, void *UserDataPtr);
|
||||
|
||||
MIL_INT MFTYPE McomGetHookInfo(MIL_ID EventId, MIL_INT64 InfoType, void* UserVarPtr);
|
||||
|
||||
void MFTYPE McomSendPosition(MIL_ID ComId, MIL_INT64 OperationCode, MIL_INT64 Status, MIL_INT64 ObjectSpecifier, MIL_DOUBLE PositionX, MIL_DOUBLE PositionY, MIL_DOUBLE PositionZ, MIL_DOUBLE RotationX, MIL_DOUBLE RotationY, MIL_DOUBLE RotationZ, MIL_INT64 ControlFlag, MIL_DOUBLE ControlValue);
|
||||
void MFTYPE McomWaitPositionRequest(MIL_ID ComId, MIL_INT64 *OperationCodePtr, MIL_INT64 *StatusPtr, MIL_INT64 *ObjectSpecifierPtr, MIL_DOUBLE *PositionXPtr, MIL_DOUBLE *PositionYPtr, MIL_DOUBLE *PositionZPtr, MIL_DOUBLE *RotationXPtr, MIL_DOUBLE *RotationYPtr, MIL_DOUBLE *RotationZPtr, MIL_INT64 ControlFlag, MIL_DOUBLE ControlValue);
|
||||
void MFTYPE McomSendCommand(MIL_ID ComId, MIL_INT64 OperationCode, MIL_INT64 Status, MIL_INT64 DataSize, void* DataPtr, MIL_INT64 ControlFlag, MIL_DOUBLE ControlValue);
|
||||
void MFTYPE McomReceiveCommand(MIL_ID ComId, MIL_INT64 *OperationCodePtr, MIL_INT64 *StatusPtr, MIL_INT64 ArraySize, void* ArrayPtr, MIL_INT64 *ReceivedDataSizePtr, MIL_INT64 ControlFlag, MIL_DOUBLE ControlValue);
|
||||
|
||||
void MFTYPE McomFree(MIL_ID ComId);
|
||||
|
||||
#if M_MIL_USE_UNICODE
|
||||
#if M_MIL_UNICODE_API
|
||||
#define McomRead McomReadW
|
||||
#define McomWrite McomWriteW
|
||||
#define McomAlloc McomAllocW
|
||||
#define McomQueryProtocols McomQueryProtocolsW
|
||||
#else
|
||||
#define McomRead McomReadA
|
||||
#define McomWrite McomWriteA
|
||||
#define McomAlloc McomAllocA
|
||||
#define McomQueryProtocols McomQueryProtocolsA
|
||||
#undef McomControlText
|
||||
#define McomControlText McomControlTextA
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// Overload for std::vector.
|
||||
#if defined(M_MIL_USE_VECTOR) && M_MIL_USE_VECTOR
|
||||
// ----------------------------------------------------------
|
||||
// Overloads for std::vector in McomGetHookInfo.
|
||||
inline MIL_INT MFTYPE McomGetHookInfo(MIL_ID EventId, MIL_INT64 InfoType, std::vector<MIL_INT> &UserVarPtr)
|
||||
{
|
||||
MIL_INT RetVal = 0;
|
||||
|
||||
if(InfoType == M_COM_PROFINET_SLOT_CHANGED_LIST)
|
||||
{
|
||||
MIL_INT64 SlotChangeListSize = 0;
|
||||
McomGetHookInfo(EventId, M_COM_PROFINET_SLOT_CHANGED_LIST + M_NB_ELEMENTS, &SlotChangeListSize);
|
||||
|
||||
UserVarPtr.resize((MIL_INT)SlotChangeListSize);
|
||||
if(SlotChangeListSize > 0)
|
||||
{
|
||||
RetVal = McomGetHookInfo(EventId, M_COM_PROFINET_SLOT_CHANGED_LIST, &UserVarPtr[0]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UserVarPtr.resize(1);
|
||||
RetVal = McomGetHookInfo(EventId, InfoType, &UserVarPtr[0]);
|
||||
}
|
||||
|
||||
return RetVal;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if M_MIL_USE_64BIT
|
||||
#ifdef __cplusplus
|
||||
//////////////////////////////////////////////////////////////
|
||||
// McomControl function definition when compiling c++ files
|
||||
//////////////////////////////////////////////////////////////
|
||||
#if !M_MIL_USE_LINUX
|
||||
inline void McomControl(MIL_ID ComId, MIL_INT64 ControlType, int ControlValue)
|
||||
{
|
||||
McomControlInt64(ComId, ControlType, ControlValue);
|
||||
};
|
||||
#endif
|
||||
inline void McomControl(MIL_ID ComId, MIL_INT64 ControlType, MIL_INT32 ControlValue)
|
||||
{
|
||||
McomControlInt64(ComId, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void McomControl(MIL_ID ComId, MIL_INT64 ControlType, MIL_INT64 ControlValue)
|
||||
{
|
||||
McomControlInt64(ComId, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void McomControl(MIL_ID ComId, MIL_INT64 ControlType, MIL_DOUBLE ControlValue)
|
||||
{
|
||||
McomControlDouble(ComId, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void McomControl(MIL_ID ComId, MIL_INT64 ControlType, MIL_CONST_TEXT_PTR ControlValue)
|
||||
{
|
||||
McomControlText(ComId, ControlType, ControlValue);
|
||||
}
|
||||
#else
|
||||
//////////////////////////////////////////////////////////////
|
||||
// For C file, call the default function, i.e. Int64 one
|
||||
//////////////////////////////////////////////////////////////
|
||||
#define McomControl McomControlDouble
|
||||
|
||||
|
||||
#endif // __cplusplus
|
||||
#endif // M_MIL_USE_64BIT
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// MIL_UNIQUE_ID support
|
||||
|
||||
#if M_MIL_USE_MIL_UNIQUE_ID
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
template <> inline bool MilIsCorrectObjectType<&McomFree>(MIL_INT64 ObjectType)
|
||||
{
|
||||
return (ObjectType & ~M_USER_DEFINE_LOW_ATTRIBUTE) == M_COM_OBJECT;
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef MIL_UNIQUE_ID<&McomFree> MIL_UNIQUE_COM_ID;
|
||||
|
||||
#if M_MIL_USE_MOVE_SEMANTICS
|
||||
|
||||
inline MIL_UNIQUE_COM_ID McomAlloc(MIL_ID SysId, MIL_INT64 ProtocolType, MIL_CONST_TEXT_PTR DeviceDescription, MIL_INT64 InitFlag, MIL_INT64 InitValue, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_COM_ID(McomAlloc(SysId, ProtocolType, DeviceDescription, InitFlag, InitValue, M_NULL));
|
||||
}
|
||||
#if M_MIL_USE_STRING
|
||||
inline MIL_UNIQUE_COM_ID McomAlloc(MIL_ID SysId, MIL_INT64 ProtocolType, const MIL_STRING& DeviceDescription, MIL_INT64 InitFlag, MIL_INT64 InitValue, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_COM_ID(McomAlloc(SysId, ProtocolType, DeviceDescription.c_str(), InitFlag, InitValue, M_NULL));
|
||||
}
|
||||
#endif
|
||||
template <MilFreeFuncType FreeFunc> inline void McomFree(const MIL_UNIQUE_ID<FreeFunc>&) = delete;
|
||||
|
||||
#endif // M_MIL_USE_MOVE_SEMANTICS
|
||||
#endif // M_MIL_USE_MIL_UNIQUE_ID
|
||||
|
||||
// End of MIL_UNIQUE_ID support
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Overloads for std::vector in McomRead.
|
||||
#if defined(M_MIL_USE_VECTOR) && M_MIL_USE_VECTOR
|
||||
inline void MFTYPE McomRead(MIL_ID ComId, MIL_CONST_TEXT_PTR DataObjectEntryName, MIL_INT Offset,
|
||||
MIL_INT Size, std::vector<MIL_UINT8> &UserArrayPtr)
|
||||
{
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if (Size <= 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("McomRead"), MIL_TEXT("Size must be greater than zero."));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (Size > 0)
|
||||
{
|
||||
// Specifies the amount of the data to read in bytes.
|
||||
MIL_UINT InternalNeededSizeForStdVector = Size;
|
||||
MIL_INT iProtocolType = McomInquire(ComId, M_COM_PROTOCOL_TYPE, M_NULL);
|
||||
if (iProtocolType == M_COM_PROTOCOL_CCLINK ||
|
||||
iProtocolType == M_COM_PROTOCOL_MODBUS)
|
||||
{
|
||||
MIL_STRING sDataObjectEntryName(DataObjectEntryName);
|
||||
if (sDataObjectEntryName.find(M_COM_CCLINK_OUTPUT_REGISTER) != MIL_STRING::npos ||
|
||||
sDataObjectEntryName.find(M_COM_MODBUS_HOLDING_REGISTER) != MIL_STRING::npos ||
|
||||
sDataObjectEntryName.find(M_COM_MODBUS_INPUT_REGISTER) != MIL_STRING::npos)
|
||||
{
|
||||
// For CC-Link or Modbus register-type the amount of data to read 'Size' is the number of 16-bits registers
|
||||
InternalNeededSizeForStdVector = Size * sizeof(MIL_UINT16);
|
||||
}
|
||||
}
|
||||
if (UserArrayPtr.size() < InternalNeededSizeForStdVector)
|
||||
{
|
||||
UserArrayPtr.resize(InternalNeededSizeForStdVector);
|
||||
}
|
||||
McomRead(ComId, DataObjectEntryName, Offset, Size, &UserArrayPtr[0]);
|
||||
}
|
||||
}
|
||||
// Overloads for std::vector in McomWrite.
|
||||
inline void MFTYPE McomWrite(MIL_ID ComId, MIL_CONST_TEXT_PTR DataObjectEntryName, MIL_INT Offset,
|
||||
MIL_INT Size, const std::vector<MIL_UINT8> &UserArrayPtr)
|
||||
{
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if (Size <= 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("McomWrite"), MIL_TEXT("Size must be greater than zero."));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (Size > 0)
|
||||
{
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
// verifies the amount of the data to write in bytes.
|
||||
MIL_UINT InternalNeededSizeForStdVector = Size;
|
||||
MIL_INT iProtocolType = McomInquire(ComId, M_COM_PROTOCOL_TYPE, M_NULL);
|
||||
if (iProtocolType == M_COM_PROTOCOL_CCLINK ||
|
||||
iProtocolType == M_COM_PROTOCOL_MODBUS)
|
||||
{
|
||||
MIL_STRING sDataObjectEntryName(DataObjectEntryName);
|
||||
if (sDataObjectEntryName.find(M_COM_CCLINK_OUTPUT_REGISTER) != MIL_STRING::npos ||
|
||||
sDataObjectEntryName.find(M_COM_MODBUS_HOLDING_REGISTER) != MIL_STRING::npos ||
|
||||
sDataObjectEntryName.find(M_COM_MODBUS_INPUT_REGISTER) != MIL_STRING::npos)
|
||||
{
|
||||
// For CC-Link or Modbus register-type the amount of data to write 'Size' is the number of 16-bits registers
|
||||
InternalNeededSizeForStdVector = Size * sizeof(MIL_UINT16);
|
||||
}
|
||||
}
|
||||
if (UserArrayPtr.size() < InternalNeededSizeForStdVector)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("McomWrite"), MIL_TEXT("All data are not written."));
|
||||
}
|
||||
#endif
|
||||
try
|
||||
{
|
||||
McomWrite(ComId, DataObjectEntryName, Offset, Size, &UserArrayPtr.at(0));
|
||||
}
|
||||
catch (const std::exception &out_range)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(out_range);
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
#if M_MIL_UNICODE_API
|
||||
size_t converted_chars, cSize = strlen(out_range.what()) + 1;
|
||||
std::wstring wc(cSize - 1, L'#');
|
||||
mbstowcs_s(&converted_chars, &wc[0], cSize, out_range.what(), _TRUNCATE);
|
||||
SafeTypeError(MIL_TEXT("McomWrite"), wc.c_str());
|
||||
#else
|
||||
SafeTypeError(MIL_TEXT("McomWrite"), out_range.what());
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif /* __MILCOM_H__ */
|
||||
2044
Include/ClassicMIL/MILDyn/mildisplay.h
Normal file
2044
Include/ClassicMIL/MILDyn/mildisplay.h
Normal file
File diff suppressed because it is too large
Load Diff
1897
Include/ClassicMIL/MILDyn/mildmr.h
Normal file
1897
Include/ClassicMIL/MILDyn/mildmr.h
Normal file
File diff suppressed because it is too large
Load Diff
1187
Include/ClassicMIL/MILDyn/miledge.h
Normal file
1187
Include/ClassicMIL/MILDyn/miledge.h
Normal file
File diff suppressed because it is too large
Load Diff
2856
Include/ClassicMIL/MILDyn/milim.h
Normal file
2856
Include/ClassicMIL/MILDyn/milim.h
Normal file
File diff suppressed because it is too large
Load Diff
985
Include/ClassicMIL/MILDyn/milmeas.h
Normal file
985
Include/ClassicMIL/MILDyn/milmeas.h
Normal file
@ -0,0 +1,985 @@
|
||||
/***************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: MILMEAS.H
|
||||
Owner : Matrox Imaging
|
||||
Revision: 10.60.0776
|
||||
Content : This file contains the defines for the MIL measurement
|
||||
module. (Mmeas...).
|
||||
|
||||
Copyright © Matrox Electronic Systems Ltd., 1992-2023.
|
||||
All Rights Reserved
|
||||
|
||||
*/
|
||||
/***************************************************************************/
|
||||
|
||||
#ifndef __MILMEAS_H__
|
||||
#define __MILMEAS_H__
|
||||
|
||||
#if (!M_MIL_LITE) // MIL FULL ONLY
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* CAPI defines */
|
||||
/**************************************************************************/
|
||||
|
||||
/**************************************************************************/
|
||||
/* MmeasAllocMarker */
|
||||
/**************************************************************************/
|
||||
|
||||
#define M_POINT 1L
|
||||
#define M_EDGE 2L
|
||||
#define M_STRIPE 3L
|
||||
#define M_CIRCLE 0x00000008L // 8 Already defined in milmod.h
|
||||
#if OldDefinesSupport
|
||||
#define M_EDGE_LIST M_EDGE
|
||||
#define M_STRIPE_LIST M_STRIPE
|
||||
MIL_DEPRECATED(M_EDGE_LIST , 1010)
|
||||
MIL_DEPRECATED(M_STRIPE_LIST, 1010)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* MmeasAllocResult */
|
||||
/**************************************************************************/
|
||||
#define M_CALCULATE 1L // Already defined in mil.h
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* Bitwise values that the followings cannot take */
|
||||
/**************************************************************************/
|
||||
|
||||
#define M_EDGE_FIRST 0x20000000L//0x00100000L
|
||||
#define M_EDGE_SECOND 0x40000000L//0x00200000L
|
||||
#define M_MIN 0x02000000L
|
||||
#define M_MAX 0x04000000L
|
||||
#define M_MEAN 0x08000000L
|
||||
#define M_STANDARD_DEVIATION 0x10000000L
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* MmeasInquire(), MmeasSetMarker(), MmeasGetResult(), MmeasFindMarker(), */
|
||||
/* MmeasCalculate() parameters : */
|
||||
/**************************************************************************/
|
||||
|
||||
#define M_ANGLE 0x00000800L
|
||||
#define M_WIDTH 0x00010000L // Deprecated in MIL10.0
|
||||
#define M_STRIPE_WIDTH 0x00200000L
|
||||
#define M_EDGEVALUE_PEAK_WIDTH 0x00400000L
|
||||
#define M_EDGE_WIDTH 0x00000004L
|
||||
#define M_POLARITY 0x00004000L
|
||||
#define M_EDGEVALUE_PEAK_CONTRAST 0x00001000L
|
||||
#define M_EDGE_CONTRAST 0x00000008L
|
||||
#define M_LENGTH 0x00002000L
|
||||
#define M_LINE_EQUATION 0x00800000L
|
||||
#if OldDefinesSupport
|
||||
#define M_LINE_EQUATION_SLOPE 0x00801000L
|
||||
#define M_LINE_EQUATION_INTERCEPT 0x00802000L
|
||||
MIL_DEPRECATED(M_LINE_EQUATION_SLOPE , 1010)
|
||||
MIL_DEPRECATED(M_LINE_EQUATION_INTERCEPT, 1010)
|
||||
#endif
|
||||
#define M_LINE_A 0x00003000L // also defined in milmetrol.h
|
||||
#define M_LINE_B 0x00003001L // also defined in milmetrol.h
|
||||
#define M_LINE_C 0x00003002L // also defined in milmetrol.h
|
||||
#define M_EDGE_INSIDE 0x00000080L
|
||||
#define M_POSITION 0x00000402L
|
||||
#define M_DISTANCE_FROM_BOX_ORIGIN 1377L
|
||||
#define M_INCLUSION_POINT 1581L
|
||||
#define M_SPACING 0x00000200L
|
||||
#define M_NUMBER 1009L
|
||||
#define M_NUMBER_MIN 1010L
|
||||
#define M_FIT_ERROR 0x00001700L // already defined in MilMod.h
|
||||
#define M_FIT_ERROR_MAX 1378L
|
||||
#define M_SEARCH_REGION_INPUT_UNITS 1392L // 0x00000570L
|
||||
#define M_MARKER_REFERENCE_INPUT_UNITS 1393L // 0x00000571L
|
||||
#define M_POINT_INPUT_UNITS 1394L // 0x00000572L
|
||||
#define M_INCLUSION_POINT_INPUT_UNITS 1459L
|
||||
#define M_MAX_ASSOCIATION_DISTANCE_INPUT_UNITS 1584L
|
||||
#define M_SCORE 0x00001400L
|
||||
#define M_ORIENTATION 0x00002400L
|
||||
#define M_POSITION_X 0x00003400L // deprecated in MIL 9.0 PP2
|
||||
#define M_POSITION_Y 0x00004400L // deprecated in MIL 9.0 PP2
|
||||
#define M_EDGE_STRENGTH 0x00006400L
|
||||
#define M_BOX_ORIGIN 0x00009400L
|
||||
#define M_BOX_SIZE 0x0000A400L
|
||||
#define M_BOX_CENTER 0x0000B400L // applies to edges and stripes
|
||||
#define M_RING_CENTER M_BOX_CENTER // applies to circles
|
||||
#define M_BOX_ANGLE_MODE 0x0000E400L
|
||||
#define M_BOX_ANGLE 0x0000F400L
|
||||
#define M_MULTIPLE_POINT_ANGLE M_BOX_ANGLE // New flag name since MIL 9.0 PP2 for point markers, need to be at the same value as M_BOX_ANGLE
|
||||
#define M_BOX_ANGLE_DELTA_NEG 0x00010400L
|
||||
#define M_BOX_ANGLE_DELTA_POS 0x00011400L
|
||||
#define M_BOX_ANGLE_TOLERANCE 0x00012400L
|
||||
#define M_BOX_ANGLE_ACCURACY 0x00013400L
|
||||
#define M_SEARCH_REGION_ANGLE_INTERPOLATION_MODE 0x00014400L
|
||||
#define M_EDGEVALUE_MIN 0x00015400L
|
||||
#define M_EDGEVALUE_VAR_MIN 1711L
|
||||
#define M_MARKER_REFERENCE 0x00016400L
|
||||
#define M_MARKER_TYPE 0x00018400L
|
||||
#define M_EDGEVALUE_PEAK_POS_MIN 0x0001A400L
|
||||
#define M_EDGEVALUE_PEAK_POS_MAX 0x0001B400L
|
||||
#define M_EDGE_START 1712L
|
||||
#define M_EDGE_END 1713L
|
||||
#define M_BOX_EDGEVALUES 0x0001C400L
|
||||
#define M_BOX_ANGLE_FOUND 0x0001D400L
|
||||
#define M_VALID_FLAG 0x0001E400L
|
||||
#define M_BOX_CORNER_TOP_LEFT 0x0001F400L
|
||||
#define M_BOX_CORNER_TOP_RIGHT 0x00020400L
|
||||
#define M_BOX_CORNER_BOTTOM_LEFT 0x00021400L
|
||||
#define M_BOX_CORNER_BOTTOM_RIGHT 0x00022400L
|
||||
#define M_BOX_EDGEVALUES_NUMBER 0x00023400L
|
||||
#define M_INCLUSION_POINT_INSIDE_STRIPE 0x00024400L
|
||||
#define M_BOX_ANGLE_REFERENCE 0x00025400L
|
||||
#define M_SCORE_TOTAL 0x00029400L
|
||||
#define M_ALL 0x40000000L // Already defined in Mil.h
|
||||
#if OldDefinesSupport
|
||||
#define M_ALL_OLD 0L
|
||||
// MIL_DEPRECATED(M_ALL_OLD, 1010)
|
||||
#endif
|
||||
#define M_DRAW_PROFILE_SCALE_OFFSET 1933L
|
||||
|
||||
#define M_RING_RADII 0x0002F400L
|
||||
|
||||
#define M_RESULT_OUTPUT_UNITS 1300L // Also in milim.h
|
||||
#define M_NUMBER_OF_OUTLIERS 1379L
|
||||
#define M_SEARCH_REGION_WAS_CLIPPED 1467L
|
||||
|
||||
#define M_RADIUS 0x00000040L // Already defined in MilMod.h
|
||||
#define M_SUB_REGIONS_NUMBER 218L
|
||||
#define M_SUB_EDGES_POSITION 220L
|
||||
#define M_SUB_EDGES_WEIGHT 222L
|
||||
#define M_SUB_EDGES_MARKER_INDEX 223L
|
||||
#define M_SUB_REGIONS_OFFSET 224L
|
||||
|
||||
#define M_SUB_REGIONS_SIZE 225L
|
||||
#define M_SUB_REGIONS_CHORD_ANGLE 226L // New in PP2
|
||||
#define M_MAX_ASSOCIATION_DISTANCE 1503L
|
||||
|
||||
#define M_PIXEL_ASPECT_RATIO 5L
|
||||
#define M_PIXEL_ASPECT_RATIO_INPUT 6L
|
||||
#define M_PIXEL_ASPECT_RATIO_OUTPUT 7L
|
||||
#if OldDefinesSupport
|
||||
#define M_DRAW_RELATIVE_ORIGIN_X 319L // deprecated : Use MgraControl(... M_DRAW_OFFSET_X...)
|
||||
#define M_DRAW_RELATIVE_ORIGIN_Y 320L // deprecated : Use MgraControl(... M_DRAW_OFFSET_Y...)
|
||||
#define M_DRAW_SCALE_X 3203L // deprecated : Use MgraControl(... M_DRAW_ZOOM_X ...)
|
||||
#define M_DRAW_SCALE_Y 3204L // deprecated : Use MgraControl(... M_DRAW_ZOOM_Y ...)
|
||||
// MIL_DEPRECATED(M_DRAW_RELATIVE_ORIGIN_X, 1010) Already defined in mil.h
|
||||
// MIL_DEPRECATED(M_DRAW_RELATIVE_ORIGIN_Y, 1010) Already defined in mil.h
|
||||
// MIL_DEPRECATED(M_DRAW_SCALE_X, 1010) Already defined in mil.h
|
||||
// MIL_DEPRECATED(M_DRAW_SCALE_Y, 1010) Already defined in mil.h
|
||||
#endif
|
||||
#define M_RESULT_TYPE 1L
|
||||
|
||||
#define M_DISTANCE 0x00080000L // Also defined in milim.h
|
||||
#define M_DISTANCE_X 0x00081000L
|
||||
#define M_DISTANCE_Y 0x00082000L
|
||||
#define M_ANGLE 0x00000800L
|
||||
#define M_LINE_EQUATION 0x00800000L
|
||||
|
||||
|
||||
#define M_LINE_END_POINT_FIRST 0x00000010L
|
||||
#define M_LINE_END_POINT_SECOND 0x00000020L
|
||||
|
||||
#define M_SEARCH_REGION_CLIPPING 0x00809000L
|
||||
#define M_SEARCH_REGION_CLIPPING_MIN_AREA 1690L
|
||||
#define M_SEARCH_REGION_CLIPPING_MIN_WIDTH 1691L
|
||||
#define M_SEARCH_REGION_CLIPPING_MIN_HEIGHT 1692L
|
||||
#define M_SEARCH_REGION_CLIPPING_PRESERVE_CENTER 1693L
|
||||
|
||||
#define M_CIRCLE_ACCURACY 0x00030400L
|
||||
#define M_CIRCLE_INSIDE_SEARCH_REGION 1718L
|
||||
|
||||
/* Score flags */
|
||||
#define M_MAX_POSSIBLE_VALUE 0x10000001L
|
||||
#define M_STRENGTH_SCORE 0x10100000L
|
||||
#define M_RADIUS_SCORE 0x10200000L
|
||||
#define M_EDGEVALUE_PEAK_CONTRAST_SCORE 0x10300000L
|
||||
#define M_EDGE_CONTRAST_SCORE 0x10400000L
|
||||
#define M_DISTANCE_FROM_BOX_ORIGIN_SCORE 0x10600000L
|
||||
#define M_SPACING_SCORE 0x10700000L
|
||||
#define M_STRIPE_WIDTH_SCORE 0x10800000L
|
||||
#define M_EDGE_INSIDE_SCORE 0x10900000L
|
||||
|
||||
#define M_SCORE_BACKWARD_COMPATIBILITY 0x00031400L
|
||||
#define M_SUB_REGIONS_NUMBER_USED 0x0002D400L
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* MmeasInquire(), MmeasSetMarker(), MmeasGetResult(), MmeasFindMarker(), */
|
||||
/* MmeasCalculate() values : */
|
||||
/**************************************************************************/
|
||||
|
||||
#define M_VERTICAL 1L
|
||||
#define M_HORIZONTAL 2L
|
||||
#define M_ANY 0x11000000L
|
||||
#define M_POSITIVE 2L
|
||||
#define M_NEGATIVE -2L /*Must be the additive inverse of M_POSITIVE*/
|
||||
#define M_OPPOSITE 3L
|
||||
#define M_SAME -1L /* For spacing */
|
||||
#define M_NORMAL 8L
|
||||
#define M_CORRECTED 2L
|
||||
#define M_DISABLE -9999L
|
||||
#define M_ENABLE -9997L
|
||||
#define M_NEAREST_NEIGHBOR 0x00000040L
|
||||
#define M_BILINEAR 0x00000008L
|
||||
#define M_BICUBIC 0x00000010L
|
||||
#define M_YES 1L
|
||||
#define M_NO 0L
|
||||
#define M_TRUE 1L
|
||||
#define M_FALSE 0L
|
||||
#define M_INVALID -1
|
||||
#define M_FILTER_TYPE 1046L // Already defined in mil.h, miledge.h
|
||||
#define M_SMOOTHNESS 108L // Already defined in milmod.h
|
||||
#define M_FILTER_SMOOTHNESS M_SMOOTHNESS // Already defined in miledge.h
|
||||
#define M_SHEN 0x802L
|
||||
#define M_PREWITT M_EDGE_DETECT_PREWITT_FAST // Already defined in mil.h
|
||||
#define M_EULER 0x806L
|
||||
#define M_SUBPIXEL_MODE 1715L
|
||||
#define M_LOCAL 0x01000000 // Already defined in mil.h, milstr.h
|
||||
#define M_GLOBAL 0x00000008L // Already defined in mil.h, milreg.h
|
||||
#define M_AUTO_SCALE_PROFILE 0x7FFFFFFFL
|
||||
#define M_AUTO_OFFSET_PROFILE 0x7FFFFFFFL
|
||||
|
||||
#define M_MAXIMIZE_AREA M_ENABLE
|
||||
#define M_ALONG_WIDTH 1697L
|
||||
#define M_ALONG_HEIGHT 1698L
|
||||
#define M_NONE 0x08000000L // Also defined in milcal.h, milcolor.h
|
||||
#define M_AUTO 444L // Also defined in miledge.h, milmetrol.h, milmod.h, milocr.h
|
||||
|
||||
|
||||
// Parameters for output units
|
||||
#define M_PIXEL 0x1000L
|
||||
#define M_WORLD 0x2000L
|
||||
#define M_ACCORDING_TO_CALIBRATION 1301L
|
||||
|
||||
/**************************************************************************/
|
||||
/* MmeasDraw() */
|
||||
/**************************************************************************/
|
||||
|
||||
// Operation:
|
||||
#define M_DRAW_SEARCH_REGION_CENTER 0x00000001L
|
||||
#define M_DRAW_BOX_CENTER 0x00000001L // Deprecated in MIL 9.0 PP2 (also defined in milblob)
|
||||
#define M_DRAW_LINE 0x00000002L
|
||||
#define M_DRAW_EDGES 0x00000004L
|
||||
#define M_DRAW_WIDTH 0x00000008L
|
||||
#define M_DRAW_POSITION_VARIATION 0x00000010L // Deprecated in MIL 9.0 PP1
|
||||
#define M_DRAW_SEARCH_REGION 0x00000020L
|
||||
#define M_DRAW_BOX 0x00000020L // Deprecated in MIL 9.0 PP2 (also defined in milblob), renamed to M_DRAW_SEARCH_REGION
|
||||
#define M_DRAW_POSITION 0x00000040L // Also used by Mblobdraw and MpatDraw and Mmoddraw
|
||||
#define M_DRAW_EDGES_PROFILE 0x00000080L
|
||||
#define M_DRAW_SPACING 0x00000100L
|
||||
#define M_DRAW_WIDTH_VARIATION 0x00000200L // Deprecated in MIL 9.0 PP1
|
||||
#define M_DRAW_SUB_POSITIONS 0x00000400L
|
||||
#define M_DRAW_SEARCH_DIRECTION 0X00000800L
|
||||
#define M_DRAW_INCLUSION_POINT 0x00004000L
|
||||
#define M_DRAW_EDGEVALUE_MIN_IN_PROFILE 0x00008000L
|
||||
#define M_DRAW_EDGEVALUE_PEAK_WIDTH_IN_PROFILE 0x00010000L
|
||||
#define M_DRAW_POSITION_IN_PROFILE 0x00020000L
|
||||
#define M_DRAW_IN_BOX 0x00100000L // Operation modifier
|
||||
|
||||
// ControlFlag:
|
||||
#define M_RESULT 0x00001000L // Also used by MmodDraw
|
||||
#define M_MARKER 0x000001F8L
|
||||
|
||||
// Index:
|
||||
#define M_DEFAULT 0x10000000L
|
||||
#define M_SUB_REGION_TAG 0x20000000L // =utilities=
|
||||
#define M_ALL 0x40000000L
|
||||
|
||||
#define M_MEAS_DRAW_INDEX_BIT_SHIFT 14 // =utilities=
|
||||
#define M_RESULT_ALL_OCCURRENCES M_ALL
|
||||
#define M_ALL_SUBREGIONS 0x00003FFFL
|
||||
#define M_ALL_OCCURRENCES (M_RESULT_ALL_OCCURRENCES|M_ALL_SUBREGIONS)
|
||||
|
||||
#define M_RESULT_PER_SUBREGION(Subregion, Occurence) \
|
||||
(M_SUB_REGION_TAG | Subregion << M_MEAS_DRAW_INDEX_BIT_SHIFT | Occurence)
|
||||
|
||||
/**************************************************************************/
|
||||
/* MmeasRestoreMarker(), MmeasSaveMarker */
|
||||
/**************************************************************************/
|
||||
#define M_INTERACTIVE M_NULL // Already defined in mil.h, milcal.h, milcode.h, miledge.h, milocr.h, milpat.h, milmod.h
|
||||
|
||||
|
||||
#if OldDefinesSupport
|
||||
#define M_INFINITE_SLOPE MIL_INT32_MAX
|
||||
MIL_DEPRECATED(M_INFINITE_SLOPE, 1010)
|
||||
#endif
|
||||
// Deprecated functionalities; use MmeasSetScore() instead.
|
||||
#if OldDefinesSupport
|
||||
#define M_WEIGHT_FACTOR 0x01000000L // Deprecated, use MmeasSetScore() instead
|
||||
MIL_DEPRECATED(M_WEIGHT_FACTOR, 1000)
|
||||
#define M_POSITION_VARIATION 0x00008000L // Deprecated, use MmeasSetScore() instead
|
||||
MIL_DEPRECATED(M_POSITION_VARIATION, 1000)
|
||||
#define M_WIDTH_VARIATION 0x00020000L // Deprecated, use MmeasSetScore() instead
|
||||
MIL_DEPRECATED(M_WIDTH_VARIATION, 1000)
|
||||
#define M_SPACING_VARIATION 0x00000100L // Deprecated, use MmeasSetScore() instead
|
||||
MIL_DEPRECATED(M_SPACING_VARIATION, 1000)
|
||||
#define M_CONTRAST_VARIATION 0x00005400L // Deprecated, use MmeasSetScore() instead
|
||||
MIL_DEPRECATED(M_CONTRAST_VARIATION, 1000)
|
||||
#define M_EDGE_STRENGTH_VARIATION 0x00007400L // Deprecated, use MmeasSetScore() instead
|
||||
MIL_DEPRECATED(M_EDGE_STRENGTH_VARIATION, 1000)
|
||||
#define M_EDGE_INSIDE_VARIATION 0x00008400L // Deprecated, use MmeasSetScore() instead
|
||||
MIL_DEPRECATED(M_EDGE_INSIDE_VARIATION, 1000)
|
||||
#endif
|
||||
|
||||
// Deprecated flag names.
|
||||
#if OldDefinesSupport
|
||||
#define M_DRAW_ARROW M_DRAW_SEARCH_DIRECTION
|
||||
MIL_DEPRECATED(M_DRAW_ARROW, 1000)
|
||||
// #define M_FILTER M_FILTER_TYPE already defined in mil.h
|
||||
// MIL_DEPRECATED(M_FILTER, 1000) already defined in mil.h
|
||||
#define M_WIDTH_SCORE M_STRIPE_WIDTH_SCORE
|
||||
MIL_DEPRECATED(M_WIDTH_SCORE, 1000)
|
||||
#define M_CONTRAST_SCORE M_EDGEVALUE_PEAK_CONTRAST_SCORE
|
||||
MIL_DEPRECATED(M_CONTRAST_SCORE, 1000)
|
||||
#define M_SUB_EDGES_INDEX M_SUB_EDGES_MARKER_INDEX
|
||||
MIL_DEPRECATED(M_SUB_EDGES_INDEX, 1000)
|
||||
#define M_MAJOR_AXIS_MAX 216L
|
||||
MIL_DEPRECATED(M_MAJOR_AXIS_MAX, 1000)
|
||||
#define M_MAJOR_AXIS_MIN 214L
|
||||
MIL_DEPRECATED(M_MAJOR_AXIS_MIN, 1000)
|
||||
#define M_MAJOR_AXIS M_RADIUS
|
||||
MIL_DEPRECATED(M_MAJOR_AXIS, 1000)
|
||||
#define M_POSITION_MAX M_EDGEVALUE_PEAK_POS_MAX
|
||||
MIL_DEPRECATED(M_POSITION_MAX, 1000)
|
||||
#define M_POSITION_MIN M_EDGEVALUE_PEAK_POS_MIN
|
||||
MIL_DEPRECATED(M_POSITION_MIN, 1000)
|
||||
#define M_EDGE_THRESHOLD M_EDGEVALUE_MIN
|
||||
MIL_DEPRECATED(M_EDGE_THRESHOLD, 1000)
|
||||
#define M_SECOND_END_POINT_LINE M_LINE_END_POINT_SECOND
|
||||
MIL_DEPRECATED(M_SECOND_END_POINT_LINE, 1000)
|
||||
#define M_FIRST_END_POINT_LINE M_LINE_END_POINT_FIRST
|
||||
MIL_DEPRECATED(M_FIRST_END_POINT_LINE, 1000)
|
||||
#define M_BOX_CLIPPING M_SEARCH_REGION_CLIPPING
|
||||
MIL_DEPRECATED(M_BOX_CLIPPING, 1000)
|
||||
#define M_SUB_BOX_MAXIMUM_ANGLE M_SUB_REGIONS_CHORD_ANGLE
|
||||
MIL_DEPRECATED(M_SUB_BOX_MAXIMUM_ANGLE, 1000)
|
||||
#define M_BOX_WAS_CLIPPED M_SEARCH_REGION_WAS_CLIPPED
|
||||
MIL_DEPRECATED(M_BOX_WAS_CLIPPED, 1000)
|
||||
#define M_BOX_RING_RADIUS M_RING_RADII
|
||||
MIL_DEPRECATED(M_BOX_RING_RADIUS, 1000)
|
||||
#define M_BOX_INPUT_UNITS M_SEARCH_REGION_INPUT_UNITS
|
||||
MIL_DEPRECATED(M_BOX_INPUT_UNITS, 1000)
|
||||
#define M_BOX_ANGLE_INTERPOLATION_MODE M_SEARCH_REGION_ANGLE_INTERPOLATION_MODE
|
||||
MIL_DEPRECATED(M_BOX_ANGLE_INTERPOLATION_MODE, 1000)
|
||||
#define M_BOX_INTERPOLATION_MODE M_SEARCH_REGION_ANGLE_INTERPOLATION_MODE
|
||||
MIL_DEPRECATED(M_BOX_INTERPOLATION_MODE, 1000)
|
||||
#define M_SUB_EDGES_OFFSET M_SUB_REGIONS_OFFSET
|
||||
MIL_DEPRECATED(M_SUB_EDGES_OFFSET, 1000)
|
||||
#define M_SUB_EDGES_SIZE M_SUB_REGIONS_SIZE
|
||||
MIL_DEPRECATED(M_SUB_EDGES_SIZE, 1000)
|
||||
#define M_SUB_EDGES_NUMBER M_SUB_REGIONS_NUMBER
|
||||
MIL_DEPRECATED(M_SUB_EDGES_NUMBER, 1000)
|
||||
#define M_POSITION_INSIDE_STRIPE M_INCLUSION_POINT_INSIDE_STRIPE
|
||||
MIL_DEPRECATED(M_POSITION_INSIDE_STRIPE, 1000)
|
||||
#define M_CONTRAST M_EDGEVALUE_PEAK_CONTRAST
|
||||
MIL_DEPRECATED(M_CONTRAST, 1000)
|
||||
#define M_BOX_EDGES_STRENGTH_NUMBER M_BOX_EDGEVALUES_NUMBER
|
||||
MIL_DEPRECATED(M_BOX_EDGES_STRENGTH_NUMBER, 1000)
|
||||
#define M_BOX_EDGE_VALUES_NUMBER M_BOX_EDGEVALUES_NUMBER
|
||||
MIL_DEPRECATED(M_BOX_EDGE_VALUES_NUMBER, 1010)
|
||||
#define M_BOX_EDGES_STRENGTH M_BOX_EDGEVALUES
|
||||
MIL_DEPRECATED(M_BOX_EDGES_STRENGTH, 1000)
|
||||
#define M_BOX_EDGE_VALUES M_BOX_EDGEVALUES
|
||||
MIL_DEPRECATED(M_BOX_EDGE_VALUES, 1010)
|
||||
#define M_TOTAL_SCORE M_SCORE_TOTAL
|
||||
MIL_DEPRECATED(M_TOTAL_SCORE, 1010)
|
||||
#define M_FOUND_BOX_ANGLE M_BOX_ANGLE_FOUND
|
||||
MIL_DEPRECATED(M_FOUND_BOX_ANGLE, 1010)
|
||||
#define M_POSITION_IN_MARKER M_DISTANCE_FROM_BOX_ORIGIN
|
||||
MIL_DEPRECATED(M_POSITION_IN_MARKER, 1010)
|
||||
#define M_POSITION_IN_MARKER_SCORE M_DISTANCE_FROM_BOX_ORIGIN_SCORE
|
||||
MIL_DEPRECATED(M_POSITION_IN_MARKER_SCORE, 1010)
|
||||
#define M_ANY_ANGLE M_BOX_ANGLE_FOUND
|
||||
MIL_DEPRECATED(M_ANY_ANGLE, 1010)
|
||||
#endif
|
||||
|
||||
/**************************************************************************/
|
||||
/* Function prototypes */
|
||||
/**************************************************************************/
|
||||
|
||||
MIL_ID MFTYPE MmeasAllocMarker (MIL_ID SysId,
|
||||
MIL_INT64 MarkerType,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* MarkerIdPtr);
|
||||
|
||||
MIL_ID MFTYPE MmeasAllocResult (MIL_ID SysId,
|
||||
MIL_INT64 ResultType,
|
||||
MIL_ID* MeasResultIdPtr);
|
||||
|
||||
MIL_ID MFTYPE MmeasAllocContext (MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* ContextIdPtr);
|
||||
|
||||
void MFTYPE MmeasFree (MIL_ID MeasId);
|
||||
|
||||
void MFTYPE MmeasSetMarker (MIL_ID MarkerId,
|
||||
MIL_INT64 CharacteristicToSet,
|
||||
MIL_DOUBLE FirstValue,
|
||||
MIL_DOUBLE SecondValue);
|
||||
|
||||
void MFTYPE MmeasSetScore (MIL_ID MarkerId,
|
||||
MIL_INT64 Characteristic,
|
||||
MIL_DOUBLE Min,
|
||||
MIL_DOUBLE Low,
|
||||
MIL_DOUBLE High,
|
||||
MIL_DOUBLE Max,
|
||||
MIL_DOUBLE ScoreOffset,
|
||||
MIL_INT64 InputUnits,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE MmeasGetScore(MIL_ID MarkerId,
|
||||
MIL_INT64 Characteristic,
|
||||
MIL_INT Index,
|
||||
MIL_DOUBLE* Param1Ptr,
|
||||
MIL_DOUBLE* Param2Ptr,
|
||||
MIL_DOUBLE* Param3Ptr,
|
||||
MIL_DOUBLE* Param4Ptr,
|
||||
MIL_DOUBLE* Param5Ptr,
|
||||
MIL_INT* InputUnitsPtr,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE MmeasGetScoreOutputUnits(MIL_ID MarkerId,
|
||||
MIL_INT64 Characteristic,
|
||||
MIL_INT Index,
|
||||
MIL_INT64 OutputUnits,
|
||||
MIL_DOUBLE* Param1,
|
||||
MIL_DOUBLE* Param2,
|
||||
MIL_DOUBLE* Param3,
|
||||
MIL_DOUBLE* Param4,
|
||||
MIL_DOUBLE* Param5,
|
||||
MIL_INT* InputUnitsPtr,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
|
||||
void MFTYPE MmeasFindMarker(MIL_ID ContextId,
|
||||
MIL_ID ImageBufId,
|
||||
MIL_ID MarkerId,
|
||||
MIL_INT64 MeasurementList);
|
||||
|
||||
|
||||
void MFTYPE MmeasCalculate(MIL_ID ContextId,
|
||||
MIL_ID Marker1Id,
|
||||
MIL_ID Marker2Id,
|
||||
MIL_ID MeasResultId,
|
||||
MIL_INT64 MeasurementList);
|
||||
|
||||
void MFTYPE MmeasGetResult(MIL_ID MarkerOrMeasResultId,
|
||||
MIL_INT64 ResultType,
|
||||
void* FirstResultArrayPtr,
|
||||
void* SecondResultArrayPtr);
|
||||
|
||||
void MFTYPE MmeasGetResultOutputUnits(MIL_ID MarkerOrResultId,
|
||||
MIL_INT64 ResultType,
|
||||
MIL_INT64 OutputUnits,
|
||||
void* FirstResultPtr,
|
||||
void* SecondResultPtr);
|
||||
|
||||
void MFTYPE MmeasGetResultSingle(MIL_ID MarkerOrMeasResultId,
|
||||
MIL_INT64 ResultType,
|
||||
void* FirstResultArrayPtr,
|
||||
void* SecondResultArrayPtr,
|
||||
MIL_INT ResultIndex);
|
||||
|
||||
void MFTYPE MmeasGetResultSingleOutputUnits(MIL_ID MarkerOrResultId,
|
||||
MIL_INT64 ResultType,
|
||||
MIL_INT64 OutputUnits,
|
||||
void* FirstResultPtr,
|
||||
void* SecondResultPtr,
|
||||
MIL_INT Index);
|
||||
|
||||
MIL_INT MFTYPE MmeasInquire(MIL_ID MeasId,
|
||||
MIL_INT64 InquireType,
|
||||
void* FirstUserVarPtr,
|
||||
void* SecondUserVarPtr);
|
||||
|
||||
#if M_MIL_USE_64BIT
|
||||
// Prototypes for 64 bits OSs
|
||||
void MFTYPE MmeasControlInt64(MIL_ID ContextOrResultId,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_INT64 ControlValue);
|
||||
|
||||
void MFTYPE MmeasControlDouble(MIL_ID ContextOrResultId,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_DOUBLE ControlValue);
|
||||
|
||||
void MFTYPE MmeasSetMarkerDouble(MIL_ID MarkerId,
|
||||
MIL_INT64 CharacteristicToSet,
|
||||
MIL_DOUBLE FirstValue,
|
||||
MIL_DOUBLE SecondValue);
|
||||
|
||||
void MFTYPE MmeasSetMarkerInt64(MIL_ID MarkerId,
|
||||
MIL_INT64 CharacteristicToSet,
|
||||
MIL_INT64 FirstValue,
|
||||
MIL_INT64 SecondValue);
|
||||
#else
|
||||
// Prototypes for 32 bits OSs
|
||||
#define MmeasControlInt64 MmeasControl
|
||||
#define MmeasControlDouble MmeasControl
|
||||
#define MmeasSetMarkerInt64 MmeasSetMarker
|
||||
#define MmeasSetMarkerDouble MmeasSetMarker
|
||||
void MFTYPE MmeasControl(MIL_ID ContextOrResultId,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_DOUBLE ControlValue);
|
||||
#endif
|
||||
|
||||
void MFTYPE MmeasDraw(MIL_ID ContextGraId,
|
||||
MIL_ID MarkerOrResultMeasId,
|
||||
MIL_ID DstImageBufOrListGraId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT Index,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
#if M_MIL_USE_UNICODE
|
||||
|
||||
void MFTYPE MmeasSaveMarkerW (MIL_CONST_TEXTW_PTR FileName,
|
||||
MIL_ID MarkerId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_ID MFTYPE MmeasRestoreMarkerW(MIL_CONST_TEXTW_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* MarkerIdPtr);
|
||||
|
||||
void MFTYPE MmeasStreamW (MIL_TEXTW_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* MarkerMeasIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
|
||||
void MFTYPE MmeasSaveMarkerA (MIL_CONST_TEXTA_PTR FileName,
|
||||
MIL_ID MarkerId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_ID MFTYPE MmeasRestoreMarkerA(MIL_CONST_TEXTA_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* MarkerIdPtr);
|
||||
|
||||
void MFTYPE MmeasStreamA (MIL_TEXTA_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* MarkerMeasIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
|
||||
#if M_MIL_UNICODE_API
|
||||
|
||||
#define MmeasSaveMarker MmeasSaveMarkerW
|
||||
#define MmeasRestoreMarker MmeasRestoreMarkerW
|
||||
#define MmeasStream MmeasStreamW
|
||||
|
||||
#else
|
||||
|
||||
#define MmeasSaveMarker MmeasSaveMarkerA
|
||||
#define MmeasRestoreMarker MmeasRestoreMarkerA
|
||||
#define MmeasStream MmeasStreamA
|
||||
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
void MFTYPE MmeasSaveMarker (MIL_CONST_TEXT_PTR FileName,
|
||||
MIL_ID MarkerId,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_ID MFTYPE MmeasRestoreMarker(MIL_CONST_TEXT_PTR FileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* MarkerIdPtr);
|
||||
|
||||
void MFTYPE MmeasStream (MIL_TEXT_PTR MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* MarkerMeasIdPtr,
|
||||
MIL_INT* SizeByteVarPtr);
|
||||
#endif // M_MIL_USE_UNICODE
|
||||
|
||||
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
inline void MFTYPE MmeasStreamCpp(MilStreamParam MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* MarkerMeasIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
MmeasStream(MemPtrOrFileName.m_Param, SysId, Operation, StreamType, Version, ControlFlag, MarkerMeasIdPtr, SizeByteVarPtr);
|
||||
}
|
||||
|
||||
#undef MmeasStream
|
||||
#define MmeasStream MmeasStreamCpp
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#if M_MIL_USE_64BIT
|
||||
#ifdef __cplusplus
|
||||
//////////////////////////////////////////////////////////////
|
||||
// MmeasControl function definition when compiling c++ files
|
||||
//////////////////////////////////////////////////////////////
|
||||
#if !M_MIL_USE_LINUX
|
||||
inline void MmeasControl (MIL_ID ContextOrResultId,
|
||||
MIL_INT64 ControlType,
|
||||
int ControlValue)
|
||||
{
|
||||
MmeasControlInt64(ContextOrResultId, ControlType, ControlValue);
|
||||
};
|
||||
#endif
|
||||
|
||||
inline void MmeasControl (MIL_ID ContextOrResultId,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_INT32 ControlValue)
|
||||
{
|
||||
MmeasControlInt64(ContextOrResultId, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void MmeasControl(MIL_ID ContextOrResultId,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_INT64 ControlValue)
|
||||
{
|
||||
MmeasControlInt64(ContextOrResultId, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void MmeasControl (MIL_ID ContextOrResultId,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_DOUBLE ControlValue)
|
||||
{
|
||||
MmeasControlDouble(ContextOrResultId, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
template <typename T, typename U>
|
||||
inline void MmeasSetMarker (MIL_ID MarkerId,
|
||||
MIL_INT64 CharacteristicToSet,
|
||||
T FirstValue,
|
||||
U SecondValue)
|
||||
{
|
||||
MmeasSetMarkerDouble(MarkerId, CharacteristicToSet, (MIL_DOUBLE) FirstValue, (MIL_DOUBLE) SecondValue);
|
||||
}
|
||||
#else
|
||||
//////////////////////////////////////////////////////////////
|
||||
// For C file, call the default function, i.e. Int64 one
|
||||
//////////////////////////////////////////////////////////////
|
||||
#define MmeasControl MmeasControlDouble
|
||||
#endif // __cplusplus
|
||||
#endif // M_MIL_USE_64BIT
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// See milos.h for explanation about these functions.
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// MmeasGetResult
|
||||
inline void MFTYPE MmeasGetResultSafeType(MIL_ID MarkerOrMeasResultId, MIL_INT64 ResultType, MilVoidPtr FirstResultArrayPtr, MilVoidPtr SecondResultArrayPtr)
|
||||
{
|
||||
MIL_INT64 FirstRequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
MIL_INT64 SecondRequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
if(!(M_DEFAULT_DATA_TYPE_BIT_SET(ResultType) || M_RECOMMENDED_DATA_TYPE_BIT_SET(ResultType)))
|
||||
{
|
||||
MmeasGetResult(MarkerOrMeasResultId, ResultType | M_DEFAULT_DATA_TYPE, &FirstRequiredParamType, &SecondRequiredParamType);
|
||||
}
|
||||
if(!MfuncPointerIsCompatible(FirstRequiredParamType, FirstResultArrayPtr.Type, ResultType) ||
|
||||
!MfuncPointerIsCompatible(SecondRequiredParamType, SecondResultArrayPtr.Type, ResultType))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MmeasGetResult"));
|
||||
}
|
||||
MmeasGetResult(MarkerOrMeasResultId, ResultType, FirstResultArrayPtr.Ptr, SecondResultArrayPtr.Ptr);
|
||||
}
|
||||
|
||||
inline void MFTYPE MmeasGetResultUnsafe (MIL_ID MarkerOrMeasResultId, MIL_INT64 ResultType, void *FirstResultArrayPtr, void *SecondResultArrayPtr)
|
||||
{
|
||||
MmeasGetResult(MarkerOrMeasResultId, ResultType, FirstResultArrayPtr, SecondResultArrayPtr);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// MmeasGetResultSingle
|
||||
inline void MFTYPE MmeasGetResultSingleSafeType(MIL_ID MarkerOrMeasResultId, MIL_INT64 ResultType, MilVoidPtr FirstResultArrayPtr, MilVoidPtr SecondResultArrayPtr, MIL_INT ResultIndex)
|
||||
{
|
||||
MIL_INT64 FirstRequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
MIL_INT64 SecondRequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
if(!(M_DEFAULT_DATA_TYPE_BIT_SET(ResultType) || M_RECOMMENDED_DATA_TYPE_BIT_SET(ResultType)))
|
||||
{
|
||||
MmeasGetResultSingle(MarkerOrMeasResultId, ResultType | M_DEFAULT_DATA_TYPE, &FirstRequiredParamType, &SecondRequiredParamType, ResultIndex);
|
||||
}
|
||||
if(!MfuncPointerIsCompatible(FirstRequiredParamType, FirstResultArrayPtr.Type, ResultType) ||
|
||||
!MfuncPointerIsCompatible(SecondRequiredParamType, SecondResultArrayPtr.Type, ResultType))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MmeasGetResultSingle"));
|
||||
}
|
||||
MmeasGetResultSingle(MarkerOrMeasResultId, ResultType, FirstResultArrayPtr.Ptr, SecondResultArrayPtr.Ptr, ResultIndex);
|
||||
}
|
||||
|
||||
inline void MFTYPE MmeasGetResultSingleUnsafe (MIL_ID MarkerOrMeasResultId, MIL_INT64 ResultType, void* FirstResultArrayPtr, void* SecondResultArrayPtr, MIL_INT ResultIndex)
|
||||
{
|
||||
MmeasGetResultSingle(MarkerOrMeasResultId, ResultType, FirstResultArrayPtr, SecondResultArrayPtr, ResultIndex);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// MmeasInquire
|
||||
inline MIL_INT MFTYPE MmeasInquireSafeType (MIL_ID MeasId, MIL_INT64 InquireType, MilVoidPtr FirstUserArrayPtr, MilVoidPtr SecondUserArrayPtr)
|
||||
{
|
||||
MIL_INT64 FirstRequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
MIL_INT64 SecondRequiredParamType = M_PARAM_TYPE_MIL_INT64;
|
||||
if(!(M_DEFAULT_DATA_TYPE_BIT_SET(InquireType) || M_RECOMMENDED_DATA_TYPE_BIT_SET(InquireType)))
|
||||
{
|
||||
MmeasInquire(MeasId, InquireType | M_DEFAULT_DATA_TYPE, &FirstRequiredParamType, &SecondRequiredParamType);
|
||||
}
|
||||
|
||||
if(!MfuncPointerIsCompatible(FirstRequiredParamType , FirstUserArrayPtr.Type, InquireType) ||
|
||||
!MfuncPointerIsCompatible(SecondRequiredParamType, SecondUserArrayPtr.Type, InquireType))
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MmeasInquire"));
|
||||
}
|
||||
|
||||
return MmeasInquire(MeasId, InquireType, FirstUserArrayPtr.Ptr, SecondUserArrayPtr.Ptr);
|
||||
}
|
||||
|
||||
inline MIL_INT MFTYPE MmeasInquireUnsafe (MIL_ID MarkerIdOrResultIdOrContextId, MIL_INT64 InquireType, void *FirstUserArrayPtr, void *SecondUserArrayPtr)
|
||||
{
|
||||
return MmeasInquire (MarkerIdOrResultIdOrContextId, InquireType, FirstUserArrayPtr, SecondUserArrayPtr);
|
||||
}
|
||||
|
||||
#define MmeasGetResult MmeasGetResultSafeType
|
||||
#define MmeasGetResultSingle MmeasGetResultSingleSafeType
|
||||
#define MmeasInquire MmeasInquireSafeType
|
||||
|
||||
#else // #if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
#define MmeasGetResultUnsafe MmeasGetResult
|
||||
#define MmeasGetResultSingleUnsafe MmeasGetResultSingle
|
||||
#define MmeasInquireUnsafe MmeasInquire
|
||||
|
||||
#endif // #if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// Overload for std::vector.
|
||||
#if defined(M_MIL_USE_VECTOR) && M_MIL_USE_VECTOR
|
||||
|
||||
template <typename UserType>
|
||||
inline void MFTYPE MmeasGetResult(MIL_ID MarkerOrMeasResultId,
|
||||
MIL_INT64 ResultType,
|
||||
std::vector<UserType> &FirstResultArrayPtr,
|
||||
CMilArrayParamOut SecondResultArrayPtr)
|
||||
{
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(!SecondResultArrayPtr.IsValidParam())
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MmeasGetResult"), MIL_TEXT("Cannot call MedgeGetResult with an std::vector and an non zero integer."));
|
||||
}
|
||||
if(M_GET_HLVLDATATYPE(ResultType) != 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MmeasGetResult"), MIL_TEXT("Combination value for the required data type is not supported with std::vector overload."));
|
||||
}
|
||||
if(!SecondResultArrayPtr.IsNullPtr() && SecondResultArrayPtr.GetMilDataType() != MilTraits<UserType>::TypeFlag)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MmeasGetResult"), MIL_TEXT("The data type of SecondResultArrayPtr must be the same as FirstResultArrayPtr."));
|
||||
}
|
||||
#endif
|
||||
|
||||
ResultType = M_STRIP_HLVLDATATYPE(ResultType) + MilTraits<UserType>::TypeFlag;
|
||||
|
||||
MIL_INT InternalNumberOfElementsForStdVector = 0;
|
||||
MmeasGetResult(MarkerOrMeasResultId, M_STRIP_HLVLDATATYPE(ResultType) + M_NB_ELEMENTS + M_TYPE_MIL_INT, &InternalNumberOfElementsForStdVector, M_NULL);
|
||||
|
||||
FirstResultArrayPtr.resize(InternalNumberOfElementsForStdVector);
|
||||
SecondResultArrayPtr.Resize<UserType>(InternalNumberOfElementsForStdVector);
|
||||
|
||||
if(InternalNumberOfElementsForStdVector > 0)
|
||||
{
|
||||
MmeasGetResult(MarkerOrMeasResultId,
|
||||
ResultType,
|
||||
&FirstResultArrayPtr[0],
|
||||
SecondResultArrayPtr.GetData<UserType>());
|
||||
}
|
||||
}
|
||||
|
||||
template <typename UserType>
|
||||
inline void MFTYPE MmeasGetResultSingle(MIL_ID MarkerOrMeasResultId,
|
||||
MIL_INT64 ResultType,
|
||||
std::vector<UserType> &FirstResultArrayPtr,
|
||||
CMilArrayParamOut SecondResultArrayPtr,
|
||||
MIL_INT ResultIndex)
|
||||
{
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(!SecondResultArrayPtr.IsValidParam())
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MmeasGetResultSingle"), MIL_TEXT("Cannot call MedgeGetResult with an std::vector and an non zero integer."));
|
||||
}
|
||||
if(M_GET_HLVLDATATYPE(ResultType) != 0)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MmeasGetResultSingle"), MIL_TEXT("Combination value for the required data type is not supported with std::vector overload."));
|
||||
}
|
||||
if(!SecondResultArrayPtr.IsNullPtr() && SecondResultArrayPtr.GetMilDataType() != MilTraits<UserType>::TypeFlag)
|
||||
{
|
||||
SafeTypeError(MIL_TEXT("MmeasGetResultSingle"), MIL_TEXT("The data type of SecondResultArrayPtr must be the same as FirstResultArrayPtr."));
|
||||
}
|
||||
#endif
|
||||
|
||||
ResultType = M_STRIP_HLVLDATATYPE(ResultType) + MilTraits<UserType>::TypeFlag;
|
||||
|
||||
MIL_INT InternalNumberOfElementsForStdVector = 0;
|
||||
MmeasGetResultSingle(MarkerOrMeasResultId, M_STRIP_HLVLDATATYPE(ResultType) + M_NB_ELEMENTS + M_TYPE_MIL_INT, &InternalNumberOfElementsForStdVector, M_NULL, ResultIndex);
|
||||
|
||||
FirstResultArrayPtr.resize(InternalNumberOfElementsForStdVector);
|
||||
SecondResultArrayPtr.Resize<UserType>(InternalNumberOfElementsForStdVector);
|
||||
|
||||
if(InternalNumberOfElementsForStdVector > 0)
|
||||
{
|
||||
MmeasGetResultSingle(MarkerOrMeasResultId,
|
||||
ResultType,
|
||||
&FirstResultArrayPtr[0],
|
||||
SecondResultArrayPtr.GetData<UserType>(),
|
||||
ResultIndex);
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// Overloads for std::vector in MxxxStream.
|
||||
inline void MFTYPE MmeasStream(std::vector<MIL_UINT8> &MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_ID* McontextIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
MxxxStreamForStdVector(MemPtrOrFileName,
|
||||
SysId,
|
||||
Operation,
|
||||
StreamType,
|
||||
Version,
|
||||
ControlFlag,
|
||||
McontextIdPtr,
|
||||
SizeByteVarPtr,
|
||||
MmeasStream);
|
||||
}
|
||||
#endif // defined(M_MIL_USE_VECTOR) && M_MIL_USE_VECTOR
|
||||
|
||||
#if M_MIL_USE_STRING
|
||||
/***************************************************************************/
|
||||
/* MEASUREMENT MODULE */
|
||||
/***************************************************************************/
|
||||
#if M_MIL_USE_UNICODE
|
||||
#if M_MIL_UNICODE_API
|
||||
inline void MFTYPE MmeasSaveMarkerW(const MIL_STRING& FileName, MIL_ID MarkerId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return MmeasSaveMarkerW(FileName.c_str(), MarkerId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE MmeasRestoreMarkerW(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* MarkerIdPtr)
|
||||
{
|
||||
return MmeasRestoreMarkerW(FileName.c_str(), SysId, ControlFlag, MarkerIdPtr);
|
||||
}
|
||||
|
||||
#else
|
||||
inline void MFTYPE MmeasSaveMarkerA(const MIL_STRING& FileName, MIL_ID MarkerId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return MmeasSaveMarkerA(FileName.c_str(), MarkerId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE MmeasRestoreMarkerA(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* MarkerIdPtr)
|
||||
{
|
||||
return MmeasRestoreMarkerA(FileName.c_str(), SysId, ControlFlag, MarkerIdPtr);
|
||||
}
|
||||
|
||||
#endif /* M_MIL_UNICODE_API */
|
||||
#else
|
||||
inline void MFTYPE MmeasSaveMarker(const MIL_STRING& FileName, MIL_ID MarkerId, MIL_INT64 ControlFlag)
|
||||
{
|
||||
return MmeasSaveMarker(FileName.c_str(), MarkerId, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_ID MFTYPE MmeasRestoreMarker(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_ID* MarkerIdPtr)
|
||||
{
|
||||
return MmeasRestoreMarker(FileName.c_str(), SysId, ControlFlag, MarkerIdPtr);
|
||||
}
|
||||
|
||||
#endif /* M_MIL_USE_UNICODE */
|
||||
#endif /* M_MIL_USE_STRING*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// MIL_UNIQUE_ID support
|
||||
|
||||
#if M_MIL_USE_MIL_UNIQUE_ID
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
template <> inline bool MilIsCorrectObjectType<&MmeasFree>(MIL_INT64 ObjectType)
|
||||
{
|
||||
return (ObjectType & ~M_USER_DEFINE_LOW_ATTRIBUTE) == M_MEAS_OBJECT;
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef MIL_UNIQUE_ID<&MmeasFree> MIL_UNIQUE_MEAS_ID;
|
||||
|
||||
#if M_MIL_USE_MOVE_SEMANTICS
|
||||
|
||||
inline MIL_UNIQUE_MEAS_ID MmeasAllocMarker(MIL_ID SysId, MIL_INT64 MarkerType, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_MEAS_ID(MmeasAllocMarker(SysId, MarkerType, ControlFlag, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_MEAS_ID MmeasAllocContext(MIL_ID SysId, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_MEAS_ID(MmeasAllocContext(SysId, ControlFlag, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_MEAS_ID MmeasAllocResult(MIL_ID SysId, MIL_INT64 ResultType, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_MEAS_ID(MmeasAllocResult(SysId, ResultType, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_MEAS_ID MmeasRestoreMarker(MIL_CONST_TEXT_PTR FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_MEAS_ID(MmeasRestoreMarker(FileName, SysId, ControlFlag, M_NULL));
|
||||
}
|
||||
#if M_MIL_USE_STRING
|
||||
inline MIL_UNIQUE_MEAS_ID MmeasRestoreMarker(const MIL_STRING& FileName, MIL_ID SysId, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_MEAS_ID(MmeasRestoreMarker(FileName, SysId, ControlFlag, M_NULL));
|
||||
}
|
||||
#endif // M_MIL_USE_STRING
|
||||
template <MilFreeFuncType FreeFunc> inline void MmeasFree(const MIL_UNIQUE_ID<FreeFunc>&) = delete;
|
||||
|
||||
inline void MmeasStream(MilStreamParam MemPtrOrFileName,
|
||||
MIL_ID SysId ,
|
||||
MIL_INT64 Operation ,
|
||||
MIL_INT64 StreamType ,
|
||||
MIL_DOUBLE Version ,
|
||||
MIL_INT64 ControlFlag ,
|
||||
MIL_UNIQUE_MEAS_ID* MarkerMeasIdPtr ,
|
||||
MIL_INT* SizeByteVarPtr )
|
||||
{
|
||||
MxxxStreamForMilUniqueId(MemPtrOrFileName, SysId, Operation, StreamType, Version, ControlFlag, MarkerMeasIdPtr, SizeByteVarPtr, MmeasStream);
|
||||
}
|
||||
|
||||
#endif // M_MIL_USE_MOVE_SEMANTICS
|
||||
#endif // M_MIL_USE_MIL_UNIQUE_ID
|
||||
|
||||
// End of MIL_UNIQUE_ID support
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif // !M_MIL_LITE
|
||||
#endif // __MILMEAS_H__
|
||||
1864
Include/ClassicMIL/MILDyn/milmetrol.h
Normal file
1864
Include/ClassicMIL/MILDyn/milmetrol.h
Normal file
File diff suppressed because it is too large
Load Diff
1036
Include/ClassicMIL/MILDyn/milmod.h
Normal file
1036
Include/ClassicMIL/MILDyn/milmod.h
Normal file
File diff suppressed because it is too large
Load Diff
1205
Include/ClassicMIL/MILDyn/milocr.h
Normal file
1205
Include/ClassicMIL/MILDyn/milocr.h
Normal file
File diff suppressed because it is too large
Load Diff
1015
Include/ClassicMIL/MILDyn/milpat.h
Normal file
1015
Include/ClassicMIL/MILDyn/milpat.h
Normal file
File diff suppressed because it is too large
Load Diff
1170
Include/ClassicMIL/MILDyn/milreg.h
Normal file
1170
Include/ClassicMIL/MILDyn/milreg.h
Normal file
File diff suppressed because it is too large
Load Diff
1108
Include/ClassicMIL/MILDyn/milstr.h
Normal file
1108
Include/ClassicMIL/MILDyn/milstr.h
Normal file
File diff suppressed because it is too large
Load Diff
39
Include/ClassicMIL/mbasictypes.h
Normal file
39
Include/ClassicMIL/mbasictypes.h
Normal file
@ -0,0 +1,39 @@
|
||||
/************************************************************************/
|
||||
/*
|
||||
*
|
||||
* Filename : mbasictypes.h
|
||||
* Revision : 10.60.0776
|
||||
* Content : This file contains the definitions of basic types
|
||||
* for Matrox Imaging.
|
||||
*
|
||||
*
|
||||
* Copyright © Matrox Electronic Systems Ltd., 1992-2023.
|
||||
* All Rights Reserved
|
||||
*************************************************************************/
|
||||
#ifndef __MATROX_IMAGING_BASIC_TYPES__
|
||||
#define __MATROX_IMAGING_BASIC_TYPES__ 1
|
||||
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1310)
|
||||
typedef unsigned __int64 M_UINT64;
|
||||
#elif defined(__linux__) && (defined(__x86_64__) || defined(__aarch64__))
|
||||
typedef unsigned long M_UINT64;
|
||||
#else
|
||||
typedef unsigned long long M_UINT64;
|
||||
#endif
|
||||
typedef unsigned int M_UINT32;
|
||||
typedef unsigned short M_UINT16;
|
||||
typedef unsigned char M_UINT8;
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1310)
|
||||
typedef __int64 M_INT64;
|
||||
#elif defined(__linux__) && (defined(__x86_64__) || defined(__aarch64__))
|
||||
typedef long M_INT64;
|
||||
#else
|
||||
typedef long long M_INT64;
|
||||
#endif
|
||||
typedef int M_INT32;
|
||||
typedef short M_INT16;
|
||||
typedef char M_INT8;
|
||||
|
||||
#endif
|
||||
56
Include/ClassicMIL/mildec.h
Normal file
56
Include/ClassicMIL/mildec.h
Normal file
@ -0,0 +1,56 @@
|
||||
/***************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: MILDEC.H
|
||||
Revision: 10.60.0776
|
||||
Content : This file contains the defines that are used by the
|
||||
mil functions to specify which type of command decoder
|
||||
will be used by the allocated system (MsysAlloc()).
|
||||
|
||||
Copyright © Matrox Electronic Systems Ltd., 1992-2023.
|
||||
All Rights Reserved
|
||||
|
||||
*/
|
||||
/***************************************************************************/
|
||||
|
||||
#ifndef __MILDEC_H
|
||||
#define __MILDEC_H
|
||||
|
||||
#define M_SYSTEM_DEFAULT MIL_TEXT("M_DEFAULT")
|
||||
#define M_SYSTEM_HOST MIL_TEXT("M_SYSTEM_HOST")
|
||||
#define M_SYSTEM_VGA M_SYSTEM_HOST
|
||||
#define M_SYSTEM_1394 MIL_TEXT("M_SYSTEM_1394")
|
||||
#define M_SYSTEM_IRIS MIL_TEXT("M_SYSTEM_IRIS")
|
||||
#define M_SYSTEM_CRONOSPLUS MIL_TEXT("M_SYSTEM_CRONOSPLUS")
|
||||
#define M_SYSTEM_MORPHIS MIL_TEXT("M_SYSTEM_MORPHIS")
|
||||
#define M_SYSTEM_SOLIOS MIL_TEXT("M_SYSTEM_SOLIOS")
|
||||
#define M_SYSTEM_MTXAUXILIARY MIL_TEXT("M_SYSTEM_MTXAUXILIARY")
|
||||
#define M_SYSTEM_VIO MIL_TEXT("M_SYSTEM_VIO")
|
||||
#define M_SYSTEM_NEXIS MIL_TEXT("M_SYSTEM_NEXIS")
|
||||
#define M_SYSTEM_GPU MIL_TEXT("M_SYSTEM_GPU")
|
||||
#define M_SYSTEM_GIGE_VISION MIL_TEXT("M_SYSTEM_GIGE_VISION")
|
||||
#define M_SYSTEM_MORPHISQXT MIL_TEXT("M_SYSTEM_MORPHISQXT")
|
||||
#define M_SYSTEM_IRIS_GT MIL_TEXT("M_SYSTEM_IRIS_GT")
|
||||
#define M_SYSTEM_RADIENT MIL_TEXT("M_SYSTEM_RADIENT")
|
||||
#define M_SYSTEM_ORION_HD MIL_TEXT("M_SYSTEM_ORION_HD")
|
||||
#define M_SYSTEM_NEXIS2 MIL_TEXT("M_SYSTEM_NEXIS2")
|
||||
#define M_SYSTEM_HDDVR MIL_TEXT("M_SYSTEM_HDDVR")
|
||||
#define M_SYSTEM_RADIENTCXP MIL_TEXT("M_SYSTEM_RADIENTCXP")
|
||||
#define M_SYSTEM_RAPIXOCXP MIL_TEXT("M_SYSTEM_RAPIXOCXP")
|
||||
#define M_SYSTEM_RAPIXOCL MIL_TEXT("M_SYSTEM_RAPIXOCL")
|
||||
#define M_SYSTEM_RADIENTCLHS MIL_TEXT("M_SYSTEM_RADIENTCLHS")
|
||||
#define M_SYSTEM_RADIENTPRO MIL_TEXT("M_SYSTEM_RADIENTPRO")
|
||||
#define M_SYSTEM_RADIENTEVCL MIL_TEXT("M_SYSTEM_RADIENTEVCL")
|
||||
#define M_SYSTEM_MATROXCOMPRESS MIL_TEXT("M_SYSTEM_MATROXCOMPRESS")
|
||||
#define M_SYSTEM_USB3_VISION MIL_TEXT("M_SYSTEM_USB3_VISION")
|
||||
#define M_SYSTEM_GENTL MIL_TEXT("M_SYSTEM_GENTL")
|
||||
#define M_SYSTEM_IRIS_GTR MIL_TEXT("M_SYSTEM_IRIS_GTR")
|
||||
#define M_SYSTEM_NEXIS3 MIL_TEXT("M_SYSTEM_NEXIS3")
|
||||
#define M_SYSTEM_ORION_UHD MIL_TEXT("M_SYSTEM_ORION_UHD")
|
||||
#define M_SYSTEM_CLARITY_UHD MIL_TEXT("M_SYSTEM_CLARITY_UHD")
|
||||
#define M_SYSTEM_INDIO MIL_TEXT("M_SYSTEM_INDIO")
|
||||
#define M_SYSTEM_CONCORD_POE MIL_TEXT("M_SYSTEM_CONCORD_POE")
|
||||
#define M_SYSTEM_IRIS_GTX MIL_TEXT("M_SYSTEM_IRIS_GTX")
|
||||
#define M_SYSTEM_V4L2 MIL_TEXT("M_SYSTEM_V4L2")
|
||||
#define M_SYSTEM_GEVIQ MIL_TEXT("M_SYSTEM_GEVIQ")
|
||||
#endif
|
||||
19
Include/ClassicMIL/milerror.h
Normal file
19
Include/ClassicMIL/milerror.h
Normal file
@ -0,0 +1,19 @@
|
||||
/************************************************************************/
|
||||
/*
|
||||
*
|
||||
* Filename : MILERROR.H
|
||||
* Revision : 10.60.0776
|
||||
* Content : This file contains the defines for error messages
|
||||
*
|
||||
* Copyright © Matrox Electronic Systems Ltd., 1992-2023.
|
||||
* All Rights Reserved
|
||||
*************************************************************************/
|
||||
|
||||
#ifndef __MILERROR_H
|
||||
#define __MILERROR_H
|
||||
|
||||
#define M_ERROR_FILE_NOT_FOUND 1 // The file was not found.
|
||||
#define M_ERROR_NOT_ENOUGH_MEMORY 2 // There is not enough memory.
|
||||
|
||||
|
||||
#endif // __MILERROR_H
|
||||
459
Include/ClassicMIL/milfunc.h
Normal file
459
Include/ClassicMIL/milfunc.h
Normal file
@ -0,0 +1,459 @@
|
||||
/***************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: MILFUNC.H
|
||||
Revision: 10.60.0776
|
||||
Content : This file contains the prototypes for the Matrox
|
||||
Imaging Library (MIL) Mfunc user's functions.
|
||||
|
||||
Copyright © Matrox Electronic Systems Ltd., 1992-2023.
|
||||
All Rights Reserved
|
||||
|
||||
*/
|
||||
/***************************************************************************/
|
||||
|
||||
#ifndef __MILFUNC_H
|
||||
#define __MILFUNC_H
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/***************************************************************************/
|
||||
/* TOOLKIT FOR PSEUDO MIL FUNCTIONS DEVELOPMENT */
|
||||
/***************************************************************************/
|
||||
typedef void (MFTYPE *MIL_FUNC_FUNCTION_PTR)(MIL_ID FunctionId);
|
||||
typedef MIL_FUNC_FUNCTION_PTR MFUNCSLAVEFCTPTR;
|
||||
typedef MIL_FUNC_FUNCTION_PTR MFUNCFCTPTR;
|
||||
typedef MIL_FUNC_FUNCTION_PTR MFUNCSLAVEPAFCTPTR;
|
||||
|
||||
// we need the ASCII version even on non-Unicode version
|
||||
// this is needed for transferring ASCII strings in DMIL
|
||||
void MFTYPE MfuncParamMilTextA(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_TEXTA_PTR ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
void MFTYPE MfuncParamConstMilTextA(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_CONST_TEXTA_PTR ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
void MFTYPE MfuncParamFilenameA(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_CONST_TEXTA_PTR ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
MIL_INT64 MFTYPE MfuncParamTypeToType(MIL_INT64 ParamType, MIL_INT64 Option);
|
||||
|
||||
#if M_MIL_USE_UNICODE
|
||||
MIL_ID MFTYPE MfuncAllocW(MIL_CONST_TEXTW_PTR FunctionName,
|
||||
MIL_INT ParameterNum,
|
||||
MIL_FUNC_FUNCTION_PTR SlaveFunctionPtr,
|
||||
MIL_CONST_TEXTW_PTR SlaveFunctionDLLName,
|
||||
MIL_CONST_TEXTW_PTR SlaveFunctionName,
|
||||
MIL_INT SlaveFunctionOpcode,
|
||||
MIL_INT64 InitFlag,
|
||||
MIL_ID *CBasedContextFuncIdPtr);
|
||||
MIL_ID MFTYPE MfuncAllocA(MIL_CONST_TEXTA_PTR FunctionName,
|
||||
MIL_INT ParameterNum,
|
||||
MIL_FUNC_FUNCTION_PTR SlaveFunctionPtr,
|
||||
MIL_CONST_TEXTA_PTR SlaveFunctionDLLName,
|
||||
MIL_CONST_TEXTA_PTR SlaveFunctionName,
|
||||
MIL_INT SlaveFunctionOpcode,
|
||||
MIL_INT64 InitFlag,
|
||||
MIL_ID *CBasedContextFuncIdPtr);
|
||||
|
||||
MIL_ID MFTYPE MfuncAllocScriptW(MIL_CONST_TEXTW_PTR FunctionName,
|
||||
MIL_INT ParameterNum,
|
||||
MIL_CONST_TEXTW_PTR InterpreterLanguage,
|
||||
MIL_CONST_TEXTW_PTR ScriptFileName,
|
||||
MIL_CONST_TEXTW_PTR ScriptFunctionName,
|
||||
MIL_INT ScriptFunctionOpcode,
|
||||
MIL_INT64 InitFlag,
|
||||
MIL_ID *ScriptBasedContextFuncIdPtr);
|
||||
MIL_ID MFTYPE MfuncAllocScriptA(MIL_CONST_TEXTA_PTR FunctionName,
|
||||
MIL_INT ParameterNum,
|
||||
MIL_CONST_TEXTA_PTR InterpreterLanguage,
|
||||
MIL_CONST_TEXTA_PTR ScriptFileName,
|
||||
MIL_CONST_TEXTA_PTR ScriptFunctionName,
|
||||
MIL_INT ScriptFunctionOpcode,
|
||||
MIL_INT64 InitFlag,
|
||||
MIL_ID *ScriptBasedContextFuncIdPtr);
|
||||
|
||||
MIL_INT MFTYPE MfuncErrorReportW(MIL_ID ContextFuncId,
|
||||
MIL_INT ErrorCode,
|
||||
MIL_CONST_TEXTW_PTR ErrorMessage,
|
||||
MIL_CONST_TEXTW_PTR ErrorSubMessage1,
|
||||
MIL_CONST_TEXTW_PTR ErrorSubMessage2,
|
||||
MIL_CONST_TEXTW_PTR ErrorSubMessage3);
|
||||
MIL_INT MFTYPE MfuncErrorReportA(MIL_ID ContextFuncId,
|
||||
MIL_INT ErrorCode,
|
||||
MIL_CONST_TEXTA_PTR ErrorMessage,
|
||||
MIL_CONST_TEXTA_PTR ErrorSubMessage1,
|
||||
MIL_CONST_TEXTA_PTR ErrorSubMessage2,
|
||||
MIL_CONST_TEXTA_PTR ErrorSubMessage3);
|
||||
|
||||
MIL_INT MFTYPE MfuncCustomExitW(MIL_INT Code, MIL_CONST_TEXTW_PTR Message);
|
||||
MIL_INT MFTYPE MfuncCustomExitA(MIL_INT Code, MIL_CONST_TEXTA_PTR Message);
|
||||
|
||||
void MFTYPE MfuncParamMilTextW(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_TEXTW_PTR ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
|
||||
void MFTYPE MfuncParamConstMilTextW(MIL_ID ContextFuncId, MIL_INT ParamIndex,MIL_CONST_TEXTW_PTR ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
|
||||
void MFTYPE MfuncParamFilenameW(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_CONST_TEXTW_PTR ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
|
||||
MIL_INT MFTYPE MfuncPrintMessageW(MIL_INT Mode,
|
||||
MIL_CONST_TEXTW_PTR Str1,
|
||||
MIL_CONST_TEXTW_PTR Str2,
|
||||
MIL_CONST_TEXTW_PTR Str3,
|
||||
MIL_CONST_TEXTW_PTR Str4,
|
||||
MIL_CONST_TEXTW_PTR Str5);
|
||||
MIL_INT MFTYPE MfuncPrintMessageA(MIL_INT Mode,
|
||||
MIL_CONST_TEXTA_PTR Str1,
|
||||
MIL_CONST_TEXTA_PTR Str2,
|
||||
MIL_CONST_TEXTA_PTR Str3,
|
||||
MIL_CONST_TEXTA_PTR Str4,
|
||||
MIL_CONST_TEXTA_PTR Str5);
|
||||
void MFTYPE MfuncParamA(MIL_ID ContextFuncId, MIL_INT ParamIndex, const void* ParamValuePtr, MIL_UINT ParamType, MIL_INT NumOfItems, MIL_INT64 MilObjectType, MIL_INT Attribute);
|
||||
void MFTYPE MfuncParamW(MIL_ID ContextFuncId, MIL_INT ParamIndex, const void* ParamValuePtr, MIL_UINT ParamType, MIL_INT NumOfItems, MIL_INT64 MilObjectType, MIL_INT Attribute);
|
||||
|
||||
#if M_MIL_UNICODE_API
|
||||
#define MfuncAlloc MfuncAllocW
|
||||
#define MfuncAllocScript MfuncAllocScriptW
|
||||
#define MfuncErrorReport MfuncErrorReportW
|
||||
#define MfuncCustomExit MfuncCustomExitW
|
||||
#define MfuncParamMilText MfuncParamMilTextW
|
||||
#define MfuncParamConstMilText MfuncParamConstMilTextW
|
||||
#define MfuncParamFilename MfuncParamFilenameW
|
||||
#define MfuncPrintMessage MfuncPrintMessageW
|
||||
#define MfuncParam MfuncParamW
|
||||
#else
|
||||
#define MfuncAlloc MfuncAllocA
|
||||
#define MfuncAllocScript MfuncAllocScriptA
|
||||
#define MfuncErrorReport MfuncErrorReportA
|
||||
#define MfuncCustomExit MfuncCustomExitA
|
||||
#define MfuncParamMilText MfuncParamMilTextA
|
||||
#define MfuncParamConstMilText MfuncParamConstMilTextA
|
||||
#define MfuncParamFilename MfuncParamFilenameA
|
||||
#define MfuncPrintMessage MfuncPrintMessageA
|
||||
#define MfuncParam MfuncParamA
|
||||
#endif
|
||||
#else
|
||||
MIL_ID MFTYPE MfuncAlloc(MIL_CONST_TEXT_PTR FunctionName,
|
||||
MIL_INT ParameterNum,
|
||||
MIL_FUNC_FUNCTION_PTR SlaveFunctionPtr,
|
||||
MIL_CONST_TEXT_PTR SlaveFunctionDLLName,
|
||||
MIL_CONST_TEXT_PTR SlaveFunctionName,
|
||||
MIL_INT SlaveFunctionOpcode,
|
||||
MIL_INT64 InitFlag,
|
||||
MIL_ID *CBasedContextFuncIdPtr);
|
||||
|
||||
MIL_ID MFTYPE MfuncAllocScript(MIL_CONST_TEXT_PTR FunctionName,
|
||||
MIL_INT ParameterNum,
|
||||
MIL_CONST_TEXT_PTR InterpreterLanguage,
|
||||
MIL_CONST_TEXT_PTR ScriptFileName,
|
||||
MIL_CONST_TEXT_PTR ScriptFunctionName,
|
||||
MIL_INT ScriptFunctionOpcode,
|
||||
MIL_INT64 InitFlag,
|
||||
MIL_ID *ScriptBasedContextFuncIdPtr);
|
||||
|
||||
MIL_INT MFTYPE MfuncErrorReport( MIL_ID ContextFuncId,
|
||||
MIL_INT ErrorCode,
|
||||
MIL_CONST_TEXT_PTR ErrorMessage,
|
||||
MIL_CONST_TEXT_PTR ErrorSubMessage1,
|
||||
MIL_CONST_TEXT_PTR ErrorSubMessage2,
|
||||
MIL_CONST_TEXT_PTR ErrorSubMessage3);
|
||||
|
||||
MIL_INT MFTYPE MfuncExit();
|
||||
MIL_INT MFTYPE MfuncCustomExit(MIL_INT Code, MIL_CONST_TEXT_PTR Message);
|
||||
|
||||
void MFTYPE MfuncParamMilText(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_TEXT_PTR ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
|
||||
void MFTYPE MfuncParamConstMilText(MIL_ID ContextFuncId, MIL_INT ParamIndex,MIL_CONST_TEXT_PTR ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
|
||||
|
||||
void MFTYPE MfuncParamFilename(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_CONST_TEXT_PTR ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
|
||||
|
||||
MIL_INT MFTYPE MfuncPrintMessage(MIL_INT Mode, MIL_CONST_TEXT_PTR Str1,
|
||||
MIL_CONST_TEXT_PTR Str2,
|
||||
MIL_CONST_TEXT_PTR Str3,
|
||||
MIL_CONST_TEXT_PTR Str4,
|
||||
MIL_CONST_TEXT_PTR Str5);
|
||||
void MFTYPE MfuncParam(MIL_ID ContextFuncId, MIL_INT ParamIndex, const void* ParamValuePtr, MIL_UINT ParamType, MIL_INT NumOfItems, MIL_INT64 MilObjectType, MIL_INT Attribute);
|
||||
#endif
|
||||
// compatibility function
|
||||
#if OldDefinesSupport
|
||||
#define MfuncParamString MfuncParamMilText
|
||||
MIL_DEPRECATED(MfuncParamString, 1000)
|
||||
#endif
|
||||
|
||||
|
||||
MIL_ID MFTYPE MfuncAllocId(MIL_ID ContextFuncId, MIL_INT64 MilObjectType, void *UserObjectPtr);
|
||||
MIL_INT MFTYPE MfuncParamCheck(MIL_ID ContextFuncId);
|
||||
void MFTYPE MfuncParamMilId(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_ID ParamValue, MIL_INT64 MilObjectType, MIL_INT Attribute);
|
||||
#if OldDefinesSupport
|
||||
#define MfuncParamId MfuncParamMilId // it was documented in MIL 9, so keep it
|
||||
MIL_DEPRECATED(MfuncParamId, 1000)
|
||||
#endif
|
||||
void MFTYPE MfuncParamLong (MIL_ID ContextFuncId, MIL_INT ParamIndex, long ParamValue);
|
||||
void MFTYPE MfuncParamMilInt(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_INT ParamValue);
|
||||
void MFTYPE MfuncParamMilInt32(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_INT32 ParamValue);
|
||||
void MFTYPE MfuncParamMilInt64(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_INT64 ParamValue);
|
||||
void MFTYPE MfuncParamMilUint(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_UINT ParamValue);
|
||||
void MFTYPE MfuncParamMilUint32(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_UINT32 ParamValue);
|
||||
void MFTYPE MfuncParamMilUint64(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_UINT64 ParamValue);
|
||||
void MFTYPE MfuncParamMilDouble(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_DOUBLE ParamValue);
|
||||
void MFTYPE MfuncParamMilUUID(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_UUID ParamValue);
|
||||
void MFTYPE MfuncParamDataPointer(MIL_ID ContextFuncId, MIL_INT ParamIndex, void *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
#if OldDefinesSupport
|
||||
#define MfuncParamDouble MfuncParamMilDouble // it was documented in MIL 9, so keep it
|
||||
MIL_DEPRECATED(MfuncParamDouble, 1000)
|
||||
#define MfuncParamPointer MfuncParamDataPointer
|
||||
MIL_DEPRECATED(MfuncParamPointer, 1000)
|
||||
#endif
|
||||
void MFTYPE MfuncParamIdPointer(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_ID *ParamValuePtr, MIL_INT64 MilObjectType, MIL_INT Attribute);
|
||||
void MFTYPE MfuncParamValue(MIL_ID ContextFuncId, MIL_INT ParamIndex, void *ParamValuePtr);
|
||||
MIL_INT MFTYPE MfuncGetError(MIL_ID FunctId, MIL_INT ErrorType,void* ErrorVarPtr);
|
||||
void MFTYPE MfuncFreeId(MIL_ID ContextFuncId, MIL_ID UserObjectFuncId);
|
||||
void MFTYPE MfuncFree(MIL_ID ContextFuncId);
|
||||
MIL_INT MFTYPE MfuncCall(MIL_ID ContextFuncId);
|
||||
MIL_INT MFTYPE MfuncInquire(MIL_ID MilObjectId, MIL_INT64 InquireType, void* UserVarPtr);
|
||||
void* MFTYPE MfuncMemory(MIL_INT64 Operation, MIL_INT OperationValue, MIL_INT64 OperationFlag, void *DataPointer);
|
||||
MIL_ID MFTYPE MfuncGetNextId(MIL_ID CurrentId);
|
||||
void MFTYPE MfuncMDTrace(void** FileHandle, MIL_INT64 Action, void* DataPointer);
|
||||
void MFTYPE MfuncTraceTimerRead(MIL_DOUBLE* pCurrentTime);
|
||||
#if M_MIL_USE_UNICODE
|
||||
void MFTYPE MfuncTraceObjectMILW(MIL_UINT64 TraceType, MIL_CONST_TEXT_PTR String1);
|
||||
void MFTYPE MfuncTraceObjectMILA(MIL_UINT64 TraceType, MIL_CONST_TEXT_PTR String1);
|
||||
#if M_MIL_UNICODE_API
|
||||
#define MfuncTraceObjectMIL MfuncTraceObjectMILW
|
||||
#else
|
||||
#define MfuncTraceObjectMIL MfuncTraceObjectMILA
|
||||
#endif
|
||||
#else
|
||||
void MFTYPE MfuncTraceObjectMIL(MIL_UINT64 TraceType, MIL_CONST_TEXT_PTR String1);
|
||||
#endif
|
||||
|
||||
|
||||
/* The following MfuncParamValue are for getting the value by type */
|
||||
void MFTYPE MfuncParamValueMilInt(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_INT *ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueMilInt32(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_INT32 *ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueMilInt64(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_INT64 *ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueMilUint(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_UINT *ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueMilUint32(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_UINT32 *ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueMilUint64(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_UINT64 *ParamValuePtr);
|
||||
|
||||
void MFTYPE MfuncParamValueMilDouble(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_DOUBLE *ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueMilUUID(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_UUID *ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueMilId(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_ID *ParamValuePtr);
|
||||
|
||||
void MFTYPE MfuncParamValueArrayMilDouble(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_DOUBLE **ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueConstArrayMilDouble(MIL_ID ContextFuncId, MIL_INT ParamIndex, const MIL_DOUBLE **ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueArrayMilUUID(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_UUID **ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueConstArrayMilUUID(MIL_ID ContextFuncId, MIL_INT ParamIndex, const MIL_UUID **ParamValuePtr);
|
||||
|
||||
#if OldDefinesSupport
|
||||
#define MfuncParamValueDouble MfuncParamValueMilDouble // it was documented in MIL 9, so keep it
|
||||
MIL_DEPRECATED(MfuncParamValueDouble, 1000)
|
||||
#define MfuncParamValueId MfuncParamValueMilId // it was documented in MIL 9, so keep it
|
||||
MIL_DEPRECATED(MfuncParamValueId, 1000)
|
||||
#define MfuncParamValueArrayDouble MfuncParamValueArrayMilDouble // it was documented in MIL 9, so keep it
|
||||
MIL_DEPRECATED(MfuncParamValueArrayDouble, 1000)
|
||||
#define MfuncParamValueConstArrayDouble MfuncParamValueConstArrayMilDouble // it was documented in MIL 9, so keep it
|
||||
MIL_DEPRECATED(MfuncParamValueConstArrayDouble, 1000)
|
||||
#endif
|
||||
|
||||
void MFTYPE MfuncParamValueMilTextA(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_TEXTA_PTR *ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueConstMilTextA(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_CONST_TEXTA_PTR *ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueFilenameA(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_CONST_TEXTA_PTR *ParamValuePtr);
|
||||
|
||||
#if M_MIL_USE_UNICODE
|
||||
#if M_MIL_UNICODE_API
|
||||
#define MfuncParamValueMilText MfuncParamValueMilTextW
|
||||
#define MfuncParamValueConstMilText MfuncParamValueConstMilTextW
|
||||
#define MfuncParamValueFilename MfuncParamValueFilenameW
|
||||
#else
|
||||
#define MfuncParamValueMilText MfuncParamValueMilTextA
|
||||
#define MfuncParamValueConstMilText MfuncParamValueConstMilTextA
|
||||
#define MfuncParamValueFilename MfuncParamValueFilenameA
|
||||
#endif
|
||||
|
||||
void MFTYPE MfuncParamValueMilTextW(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_TEXTW_PTR *ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueConstMilTextW(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_CONST_TEXTW_PTR *ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueFilenameW(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_CONST_TEXTW_PTR *ParamValuePtr);
|
||||
|
||||
#else
|
||||
|
||||
void MFTYPE MfuncParamValueMilText(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_TEXT_PTR *ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueConstMilText(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_CONST_TEXT_PTR *ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueFilename(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_CONST_TEXT_PTR *ParamValuePtr);
|
||||
|
||||
#endif
|
||||
|
||||
void MFTYPE MfuncParamValueArrayMilInt(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_INT **ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueArrayMilUint(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_UINT **ParamValuePtr);
|
||||
|
||||
void MFTYPE MfuncParamValueArrayMilInt32(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_INT32 **ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueArrayMilUint32(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_UINT32 **ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueArrayMilInt64(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_INT64 **ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueArrayMilUint64(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_UINT64 **ParamValuePtr);
|
||||
|
||||
void MFTYPE MfuncParamValueConstArrayMilInt32(MIL_ID ContextFuncId, MIL_INT ParamIndex, const MIL_INT32 **ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueConstArrayMilUint32(MIL_ID ContextFuncId, MIL_INT ParamIndex, const MIL_UINT32 **ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueConstArrayMilInt64(MIL_ID ContextFuncId, MIL_INT ParamIndex, const MIL_INT64 **ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueConstArrayMilUint64(MIL_ID ContextFuncId, MIL_INT ParamIndex, const MIL_UINT64 **ParamValuePtr);
|
||||
|
||||
void MFTYPE MfuncParamValueArrayMilId(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_ID **ParamValuePtr);
|
||||
#if OldDefinesSupport
|
||||
#define MfuncParamValueArrayId MfuncParamValueArrayMilId // it was documented in MIL 9, so keep it
|
||||
MIL_DEPRECATED(MfuncParamValueArrayId, 1000)
|
||||
#endif
|
||||
|
||||
void MFTYPE MfuncParamValuePointer(MIL_ID ContextFuncId, MIL_INT ParamIndex, void ** ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueConstDataPointer(MIL_ID ContextFuncId, MIL_INT ParamIndex, const void ** ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueConstArrayMilId(MIL_ID ContextFuncId, MIL_INT ParamIndex,const MIL_ID **ParamValuePtr);
|
||||
#if OldDefinesSupport
|
||||
#define MfuncParamValueConstArrayId MfuncParamValueConstArrayMilId // it was documented in MIL 9, so keep it
|
||||
MIL_DEPRECATED(MfuncParamValueConstArrayId, 1000)
|
||||
#endif
|
||||
void MFTYPE MfuncParamValueConstArrayMilInt(MIL_ID ContextFuncId, MIL_INT ParamIndex, const MIL_INT **ParamValuePtr);
|
||||
void MFTYPE MfuncParamValueConstArrayMilUint(MIL_ID ContextFuncId, MIL_INT ParamIndex, const MIL_UINT **ParamValuePtr);
|
||||
|
||||
|
||||
void MFTYPE MfuncParamArrayMilInt(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_INT *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
void MFTYPE MfuncParamArrayMilDouble(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_DOUBLE *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
void MFTYPE MfuncParamArrayMilUUID(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_UUID *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
#if OldDefinesSupport
|
||||
#define MfuncParamArrayDouble MfuncParamArrayMilDouble // it was documented in MIL 9, so keep it
|
||||
MIL_DEPRECATED(MfuncParamArrayDouble, 1000)
|
||||
#endif
|
||||
void MFTYPE MfuncParamArrayMilUint(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_UINT *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
void MFTYPE MfuncParamArrayMilId(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_ID *ParamValuePtr, MIL_INT NumOfItems, MIL_INT64 MilObjectType, MIL_INT Attribute);
|
||||
#if OldDefinesSupport
|
||||
#define MfuncParamArrayId MfuncParamArrayMilId // it was documented in MIL 9, so keep it
|
||||
MIL_DEPRECATED(MfuncParamArrayId, 1000)
|
||||
#endif
|
||||
void MFTYPE MfuncParamArrayMilInt32(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_INT32 *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
void MFTYPE MfuncParamArrayMilInt64(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_INT64 *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
void MFTYPE MfuncParamArrayMilUint32(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_UINT32 *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
void MFTYPE MfuncParamArrayMilUint64(MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_UINT64 *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
|
||||
void MFTYPE MfuncParamConstArrayMilDouble(MIL_ID ContextFuncId, MIL_INT ParamIndex, const MIL_DOUBLE *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
void MFTYPE MfuncParamConstArrayMilUUID(MIL_ID ContextFuncId, MIL_INT ParamIndex, const MIL_UUID *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
#if OldDefinesSupport
|
||||
#define MfuncParamConstArrayDouble MfuncParamConstArrayMilDouble // it was documented in MIL 9, so keep it
|
||||
MIL_DEPRECATED(MfuncParamConstArrayDouble, 1000)
|
||||
#endif
|
||||
void MFTYPE MfuncParamConstArrayMilInt32(MIL_ID ContextFuncId, MIL_INT ParamIndex, const MIL_INT32 *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
void MFTYPE MfuncParamConstArrayMilInt64(MIL_ID ContextFuncId, MIL_INT ParamIndex, const MIL_INT64 *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
void MFTYPE MfuncParamConstArrayMilUint32(MIL_ID ContextFuncId, MIL_INT ParamIndex, const MIL_UINT32 *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
void MFTYPE MfuncParamConstArrayMilUint64(MIL_ID ContextFuncId, MIL_INT ParamIndex, const MIL_UINT64 *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
void MFTYPE MfuncParamConstArrayMilId(MIL_ID ContextFuncId, MIL_INT ParamIndex,const MIL_ID *ParamValuePtr, MIL_INT NumOfItems, MIL_INT64 MilObjectType, MIL_INT Attribute);
|
||||
#if OldDefinesSupport
|
||||
#define MfuncParamConstArrayId MfuncParamConstArrayMilId // it was documented in MIL 9, so keep it
|
||||
MIL_DEPRECATED(MfuncParamConstArrayId, 1000)
|
||||
#endif
|
||||
void MFTYPE MfuncParamConstArrayMilInt(MIL_ID ContextFuncId, MIL_INT ParamIndex, const MIL_INT *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
void MFTYPE MfuncParamConstArrayMilUint(MIL_ID ContextFuncId, MIL_INT ParamIndex, const MIL_UINT *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
|
||||
void MFTYPE MfuncParamConstDataPointer(MIL_ID ContextFuncId, MIL_INT ParamIndex, const void * ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
MIL_INT32 StructSize;
|
||||
MIL_INT32 ScriptPathSize;
|
||||
MIL_INT32 ScriptPathOffset;
|
||||
MIL_INT32 ScriptFunctionNameSize;
|
||||
MIL_INT32 ScriptFunctionNameOffset;
|
||||
MIL_INT32 DebugPathSize;
|
||||
MIL_INT32 DebugPathOffset;
|
||||
MIL_INT32 ReferenceListSize;
|
||||
MIL_INT32 ReferenceListOffset;
|
||||
MIL_INT64 Compile;
|
||||
MIL_INT64 DebugInfo;
|
||||
} M_FUNCSCRIPT_CALL_DATA;
|
||||
|
||||
/*The following Mfunc functions are obsolete*/
|
||||
MIL_INT MFTYPE MfuncStart(MIL_ID ContextFuncId); /*Replaced by MfuncCall*/
|
||||
void MFTYPE MfuncFreeAndEnd(MIL_ID ContextFuncId); /*Replaced by MfuncCall*/
|
||||
MIL_INT MFTYPE MfuncModified(MIL_ID ImageId); /*Replaced by MbufControl(M_MODIFIED)*/
|
||||
MIL_INT MFTYPE MfuncParamRegister(MIL_ID ContextFuncId); /*Parameters must always be registered*/
|
||||
MIL_INT MFTYPE MfuncIdGetObjectType(MIL_ID FunctionId, MIL_ID ObjectId); /*Replaced by MfuncInquire*/
|
||||
void MFTYPE MfuncIdSetUserPtr(MIL_ID FunctionId, MIL_ID ObjectId, void *UserPtr); /*Replaced by MfuncControl*/
|
||||
void* MFTYPE MfuncIdGetUserPtr(MIL_ID FunctionId, MIL_ID ObjectId); /*Replaced by MfuncInquire*/
|
||||
|
||||
void MFTYPE MfuncControlInt64(MIL_ID ContextFuncId, MIL_INT64 ControlType, MIL_INT64 ControlValue);
|
||||
void MFTYPE MfuncControlDouble(MIL_ID ContextFuncId, MIL_INT64 ControlType, MIL_DOUBLE ControlValue);
|
||||
|
||||
#if !M_MIL_USE_64BIT
|
||||
void MFTYPE MfuncControl(MIL_ID ContextFuncId, MIL_INT64 ControlType, MIL_DOUBLE ControlValue);
|
||||
#endif //M_MIL_USE_64BIT
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#if M_MIL_USE_64BIT
|
||||
|
||||
#ifdef __cplusplus
|
||||
//////////////////////////////////////////////////////////////
|
||||
// MfuncControl function definition when compiling c++ files
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
inline void MfuncControl( MIL_ID ContextFuncId,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_DOUBLE ControlValue)
|
||||
{
|
||||
MfuncControlDouble(ContextFuncId, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
#else
|
||||
//////////////////////////////////////////////////////////////
|
||||
// For C file, call the default function, i.e. Int64 one
|
||||
//////////////////////////////////////////////////////////////
|
||||
#define MfuncControl MfuncControlInt64
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif //M_MIL_USE_64BIT
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// MfuncControl function definition when compiling c++ files
|
||||
//////////////////////////////////////////////////////////////
|
||||
#ifdef __cplusplus
|
||||
|
||||
inline void MfuncControl(MIL_ID ContextFuncId,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_INT64 ControlValue)
|
||||
{
|
||||
MfuncControlInt64(ContextFuncId, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
#if !(M_MIL_USE_LINUX && M_MIL_USE_64BIT)
|
||||
inline void MfuncControl(MIL_ID ContextFuncId,
|
||||
MIL_INT64 ControlType,
|
||||
int ControlValue)
|
||||
{
|
||||
MfuncControlInt64(ContextFuncId, ControlType, ControlValue);
|
||||
}
|
||||
#endif
|
||||
|
||||
inline void MfuncControl(MIL_ID ContextFuncId,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_INT32 ControlValue)
|
||||
{
|
||||
MfuncControlInt64(ContextFuncId, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline void MfuncControl(MIL_ID ContextFuncId,
|
||||
MIL_INT64 ControlType,
|
||||
MIL_CONST_TEXT_PTR ControlValue)
|
||||
{
|
||||
MfuncControl(ContextFuncId, ControlType, M_PTR_TO_MIL_INT(ControlValue));
|
||||
}
|
||||
|
||||
inline void MfuncControl(MIL_ID ContextFuncId,
|
||||
MIL_INT64 ControlType,
|
||||
void* ControlValue)
|
||||
{
|
||||
MfuncControl(ContextFuncId, ControlType, M_PTR_TO_MIL_INT(ControlValue));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
74
Include/ClassicMIL/milfuncll.h
Normal file
74
Include/ClassicMIL/milfuncll.h
Normal file
@ -0,0 +1,74 @@
|
||||
//MfuncBuf DTK functions
|
||||
|
||||
/***************************************************************************/
|
||||
/*
|
||||
|
||||
Filename: MILFUNC.H
|
||||
Revision: 10.60.0776
|
||||
|
||||
Content : This file contains the prototypes for the Matrox
|
||||
Imaging Library (MIL) MfuncBuf DTK functions.
|
||||
|
||||
Copyright © Matrox Electronic Systems Ltd., 1992-2023.
|
||||
All Rights Reserved
|
||||
|
||||
*/
|
||||
/***************************************************************************/
|
||||
|
||||
#ifndef __MFUNCBUF_H
|
||||
#define __MFUNCBUF_H
|
||||
|
||||
/* C++ directive if needed */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#ifndef __MILBUFFERINFO_H__
|
||||
#if !defined(M_MIL_USE_CPP_FUNC_BUF) || !M_MIL_USE_CPP_FUNC_BUF
|
||||
typedef void* MIL_BUFFER_INFO;
|
||||
MIL_DOUBLE MFTYPE MfuncBufMaxValue(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_DOUBLE MFTYPE MfuncBufMinValue(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_ID MFTYPE MfuncBufDriverId(MIL_BUFFER_INFO BufferInfoPtr);
|
||||
void* MFTYPE MfuncBufHostAddress(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
void* MFTYPE MfuncBufHostAddressBand(MIL_BUFFER_INFO BufferInfoHandle, MIL_INT Band);
|
||||
MIL_UINT64 MFTYPE MfuncBufPhysicalAddressBand(MIL_BUFFER_INFO BufferInfoHandle, MIL_INT Band);
|
||||
MIL_UINT64 MFTYPE MfuncBufPhysicalAddress(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_INT MFTYPE MfuncBufSizeX(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_INT MFTYPE MfuncBufSizeY(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_INT MFTYPE MfuncBufSizeBand(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_INT MFTYPE MfuncBufSizeBit(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_INT MFTYPE MfuncBufType(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_INT MFTYPE MfuncBufPitch(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_INT MFTYPE MfuncBufPitchByte(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_INT64 MFTYPE MfuncBufAttribute(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_INT64 MFTYPE MfuncBufFormat(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_INT64 MFTYPE MfuncBufFlags(MIL_BUFFER_INFO BufInfoPtr);
|
||||
MIL_INT MFTYPE MfuncBufLockable(MIL_BUFFER_INFO BufInfoPtr);
|
||||
MIL_INT MFTYPE MfuncBufParentOffsetX(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_INT MFTYPE MfuncBufParentOffsetY(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_INT MFTYPE MfuncBufParentOffsetBand(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_INT MFTYPE MfuncBufAncestorOffsetX(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_INT MFTYPE MfuncBufAncestorOffsetY(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_INT MFTYPE MfuncBufAncestorOffsetBand(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_INT MFTYPE MfuncBufAncestorOffsetBit(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_INT MFTYPE MfuncBufNativeId(MIL_BUFFER_INFO BufInfoPtr);
|
||||
MIL_ID MFTYPE MfuncBufId(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_ID MFTYPE MfuncBufHostId(MIL_BUFFER_INFO BufInfoPtr);
|
||||
MIL_ID MFTYPE MfuncBufParentId(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_ID MFTYPE MfuncBufAncestorId(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_ID MFTYPE MfuncBufOwnerSystemId(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_INT MFTYPE MfuncBufOwnerSystemType(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
#endif
|
||||
#else
|
||||
MIL_DOUBLE MFTYPE MfuncBufMaxValue(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_DOUBLE MFTYPE MfuncBufMinValue(MIL_BUFFER_INFO BufferInfoHandle);
|
||||
MIL_ID MFTYPE MfuncBufDriverId(MIL_BUFFER_INFO BufferInfoPtr);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
1391
Include/ClassicMIL/milos.h
Normal file
1391
Include/ClassicMIL/milos.h
Normal file
File diff suppressed because it is too large
Load Diff
10069
Include/ClassicMIL/milproto.h
Normal file
10069
Include/ClassicMIL/milproto.h
Normal file
File diff suppressed because it is too large
Load Diff
311
Include/ClassicMIL/milsetup.h
Normal file
311
Include/ClassicMIL/milsetup.h
Normal file
@ -0,0 +1,311 @@
|
||||
/************************************************************************/
|
||||
/*
|
||||
*
|
||||
* Filename : MILSETUP.H
|
||||
* Revision : 10.60.0776
|
||||
* Content : This file contains definitions for specifying the target
|
||||
* compile environment and the default state to set for
|
||||
* MIL (Matrox Imaging Library). It also defines the
|
||||
* MappAllocDefault() and MappFreeDefault() macros.
|
||||
*
|
||||
* Copyright © Matrox Electronic Systems Ltd., 1992-2023.
|
||||
* All Rights Reserved
|
||||
*************************************************************************/
|
||||
#ifndef __MILSETUP_H__
|
||||
#define __MILSETUP_H__
|
||||
|
||||
/************************************************************************/
|
||||
/* MIL COMPILE VERSION */
|
||||
/* These defines are for Matrox internal purpose only and are NOT meant */
|
||||
/* to be edited by the client. */
|
||||
/************************************************************************/
|
||||
#if !defined(MIL_COMPILE_VERSION_HEX) || (MIL_COMPILE_VERSION_HEX== 0)
|
||||
#ifdef MIL_COMPILE_VERSION_HEX
|
||||
#undef MIL_COMPILE_VERSION_HEX
|
||||
#endif
|
||||
#define MIL_COMPILE_VERSION_HEX 0x1060
|
||||
#endif
|
||||
|
||||
// Let's put the hex value in decimal.
|
||||
#define MIL_COMPILE_VERSION ((((MIL_COMPILE_VERSION_HEX >> 12) & 0xf) * 1000) + (((MIL_COMPILE_VERSION_HEX >> 8) & 0xf) * 100) + (((MIL_COMPILE_VERSION_HEX >> 4) & 0xf) * 10) + (((MIL_COMPILE_VERSION_HEX) & 0xf) ))
|
||||
#define MIL_COMPILE_TRUNK_VERSION 1095
|
||||
#define MIL_COMPILE_NEXT_MAJOR_VERSION 1100
|
||||
|
||||
/************************************************************************/
|
||||
/* COMPILATION FLAG */
|
||||
/* One and only one flag must be active */
|
||||
/************************************************************************/
|
||||
#ifndef M_MIL_USE_OS
|
||||
#define M_MIL_USE_OS 1
|
||||
|
||||
#if(defined(__clang__))
|
||||
#define M_MIL_USE_CLANG 1
|
||||
#else
|
||||
#define M_MIL_USE_CLANG 0
|
||||
#endif
|
||||
|
||||
#if defined(__linux__)
|
||||
#ifdef __aarch64__
|
||||
#define M_MIL_USE_ARM 1
|
||||
#else
|
||||
#define M_MIL_USE_ARM 0
|
||||
#endif
|
||||
#ifdef __x86_64__
|
||||
#define M_MIL_USE_INTEL_CPU 1
|
||||
#else
|
||||
#define M_MIL_USE_INTEL_CPU 0
|
||||
#endif
|
||||
#define M_MIL_USE_WINDOWS 0
|
||||
#define M_MIL_USE_LINUX 1
|
||||
#define M_MIL_USE_NEW_STDHEADERS 1
|
||||
#if defined(__x86_64__) || defined(__aarch64__)
|
||||
#define M_MIL_USE_64BIT 1
|
||||
#else
|
||||
#define M_MIL_USE_64BIT 0
|
||||
#endif
|
||||
|
||||
#ifndef M_LINUX_KERNEL
|
||||
#define M_LINUX_KERNEL 0
|
||||
#endif
|
||||
|
||||
#ifdef __INTEL_COMPILER
|
||||
#define M_MIL_USE_LINTEL 1
|
||||
#else
|
||||
#define M_MIL_USE_LINTEL 0
|
||||
#endif
|
||||
#else
|
||||
#define M_MIL_USE_WINDOWS 1
|
||||
#define M_MIL_USE_LINUX 0
|
||||
#define M_MIL_USE_ARM 0
|
||||
#if defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC))
|
||||
#define M_MIL_USE_INTEL_CPU 1
|
||||
#else
|
||||
#define M_MIL_USE_INTEL_CPU 0
|
||||
#endif
|
||||
#if defined(_WIN64) || defined(WIN64)
|
||||
#define M_MIL_USE_64BIT 1
|
||||
#else
|
||||
#define M_MIL_USE_64BIT 0
|
||||
#endif
|
||||
|
||||
#if (_MSC_VER >= 1400) && !defined(M_MIL_USING_SAFE_CRT)
|
||||
#define M_MIL_USING_SAFE_CRT 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__POWERPC__)
|
||||
#error "PowerPC not supported"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !(M_MIL_USE_WINDOWS || M_MIL_USE_LINUX)
|
||||
#error "You must set at least one compilation flag."
|
||||
#endif
|
||||
|
||||
#if ( (M_MIL_USE_WINDOWS && M_MIL_USE_LINUX) )
|
||||
#error "You must select one and only one compilation flag."
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/*This flag indicates if MIL has been compiled without UNICODE support */
|
||||
/*If MIL supports UNICODE, user can define UNICODE to use UNICODE API */
|
||||
/************************************************************************/
|
||||
#if !defined(M_MIL_USE_UNICODE) && !M_MIL_USE_LINUX
|
||||
#define M_MIL_USE_UNICODE 1
|
||||
#elif !defined (M_MIL_USE_UNICODE)
|
||||
#define M_MIL_USE_UNICODE 0
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(UNICODE)
|
||||
#define M_MIL_UNICODE_API 1
|
||||
#else
|
||||
#define M_MIL_UNICODE_API 0
|
||||
#endif
|
||||
|
||||
#if M_MIL_USE_LINUX || M_MIL_UNICODE_API
|
||||
#define M_MIL_USE_TTF_UNICODE 1
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/*This flag enable or disable deprecated defines. */
|
||||
/************************************************************************/
|
||||
#if !defined(M_MIL_WARN_ON_DEPRECATED)
|
||||
#if (defined(_MSC_VER) && (_MSC_VER >= 1400) && !M_MIL_USE_CLANG) || (defined(__INTEL_COMPILER) && !defined (M_LINUX_DISTCC))
|
||||
#define M_MIL_WARN_ON_DEPRECATED 1
|
||||
#else
|
||||
#define M_MIL_WARN_ON_DEPRECATED 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if M_MIL_WARN_ON_DEPRECATED
|
||||
// Define true (1) or false (2) depends on MIL_COMPILE_VERSION and START_VERSION.
|
||||
#if MIL_COMPILE_VERSION >= 1000
|
||||
#define MIL_COMPILE_VERSION_HIGHER_OR_EQUAL_TO_1000 1
|
||||
#else
|
||||
#define MIL_COMPILE_VERSION_HIGHER_OR_EQUAL_TO_1000 0
|
||||
#endif
|
||||
#if MIL_COMPILE_VERSION >= 1010
|
||||
#define MIL_COMPILE_VERSION_HIGHER_OR_EQUAL_TO_1010 1
|
||||
#else
|
||||
#define MIL_COMPILE_VERSION_HIGHER_OR_EQUAL_TO_1010 0
|
||||
#endif
|
||||
#if MIL_COMPILE_VERSION >= 1020
|
||||
#define MIL_COMPILE_VERSION_HIGHER_OR_EQUAL_TO_1020 1
|
||||
#else
|
||||
#define MIL_COMPILE_VERSION_HIGHER_OR_EQUAL_TO_1020 0
|
||||
#endif
|
||||
#if MIL_COMPILE_VERSION >= 1030
|
||||
#define MIL_COMPILE_VERSION_HIGHER_OR_EQUAL_TO_1030 1
|
||||
#else
|
||||
#define MIL_COMPILE_VERSION_HIGHER_OR_EQUAL_TO_1030 0
|
||||
#endif
|
||||
#if MIL_COMPILE_VERSION >= 1040
|
||||
#define MIL_COMPILE_VERSION_HIGHER_OR_EQUAL_TO_1040 1
|
||||
#else
|
||||
#define MIL_COMPILE_VERSION_HIGHER_OR_EQUAL_TO_1040 0
|
||||
#endif
|
||||
#if MIL_COMPILE_VERSION >= 1050
|
||||
#define MIL_COMPILE_VERSION_HIGHER_OR_EQUAL_TO_1050 1
|
||||
#else
|
||||
#define MIL_COMPILE_VERSION_HIGHER_OR_EQUAL_TO_1050 0
|
||||
#endif
|
||||
#if MIL_COMPILE_VERSION >= 1060
|
||||
#define MIL_COMPILE_VERSION_HIGHER_OR_EQUAL_TO_1060 1
|
||||
#else
|
||||
#define MIL_COMPILE_VERSION_HIGHER_OR_EQUAL_TO_1060 0
|
||||
#endif
|
||||
|
||||
#if MIL_COMPILE_VERSION >= MIL_COMPILE_TRUNK_VERSION
|
||||
#define MIL_COMPILE_VERSION_HIGHER_OR_EQUAL_TO_1095 1
|
||||
#else
|
||||
#define MIL_COMPILE_VERSION_HIGHER_OR_EQUAL_TO_1095 0
|
||||
#endif
|
||||
#if MIL_COMPILE_VERSION >= MIL_COMPILE_NEXT_MAJOR_VERSION
|
||||
#define MIL_COMPILE_VERSION_HIGHER_OR_EQUAL_TO_1100 1
|
||||
#else
|
||||
#define MIL_COMPILE_VERSION_HIGHER_OR_EQUAL_TO_1100 0
|
||||
#endif
|
||||
|
||||
#define PRIMITIVE_CAT(X, ...) X ## __VA_ARGS__
|
||||
#define MIL_COMPILE_VERSION_HIGHER_OR_EQUAL_TO(X) PRIMITIVE_CAT(MIL_COMPILE_VERSION_HIGHER_OR_EQUAL_TO_, X)
|
||||
#define IIF(X) PRIMITIVE_CAT(IIF_, X)
|
||||
#define IIF_0(X, ...) __VA_ARGS__
|
||||
#define IIF_1(X, ...) X
|
||||
|
||||
#define MIL_DEPRECATED(IDENTIFIER, START_VERSION) IIF(MIL_COMPILE_VERSION_HIGHER_OR_EQUAL_TO(START_VERSION)) (__pragma(deprecated(#IDENTIFIER)), /*nothing*/)
|
||||
#else
|
||||
#define MIL_DEPRECATED(IDENTIFIER, START_VERSION)
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef M_MIL_WARN_ON_DEPRECATED_MOS
|
||||
#define M_MIL_WARN_ON_DEPRECATED_MOS 1
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef M_MILIM_FUNCTION_DEPRECATION_WARNING
|
||||
#if defined(OldDefinesSupport) && OldDefinesSupport
|
||||
#define M_MILIM_FUNCTION_DEPRECATION_WARNING 1
|
||||
#else
|
||||
#define M_MILIM_FUNCTION_DEPRECATION_WARNING 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* DEFAULT STATE INITIALIZATION FLAG */
|
||||
/************************************************************************/
|
||||
|
||||
//Defines for INSTALLDIR support
|
||||
#define M_INSTALL_DIR MIL_TEXT("///INSTALLDIR///")
|
||||
#if MIL_COMPILE_VERSION < MIL_COMPILE_TRUNK_VERSION
|
||||
#define INSTALL_DIR M_INSTALL_DIR
|
||||
#endif
|
||||
#define M_TEMP_DIR MIL_TEXT("///MILTEMPDIRDIR///")
|
||||
#define M_USER_DLL_DIR MIL_TEXT("///MILUSERDLLDIR///")
|
||||
|
||||
#if M_MIL_USE_LINUX
|
||||
#define M_IMAGE_PATH M_INSTALL_DIR MIL_TEXT("images/")
|
||||
#define M_CONTEXT_PATH M_INSTALL_DIR MIL_TEXT("contexts/")
|
||||
#else
|
||||
#define M_IMAGE_PATH M_INSTALL_DIR MIL_TEXT("images\\")
|
||||
#define M_CONTEXT_PATH M_INSTALL_DIR MIL_TEXT("contexts\\")
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* DEFAULT SYSTEM SPECIFICATIONS */
|
||||
/************************************************************************/
|
||||
|
||||
/*DO NOT EDIT: you should change the default values with the Mil Configuration utility*/
|
||||
#if OldDefinesSupport
|
||||
#define M_DEF_SYSTEM_NUM M_DEFAULT
|
||||
MIL_DEPRECATED(M_DEF_SYSTEM_NUM, 1000)
|
||||
#define M_SYSTEM_SETUP M_DEF_SYSTEM_TYPE
|
||||
MIL_DEPRECATED(M_SYSTEM_SETUP, 1000)
|
||||
#define M_DEF_SYSTEM_TYPE M_SYSTEM_DEFAULT
|
||||
MIL_DEPRECATED(M_DEF_SYSTEM_TYPE, 1000)
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* DEFAULT DIGITIZER SPECIFICATIONS */
|
||||
/************************************************************************/
|
||||
|
||||
/*DO NOT EDIT: you should change the default values with the Mil Configuration utility*/
|
||||
#if OldDefinesSupport
|
||||
#define M_DEF_DIGITIZER_INIT M_DEFAULT
|
||||
MIL_DEPRECATED(M_DEF_DIGITIZER_INIT, 1000)
|
||||
#define M_DEF_DIGITIZER_NUM M_DEFAULT
|
||||
MIL_DEPRECATED(M_DEF_DIGITIZER_NUM, 1000)
|
||||
#define M_CAMERA_SETUP M_DEF_DIGITIZER_FORMAT
|
||||
MIL_DEPRECATED(M_CAMERA_SETUP, 1000)
|
||||
#define M_DEF_DIGITIZER_FORMAT MIL_TEXT("M_DEFAULT")
|
||||
MIL_DEPRECATED(M_DEF_DIGITIZER_FORMAT, 1000)
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* DEFAULT DISPLAY SPECIFICATIONS */
|
||||
/************************************************************************/
|
||||
|
||||
/*DO NOT EDIT: you should change the default values with the Mil Configuration utility*/
|
||||
#if OldDefinesSupport
|
||||
#define M_DEF_DISPLAY_FORMAT MIL_TEXT("M_DEFAULT")
|
||||
#define M_DISPLAY_SETUP M_DEF_DISPLAY_FORMAT
|
||||
MIL_DEPRECATED(M_DISPLAY_SETUP, 1000)
|
||||
MIL_DEPRECATED(M_DEF_DISPLAY_FORMAT, 1000)
|
||||
#define M_DEF_DISPLAY_INIT M_DEFAULT
|
||||
MIL_DEPRECATED(M_DEF_DISPLAY_INIT, 1000)
|
||||
#define M_DEF_DISPLAY_NUM M_DEFAULT
|
||||
MIL_DEPRECATED(M_DEF_DISPLAY_NUM, 1000)
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* DEFAULT IMAGE BUFFER SPECIFICATIONS */
|
||||
/************************************************************************/
|
||||
#if OldDefinesSupport
|
||||
#define M_DEF_IMAGE_NUMBANDS_MIN 1
|
||||
MIL_DEPRECATED(M_DEF_IMAGE_NUMBANDS_MIN, 1000)
|
||||
#define M_DEF_IMAGE_SIZE_X_MIN 50
|
||||
MIL_DEPRECATED(M_DEF_IMAGE_SIZE_X_MIN, 1000)
|
||||
#define M_DEF_IMAGE_SIZE_Y_MIN 50
|
||||
MIL_DEPRECATED(M_DEF_IMAGE_SIZE_Y_MIN, 1000)
|
||||
#define M_DEF_IMAGE_SIZE_X_MAX 4000000
|
||||
MIL_DEPRECATED(M_DEF_IMAGE_SIZE_X_MAX, 1000)
|
||||
#define M_DEF_IMAGE_SIZE_Y_MAX 4000000
|
||||
MIL_DEPRECATED(M_DEF_IMAGE_SIZE_Y_MAX, 1000)
|
||||
#define M_DEF_IMAGE_TYPE (8+M_UNSIGNED)
|
||||
MIL_DEPRECATED(M_DEF_IMAGE_TYPE, 1000)
|
||||
#define M_DEF_IMAGE_ATTRIBUTE_MIN (M_IMAGE+M_PROC)
|
||||
MIL_DEPRECATED(M_DEF_IMAGE_ATTRIBUTE_MIN, 1000)
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* Enables DMIL monitoring auto-publish mode. 0 == Disabled */
|
||||
/************************************************************************/
|
||||
#define M_DEF_AUTO_PUBLISH 0
|
||||
|
||||
#if OldDefinesSupport
|
||||
#define MIL_DLLFUNC
|
||||
#endif
|
||||
|
||||
#endif /*__MILSETUP_H__*/
|
||||
1883
Include/ClassicMIL/milstring.h
Normal file
1883
Include/ClassicMIL/milstring.h
Normal file
File diff suppressed because it is too large
Load Diff
558
Include/ClassicMIL/miluniqueid.h
Normal file
558
Include/ClassicMIL/miluniqueid.h
Normal file
@ -0,0 +1,558 @@
|
||||
/************************************************************************/
|
||||
/*
|
||||
*
|
||||
* Filename : miluniqueid.h
|
||||
* Revision : 10.60.0776
|
||||
* Content : MIL_UNIQUE_ID C++ RAII class for a MIL_ID
|
||||
*
|
||||
* Copyright © Matrox Electronic Systems Ltd., 1992-2023.
|
||||
* All Rights Reserved
|
||||
*************************************************************************/
|
||||
#ifndef __UNIQUE_MIL_ID_H
|
||||
#define __UNIQUE_MIL_ID_H
|
||||
|
||||
#ifndef M_MIL_USE_MIL_UNIQUE_ID
|
||||
#if defined(__cplusplus) && (!defined(M_COMPILING_MILDLL) || !M_COMPILING_MILDLL) && (!defined(M_LINUX_KERNEL) || !M_LINUX_KERNEL) && (!defined(M_WINDOWS_NT_KERNEL_MODE) || !M_WINDOWS_NT_KERNEL_MODE)
|
||||
#define M_MIL_USE_MIL_UNIQUE_ID 1
|
||||
#else
|
||||
#define M_MIL_USE_MIL_UNIQUE_ID 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if M_MIL_USE_MIL_UNIQUE_ID
|
||||
|
||||
typedef void (MFTYPE MilFreeFuncType)(MIL_ID Id);
|
||||
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
|
||||
template <MilFreeFuncType FreeFunc>
|
||||
inline bool MilIsCorrectObjectType(MIL_INT64 ObjectType);
|
||||
|
||||
// Functions used in debug to report an error if a MIL object ends up in the wrong
|
||||
// MIL_UNIQUE_ID type.
|
||||
|
||||
template <> inline bool MilIsCorrectObjectType<&MappFree>(MIL_INT64 ObjectType)
|
||||
{
|
||||
return ObjectType == M_APPLICATION;
|
||||
}
|
||||
|
||||
template <> inline bool MilIsCorrectObjectType<&MappCloseConnection>(MIL_INT64 ObjectType)
|
||||
{
|
||||
return ObjectType == M_APPLICATION;
|
||||
}
|
||||
|
||||
template <> inline bool MilIsCorrectObjectType<&MbufFree>(MIL_INT64 ObjectType)
|
||||
{
|
||||
return M_IS_BUFFER_TYPE(ObjectType) || ObjectType == M_CONTAINER;
|
||||
}
|
||||
|
||||
template <> inline bool MilIsCorrectObjectType<&MdigFree>(MIL_INT64 ObjectType)
|
||||
{
|
||||
return M_IS_DIGITIZER_TYPE(ObjectType);
|
||||
}
|
||||
|
||||
template <> inline bool MilIsCorrectObjectType<&MgraFree>(MIL_INT64 ObjectType)
|
||||
{
|
||||
return ObjectType == M_GRAPHIC_CONTEXT || ObjectType == M_GRAPHIC_LIST;
|
||||
}
|
||||
|
||||
template <> inline bool MilIsCorrectObjectType<&MobjFree>(MIL_INT64 ObjectType)
|
||||
{
|
||||
return (ObjectType == M_MESSAGE_MAILBOX) ||
|
||||
(ObjectType == M_HOOK_CONTEXT) ||
|
||||
(ObjectType == M_OPAQUE_HOOK_CONTEXT) ||
|
||||
(ObjectType == M_HTTP_SERVER);
|
||||
}
|
||||
|
||||
#if !M_MIL_USE_LINUX || M_MIL_USE_64BIT
|
||||
template <> inline bool MilIsCorrectObjectType<&MseqFree>(MIL_INT64 ObjectType)
|
||||
{
|
||||
return ObjectType == M_SEQUENCE_CONTEXT;
|
||||
}
|
||||
#endif
|
||||
template <> inline bool MilIsCorrectObjectType<&MsysFree>(MIL_INT64 ObjectType)
|
||||
{
|
||||
return ObjectType == M_SYSTEM;
|
||||
}
|
||||
|
||||
template <> inline bool MilIsCorrectObjectType<&MsysIoFree>(MIL_INT64 ObjectType)
|
||||
{
|
||||
return ObjectType == M_SYS_IO_CONTEXT;
|
||||
}
|
||||
|
||||
template <> inline bool MilIsCorrectObjectType<&MthrFree>(MIL_INT64 ObjectType)
|
||||
{
|
||||
return ObjectType == M_EVENT || ObjectType == M_SYSTEM_THREAD || ObjectType == M_MUTEX;
|
||||
}
|
||||
|
||||
template <MilFreeFuncType FreeFunc>
|
||||
inline void MilCheckObjectType(MIL_ID Id)
|
||||
{
|
||||
if (!M_ID_IS_VIRTUAL_OR_NULL(Id))
|
||||
{
|
||||
MIL_INT64 ObjectType;
|
||||
MfuncInquire(Id, M_OBJECT_TYPE_EXTENDED, &ObjectType);
|
||||
if (!MilIsCorrectObjectType<FreeFunc>(ObjectType))
|
||||
SafeTypeError(MIL_TEXT("allocation function"), MIL_TEXT("Mismatch between object type and MIL_UNIQUE_ID type."));
|
||||
}
|
||||
}
|
||||
|
||||
#define MIL_CHECK_OBJECT_TYPE(Id, FreeFunc) MilCheckObjectType<FreeFunc>(Id)
|
||||
|
||||
#else
|
||||
|
||||
// In release, there is no check at ID acquisition. When the free function is called,
|
||||
// a MIL error is reported if the object type is incorrect.
|
||||
#define MIL_CHECK_OBJECT_TYPE(Id, FreeFunc)
|
||||
|
||||
#endif
|
||||
|
||||
// MIL_ID wrapper that manages its lifetime by calling the corresponding free function
|
||||
// in the destructor. Interface similar to std::unique_ptr.
|
||||
template <MilFreeFuncType FreeFunc>
|
||||
class MIL_UNIQUE_ID
|
||||
{
|
||||
public:
|
||||
explicit MIL_UNIQUE_ID(MIL_ID Id = M_NULL) MIL_NOEXCEPT
|
||||
: m_Id(Id)
|
||||
{
|
||||
MIL_CHECK_OBJECT_TYPE(m_Id, FreeFunc);
|
||||
}
|
||||
|
||||
~MIL_UNIQUE_ID() MIL_NOEXCEPT
|
||||
{
|
||||
free_id();
|
||||
}
|
||||
|
||||
#if M_MIL_USE_MOVE_SEMANTICS
|
||||
MIL_UNIQUE_ID(MIL_UNIQUE_ID&& Other) MIL_NOEXCEPT
|
||||
: m_Id(Other.m_Id)
|
||||
{
|
||||
Other.m_Id = M_NULL;
|
||||
}
|
||||
|
||||
MIL_UNIQUE_ID& operator=(MIL_UNIQUE_ID&& Other) MIL_NOEXCEPT
|
||||
{
|
||||
if (&Other != this)
|
||||
{
|
||||
free_id();
|
||||
m_Id = Other.m_Id;
|
||||
Other.m_Id = M_NULL;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Forbid construction from MIL_UNIQUE_ID of a different type.
|
||||
// (Could happen because of implicit conversion to MIL_ID)
|
||||
template <MilFreeFuncType FreeFunc2>
|
||||
MIL_UNIQUE_ID(const MIL_UNIQUE_ID<FreeFunc2>&) = delete;
|
||||
#endif
|
||||
|
||||
#if M_MIL_USE_NULLPTR
|
||||
MIL_UNIQUE_ID& operator=(std::nullptr_t) MIL_NOEXCEPT
|
||||
{
|
||||
reset();
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
MIL_ID release() MIL_NOEXCEPT
|
||||
{
|
||||
MIL_ID Id = m_Id;
|
||||
m_Id = M_NULL;
|
||||
return Id;
|
||||
}
|
||||
|
||||
void reset(MIL_ID NewId = M_NULL) MIL_NOEXCEPT
|
||||
{
|
||||
if (NewId != m_Id)
|
||||
{
|
||||
free_id();
|
||||
m_Id = NewId;
|
||||
}
|
||||
MIL_CHECK_OBJECT_TYPE(m_Id, FreeFunc);
|
||||
}
|
||||
|
||||
MIL_ID get() const MIL_NOEXCEPT
|
||||
{
|
||||
return m_Id;
|
||||
}
|
||||
|
||||
#if M_MIL_USE_REF_QUALIFIERS
|
||||
// Allow implicit conversion to MIL_ID only on non-temporary MIL_UNIQUE_IDs.
|
||||
operator MIL_ID() const & MIL_NOEXCEPT
|
||||
{
|
||||
return m_Id;
|
||||
}
|
||||
operator MIL_ID() && = delete;
|
||||
#else
|
||||
operator MIL_ID() const MIL_NOEXCEPT
|
||||
{
|
||||
return m_Id;
|
||||
}
|
||||
#endif
|
||||
|
||||
friend void swap(MIL_UNIQUE_ID& lhs, MIL_UNIQUE_ID& rhs) MIL_NOEXCEPT
|
||||
{
|
||||
MIL_ID lhsId = lhs.m_Id;
|
||||
lhs.m_Id = rhs.m_Id;
|
||||
rhs.m_Id = lhsId;
|
||||
}
|
||||
|
||||
private:
|
||||
#ifndef M_MIL_USE_MOVE_SEMANTICS
|
||||
// Copy is forbidden
|
||||
MIL_UNIQUE_ID(const MIL_UNIQUE_ID&);
|
||||
MIL_UNIQUE_ID& operator=(const MIL_UNIQUE_ID&);
|
||||
#endif
|
||||
|
||||
void free_id() MIL_NOEXCEPT
|
||||
{
|
||||
if (!M_ID_IS_VIRTUAL_OR_NULL(m_Id))
|
||||
FreeFunc(m_Id);
|
||||
}
|
||||
|
||||
MIL_ID m_Id;
|
||||
};
|
||||
|
||||
// Specific MIL_UNIQUE_ID instantiations for each free function.
|
||||
typedef MIL_UNIQUE_ID<&MappFree > MIL_UNIQUE_APP_ID;
|
||||
typedef MIL_UNIQUE_ID<&MappCloseConnection> MIL_UNIQUE_CONNECTION_ID;
|
||||
typedef MIL_UNIQUE_ID<&MbufFree > MIL_UNIQUE_BUF_ID;
|
||||
typedef MIL_UNIQUE_ID<&MdigFree > MIL_UNIQUE_DIG_ID;
|
||||
typedef MIL_UNIQUE_ID<&MgraFree > MIL_UNIQUE_GRA_ID;
|
||||
typedef MIL_UNIQUE_ID<&MobjFree > MIL_UNIQUE_OBJ_ID;
|
||||
typedef MIL_UNIQUE_ID<&MsysFree > MIL_UNIQUE_SYS_ID;
|
||||
typedef MIL_UNIQUE_ID<&MsysIoFree> MIL_UNIQUE_SYSIO_ID;
|
||||
typedef MIL_UNIQUE_ID<&MthrFree > MIL_UNIQUE_THR_ID;
|
||||
#if !M_MIL_USE_LINUX || M_MIL_USE_64BIT
|
||||
typedef MIL_UNIQUE_ID<&MseqFree > MIL_UNIQUE_SEQ_ID;
|
||||
#endif
|
||||
|
||||
// Factory functions that wrap all MIL allocation functions to return a MIL_UNIQUE_ID
|
||||
// instead of a MIL_ID. To use the factory function, simply replace the last
|
||||
// MIL_ID* parameter with M_UNIQUE_ID.
|
||||
|
||||
#if M_MIL_USE_MOVE_SEMANTICS
|
||||
|
||||
// Structure used for tag dispatching in the C++ overloads below.
|
||||
struct MIL_UNIQUE_ID_TAG {};
|
||||
#define M_UNIQUE_ID MIL_UNIQUE_ID_TAG()
|
||||
|
||||
// Structure used to accept an array of either MIL_UNIQUE_IDs or MIL_IDs.
|
||||
struct MilConstArrayIdParam
|
||||
{
|
||||
const MIL_ID* m_IdArrayPtr;
|
||||
|
||||
inline MilConstArrayIdParam(const MIL_ID* p) : m_IdArrayPtr(p) {}
|
||||
|
||||
template <MilFreeFuncType FreeFunc>
|
||||
inline MilConstArrayIdParam(const MIL_UNIQUE_ID<FreeFunc>* p)
|
||||
: m_IdArrayPtr(reinterpret_cast<const MIL_ID*>(p))
|
||||
{
|
||||
static_assert(sizeof(MIL_UNIQUE_ID<FreeFunc>[2]) == sizeof(MIL_ID[2]),
|
||||
"cannot cast const MIL_UNIQUE_ID<FreeFunc>* to const MIL_ID*");
|
||||
}
|
||||
};
|
||||
|
||||
// Generic implementation of MxxxStream C++ overloads for MIL_UNIQUE_IDs.
|
||||
template <MilFreeFuncType FreeFunc>
|
||||
inline void MxxxStreamForMilUniqueId(MilStreamParam MemPtrOrFileName,
|
||||
MIL_ID SysId ,
|
||||
MIL_INT64 Operation ,
|
||||
MIL_INT64 StreamType ,
|
||||
MIL_DOUBLE Version ,
|
||||
MIL_INT64 ControlFlag ,
|
||||
MIL_UNIQUE_ID<FreeFunc>* UniqueIdPtr ,
|
||||
MIL_INT* SizeByteVarPtr ,
|
||||
M_XXX_STREAM_FUNCTION MxxxStream )
|
||||
{
|
||||
MIL_ID TempId = UniqueIdPtr->get();
|
||||
(*MxxxStream)(MemPtrOrFileName, SysId, Operation, StreamType, Version, ControlFlag, &TempId, SizeByteVarPtr);
|
||||
if (Operation & M_RESTORE)
|
||||
UniqueIdPtr->reset(TempId);
|
||||
}
|
||||
|
||||
|
||||
// APP
|
||||
inline MIL_UNIQUE_APP_ID MappAlloc(MIL_CONST_TEXT_PTR ServerDescription, MIL_INT64 InitFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_APP_ID(MappAlloc(ServerDescription, InitFlag, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_CONNECTION_ID MappOpenConnection(MIL_CONST_TEXT_PTR ConnectionDescriptor, MIL_INT64 InitFlag, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
MIL_ID RemoteContextAppId = M_NULL;
|
||||
MappOpenConnection(ConnectionDescriptor, InitFlag, ControlFlag, &RemoteContextAppId);
|
||||
return MIL_UNIQUE_CONNECTION_ID(RemoteContextAppId);
|
||||
}
|
||||
#if M_MIL_USE_STRING
|
||||
inline MIL_UNIQUE_APP_ID MappAlloc(const MIL_STRING& ServerDescription, MIL_INT64 InitFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_APP_ID(MappAlloc(ServerDescription, InitFlag, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_CONNECTION_ID MappOpenConnection(const MIL_STRING& ConnectionDescriptor, MIL_INT64 InitFlag, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
MIL_ID RemoteContextAppId = M_NULL;
|
||||
MappOpenConnection(ConnectionDescriptor, InitFlag, ControlFlag, &RemoteContextAppId);
|
||||
return MIL_UNIQUE_CONNECTION_ID(RemoteContextAppId);
|
||||
}
|
||||
#endif
|
||||
template <MilFreeFuncType FreeFunc> inline void MappFree(const MIL_UNIQUE_ID<FreeFunc>&) = delete;
|
||||
template <MilFreeFuncType FreeFunc> inline void MappCloseConnection(const MIL_UNIQUE_ID<FreeFunc>&) = delete;
|
||||
|
||||
// BUF
|
||||
inline MIL_UNIQUE_BUF_ID MbufAlloc1d(MIL_ID SystemId, MIL_INT SizeX, MIL_INT Type, MIL_INT64 Attribute, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_BUF_ID(MbufAlloc1d(SystemId, SizeX, Type, Attribute, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_BUF_ID MbufAlloc2d(MIL_ID SystemId, MIL_INT SizeX, MIL_INT SizeY, MIL_INT Type, MIL_INT64 Attribute, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_BUF_ID(MbufAlloc2d(SystemId, SizeX, SizeY, Type, Attribute, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_BUF_ID MbufAllocColor(MIL_ID SystemId, MIL_INT SizeBand, MIL_INT SizeX, MIL_INT SizeY, MIL_INT Type, MIL_INT64 Attribute, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_BUF_ID(MbufAllocColor(SystemId, SizeBand, SizeX, SizeY, Type, Attribute, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_BUF_ID MbufAllocDefault(MIL_ID SysId, MIL_ID RefMilObjectId, MIL_INT64 Attribute, MIL_INT64 ControlFlag, MIL_INT64 ControlValue, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_BUF_ID(MbufAllocDefault(SysId, RefMilObjectId, Attribute, ControlFlag, ControlValue, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_BUF_ID MbufAllocContainer(MIL_ID SysId, MIL_INT64 Attribute, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_BUF_ID(MbufAllocContainer(SysId, Attribute, ControlFlag, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_BUF_ID MbufChild1d(MIL_ID ParentBufId, MIL_INT OffX, MIL_INT SizeX, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_BUF_ID(MbufChild1d(ParentBufId, OffX, SizeX, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_BUF_ID MbufChild2d(MIL_ID ParentBufId, MIL_INT OffX, MIL_INT OffY, MIL_INT SizeX, MIL_INT SizeY, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_BUF_ID(MbufChild2d(ParentBufId, OffX, OffY, SizeX, SizeY, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_BUF_ID MbufChildColor2d(MIL_ID ParentBufId, MIL_INT Band, MIL_INT OffX, MIL_INT OffY, MIL_INT SizeX, MIL_INT SizeY, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_BUF_ID(MbufChildColor2d(ParentBufId, Band, OffX, OffY, SizeX, SizeY, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_BUF_ID MbufChildColor2dClip(MIL_ID ParentBufId, MIL_INT Band, MIL_INT OffX, MIL_INT OffY, MIL_INT SizeX, MIL_INT SizeY, MIL_INT* StatusPtr, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_BUF_ID(MbufChildColor2dClip(ParentBufId, Band, OffX, OffY, SizeX, SizeY, StatusPtr, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_BUF_ID MbufChildColor(MIL_ID ParentBufId, MIL_INT Band, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_BUF_ID(MbufChildColor(ParentBufId, Band, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_BUF_ID MbufChildContainer(MIL_ID ContId, MIL_INT ComponentCriteriaSize, const MIL_INT64* ComponentCriteriaArrayPtr, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_BUF_ID(MbufChildContainer(ContId, ComponentCriteriaSize, ComponentCriteriaArrayPtr, ControlFlag, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_BUF_ID MbufChildContainer(MIL_ID ContId, MIL_INT ComponentCriteriaSize, const std::vector<MIL_INT64>& ComponentCriteriaArrayPtr, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_BUF_ID(MbufChildContainer(ContId, ComponentCriteriaSize, ComponentCriteriaArrayPtr, ControlFlag, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_BUF_ID MbufClone(MIL_ID SrcBufId, MIL_ID SysId, MIL_INT SizeX, MIL_INT SizeY, MIL_INT Type, MIL_INT64 Attribute, MIL_INT64 ControlFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_BUF_ID(MbufClone(SrcBufId, SysId, SizeX, SizeY, Type, Attribute, ControlFlag, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_BUF_ID MbufCreate2dFunc(MIL_ID SystemId, MIL_INT SizeX, MIL_INT SizeY, MIL_INT Type, MIL_INT64 Attribute, MIL_INT64 ControlFlag, MIL_INT Pitch, MIL_DATA_PTR DataPtr, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_BUF_ID(MbufCreate2dFunc(SystemId, SizeX, SizeY, Type, Attribute, ControlFlag, Pitch, DataPtr, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_BUF_ID MbufCreateColor(MIL_ID SystemId, MIL_INT SizeBand, MIL_INT SizeX, MIL_INT SizeY, MIL_INT Type, MIL_INT64 Attribute, MIL_INT64 ControlFlag, MIL_INT Pitch, void** ArrayOfDataPtr, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_BUF_ID(MbufCreateColor(SystemId, SizeBand, SizeX, SizeY, Type, Attribute, ControlFlag, Pitch, ArrayOfDataPtr, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_BUF_ID MbufRestore(MIL_CONST_TEXT_PTR FileName, MIL_ID SystemId, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_BUF_ID(MbufRestore(FileName, SystemId, M_NULL));
|
||||
}
|
||||
#if M_MIL_USE_STRING
|
||||
inline MIL_UNIQUE_BUF_ID MbufRestore(const MIL_STRING& FileName, MIL_ID SystemId, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_BUF_ID(MbufRestore(FileName, SystemId, M_NULL));
|
||||
}
|
||||
#endif
|
||||
template <MilFreeFuncType FreeFunc> inline void MbufFree(const MIL_UNIQUE_ID<FreeFunc>&) = delete;
|
||||
|
||||
inline void MbufExportSequence(
|
||||
MIL_CONST_TEXT_PTR FileName ,
|
||||
MIL_INT64 FileFormat ,
|
||||
MilConstArrayIdParam BufArrayPtrOrSystemIdPtr,
|
||||
MIL_INT NumOfIds ,
|
||||
MIL_DOUBLE FrameRate ,
|
||||
MIL_INT64 ControlFlag )
|
||||
{
|
||||
MbufExportSequence(FileName, FileFormat, BufArrayPtrOrSystemIdPtr.m_IdArrayPtr,
|
||||
NumOfIds, FrameRate, ControlFlag);
|
||||
}
|
||||
inline MIL_ID MbufImport(MIL_CONST_TEXT_PTR FileName, MIL_INT64 FileFormat, MIL_INT64 Operation, MIL_ID SystemId, int)
|
||||
{
|
||||
return MbufImport(FileName, FileFormat, Operation, SystemId, static_cast<MIL_ID*>(0));
|
||||
}
|
||||
#if M_MIL_USE_NULLPTR
|
||||
inline MIL_ID MbufImport(MIL_CONST_TEXT_PTR FileName, MIL_INT64 FileFormat, MIL_INT64 Operation, MIL_ID SystemId, std::nullptr_t)
|
||||
{
|
||||
return MbufImport(FileName, FileFormat, Operation, SystemId, static_cast<MIL_ID*>(0));
|
||||
}
|
||||
#endif
|
||||
inline MIL_ID MbufImport(MIL_CONST_TEXT_PTR FileName, MIL_INT64 FileFormat, MIL_INT64 Operation, MIL_ID SystemId, MIL_UNIQUE_BUF_ID* BufIdPtr)
|
||||
{
|
||||
if (BufIdPtr)
|
||||
{
|
||||
MIL_ID TempBufId = BufIdPtr->get();
|
||||
MIL_ID ReturnValue = MbufImport(FileName, FileFormat, Operation, SystemId, &TempBufId);
|
||||
if (Operation & M_RESTORE)
|
||||
BufIdPtr->reset(TempBufId);
|
||||
return ReturnValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
return MbufImport(FileName, FileFormat, Operation, SystemId, static_cast<MIL_ID*>(0));
|
||||
}
|
||||
}
|
||||
inline MIL_UNIQUE_BUF_ID MbufImport(MIL_CONST_TEXT_PTR FileName, MIL_INT64 FileFormat, MIL_INT64 Operation, MIL_ID SystemId, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if ((Operation & M_RESTORE) != M_RESTORE)
|
||||
SafeTypeError(MIL_TEXT("MbufImport"), MIL_TEXT("This overload only supports the M_RESTORE operation."));
|
||||
#endif
|
||||
return MIL_UNIQUE_BUF_ID(MbufImport(FileName, FileFormat, Operation, SystemId, M_NULL));
|
||||
}
|
||||
|
||||
#if M_MIL_USE_STRING
|
||||
inline void MbufExportSequence(
|
||||
const MIL_STRING& FileName ,
|
||||
MIL_INT64 FileFormat ,
|
||||
MilConstArrayIdParam BufArrayPtrOrSystemIdPtr,
|
||||
MIL_INT NumOfIds ,
|
||||
MIL_DOUBLE FrameRate ,
|
||||
MIL_INT64 ControlFlag )
|
||||
{
|
||||
MbufExportSequence(FileName.c_str(), FileFormat, BufArrayPtrOrSystemIdPtr.m_IdArrayPtr,
|
||||
NumOfIds, FrameRate, ControlFlag);
|
||||
}
|
||||
inline MIL_ID MbufImport(const MIL_STRING& FileName, MIL_INT64 FileFormat, MIL_INT64 Operation, MIL_ID SystemId, int)
|
||||
{
|
||||
return MbufImport(FileName.c_str(), FileFormat, Operation, SystemId, static_cast<MIL_ID*>(0));
|
||||
}
|
||||
#if M_MIL_USE_NULLPTR
|
||||
inline MIL_ID MbufImport(const MIL_STRING& FileName, MIL_INT64 FileFormat, MIL_INT64 Operation, MIL_ID SystemId, std::nullptr_t)
|
||||
{
|
||||
return MbufImport(FileName.c_str(), FileFormat, Operation, SystemId, static_cast<MIL_ID*>(0));
|
||||
}
|
||||
#endif
|
||||
inline MIL_ID MbufImport(const MIL_STRING& FileName, MIL_INT64 FileFormat, MIL_INT64 Operation, MIL_ID SystemId, MIL_UNIQUE_BUF_ID* BufIdPtr)
|
||||
{
|
||||
return MbufImport(FileName.c_str(), FileFormat, Operation, SystemId, BufIdPtr);
|
||||
}
|
||||
inline MIL_UNIQUE_BUF_ID MbufImport(const MIL_STRING& FileName, MIL_INT64 FileFormat, MIL_INT64 Operation, MIL_ID SystemId, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
if(Operation != M_RESTORE)
|
||||
SafeTypeError(MIL_TEXT("MbufImport"), MIL_TEXT("This overload only supports the M_RESTORE operation."));
|
||||
#endif
|
||||
return MIL_UNIQUE_BUF_ID(MbufImport(FileName.c_str(), FileFormat, Operation, SystemId, M_NULL));
|
||||
}
|
||||
#endif
|
||||
|
||||
inline void MbufStream(MilStreamParam MemPtrOrFileName,
|
||||
MIL_ID SysId,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 StreamType,
|
||||
MIL_DOUBLE Version,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_UNIQUE_BUF_ID* MbufIdPtr,
|
||||
MIL_INT* SizeByteVarPtr)
|
||||
{
|
||||
MxxxStreamForMilUniqueId(MemPtrOrFileName, SysId, Operation, StreamType, Version, ControlFlag, MbufIdPtr, SizeByteVarPtr, MbufStream);
|
||||
}
|
||||
|
||||
// DIG
|
||||
inline MIL_UNIQUE_DIG_ID MdigAlloc(MIL_ID SystemId, MIL_INT DigNum, MIL_CONST_TEXT_PTR DataFormat, MIL_INT64 InitFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_DIG_ID(MdigAlloc(SystemId, DigNum, DataFormat, InitFlag, M_NULL));
|
||||
}
|
||||
#if M_MIL_USE_STRING
|
||||
inline MIL_UNIQUE_DIG_ID MdigAlloc(MIL_ID SystemId, MIL_INT DigNum, const MIL_STRING& DataFormat, MIL_INT64 InitFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_DIG_ID(MdigAlloc(SystemId, DigNum, DataFormat, InitFlag, M_NULL));
|
||||
}
|
||||
#endif
|
||||
template <MilFreeFuncType FreeFunc> inline void MdigFree(const MIL_UNIQUE_ID<FreeFunc>&) = delete;
|
||||
|
||||
inline void MdigProcess(
|
||||
MIL_ID DigId,
|
||||
MilConstArrayIdParam DestImageArrayPtr,
|
||||
MIL_INT ImageCount,
|
||||
MIL_INT64 Operation,
|
||||
MIL_INT64 OperationFlag,
|
||||
MIL_DIG_HOOK_FUNCTION_PTR HookHandlerPtr,
|
||||
void* UserDataPtr)
|
||||
{
|
||||
MdigProcess(DigId, DestImageArrayPtr.m_IdArrayPtr, ImageCount,
|
||||
Operation, OperationFlag, HookHandlerPtr, UserDataPtr);
|
||||
}
|
||||
|
||||
// GRA
|
||||
inline MIL_UNIQUE_GRA_ID MgraAlloc(MIL_ID SysId, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_GRA_ID(MgraAlloc(SysId, M_NULL));
|
||||
}
|
||||
inline MIL_UNIQUE_GRA_ID MgraAllocList(MIL_ID SysId, MIL_INT ListGraType, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_GRA_ID(MgraAllocList(SysId, ListGraType, M_NULL));
|
||||
}
|
||||
template <MilFreeFuncType FreeFunc> inline void MgraFree(const MIL_UNIQUE_ID<FreeFunc>&) = delete;
|
||||
|
||||
// OBJ
|
||||
inline MIL_UNIQUE_OBJ_ID MobjAlloc(MIL_ID SysId, MIL_INT64 ObjectType, MIL_INT64 InitFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_OBJ_ID(MobjAlloc(SysId, ObjectType, InitFlag, M_NULL));
|
||||
}
|
||||
template <MilFreeFuncType FreeFunc> inline void MobjFree(const MIL_UNIQUE_ID<FreeFunc>&) = delete;
|
||||
|
||||
// SEQ
|
||||
#if !M_MIL_USE_LINUX || M_MIL_USE_64BIT
|
||||
inline MIL_UNIQUE_SEQ_ID MseqAlloc(MIL_ID SystemId, MIL_INT64 SequenceType, MIL_INT64 Operation, MIL_UINT32 OutputFormat, MIL_INT64 InitFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_SEQ_ID(MseqAlloc(SystemId, SequenceType, Operation, OutputFormat, InitFlag, M_NULL));
|
||||
}
|
||||
template <MilFreeFuncType FreeFunc> inline void MseqFree(const MIL_UNIQUE_ID<FreeFunc>&) = delete;
|
||||
#endif
|
||||
|
||||
// SYS
|
||||
inline MIL_UNIQUE_SYS_ID MsysAlloc(MIL_ID ContextAppId, MIL_CONST_TEXT_PTR SystemDescriptor, MIL_INT SystemNum, MIL_INT64 InitFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_SYS_ID(MsysAlloc(ContextAppId, SystemDescriptor, SystemNum, InitFlag, M_NULL));
|
||||
}
|
||||
#if M_MIL_USE_STRING
|
||||
inline MIL_UNIQUE_SYS_ID MsysAlloc(MIL_ID ContextAppId, const MIL_STRING& SystemDescriptor, MIL_INT SystemNum, MIL_INT64 InitFlag, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_SYS_ID(MsysAlloc(ContextAppId, SystemDescriptor, SystemNum, InitFlag, M_NULL));
|
||||
}
|
||||
#endif
|
||||
template <MilFreeFuncType FreeFunc> inline void MsysFree(const MIL_UNIQUE_ID<FreeFunc>&) = delete;
|
||||
|
||||
// SYSIO
|
||||
inline MIL_UNIQUE_SYSIO_ID MsysIoAlloc(MIL_ID SysId, MIL_INT64 IoCmdListNum, MIL_INT64 Type, MIL_INT64 CounterSrc, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_SYSIO_ID(MsysIoAlloc(SysId, IoCmdListNum, Type, CounterSrc, M_NULL));
|
||||
}
|
||||
template <MilFreeFuncType FreeFunc> inline void MsysIoFree(const MIL_UNIQUE_ID<FreeFunc>&) = delete;
|
||||
|
||||
// THR
|
||||
inline MIL_UNIQUE_THR_ID MthrAlloc(MIL_ID SystemId, MIL_INT64 ObjectType, MIL_INT64 ControlFlag, MIL_THREAD_FUNCTION_PTR ThreadFctPtr, void *UserDataPtr, MIL_UNIQUE_ID_TAG)
|
||||
{
|
||||
return MIL_UNIQUE_THR_ID(MthrAlloc(SystemId, ObjectType, ControlFlag, ThreadFctPtr, UserDataPtr, M_NULL));
|
||||
}
|
||||
template <MilFreeFuncType FreeFunc> inline void MthrFree(const MIL_UNIQUE_ID<FreeFunc>&) = delete;
|
||||
|
||||
inline MIL_INT MthrWaitMultiple(MilConstArrayIdParam EventArrayIdPtr, MIL_INT EventArraySize, MIL_INT64 WaitOption, MIL_INT *StatePtr)
|
||||
{
|
||||
return MthrWaitMultiple(EventArrayIdPtr.m_IdArrayPtr, EventArraySize, WaitOption, StatePtr);
|
||||
}
|
||||
|
||||
#endif // #if M_MIL_USE_MOVE_SEMANTICS
|
||||
|
||||
#endif // #if M_MIL_USE_MIL_UNIQUE_ID
|
||||
|
||||
#endif // #ifndef __UNIQUE_MIL_ID_H
|
||||
2319
Include/ClassicMIL/milvector.h
Normal file
2319
Include/ClassicMIL/milvector.h
Normal file
File diff suppressed because it is too large
Load Diff
27
Include/ClassicMIL/milwarning.h
Normal file
27
Include/ClassicMIL/milwarning.h
Normal file
@ -0,0 +1,27 @@
|
||||
/************************************************************************/
|
||||
/*
|
||||
*
|
||||
* Filename : MILWARNING.H
|
||||
* Revision : 10.60.0776
|
||||
* Content : This file contains the defines for warning messages
|
||||
*
|
||||
* Copyright © Matrox Electronic Systems Ltd., 1992-2023.
|
||||
* All Rights Reserved
|
||||
*************************************************************************/
|
||||
|
||||
#ifndef __MILWARNING_H
|
||||
#define __MILWARNING_H
|
||||
|
||||
#define M_WARNING_COMPENSATION 1
|
||||
#define M_WARNING_DEPRECATION 2
|
||||
#define M_WARNING_NON_PORTABLE_OBJECT 4
|
||||
#define M_WARNING_RECOMMENDATION 8
|
||||
#define M_WARNING_ASCII_USE 16
|
||||
|
||||
|
||||
|
||||
#define M_WARNING_ASCII_API 1 // Using ASCII in a function call that will be converted to Unicode
|
||||
#define M_WARNING_DMIL_COMPENSATION 2 // A buffer has been compensated in a call via DMIL.
|
||||
|
||||
|
||||
#endif // __MILWARNING_H
|
||||
12217
Include/Mil.h
Normal file
12217
Include/Mil.h
Normal file
File diff suppressed because it is too large
Load Diff
828
Include/MilFunctionCode.h
Normal file
828
Include/MilFunctionCode.h
Normal file
@ -0,0 +1,828 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Filename : MilFunctionCode.h
|
||||
// Content : Functions opcodes :
|
||||
// Revision : 10.60.0776
|
||||
// Values returned by MappGetHookInfo (M_CURRENT_FCT)
|
||||
//
|
||||
//
|
||||
// Copyright (c) Matrox Electronic Systems Ltd., 1992-2023.
|
||||
// All Rights Reserved
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef __FUNCTIONCODES_H__
|
||||
#define __FUNCTIONCODES_H__
|
||||
|
||||
#define M_NO_FUNCTION 0x00000000
|
||||
|
||||
#define M_SYS_ALLOC 0x00000001 // MsysAlloc
|
||||
#define M_SYS_FREE 0x00000002 // MsysFree
|
||||
#define M_SYS_INQUIRE 0x00000003 // MsysInquire
|
||||
#define M_SYS_CONTROL 0x00000004 // MsysControl
|
||||
#define M_SYS_HOOK_FUNCTION 0x00000007 // MsysHookFunction
|
||||
#define M_SYS_GET_HOOK_INFO 0x00000008 // MsysGetHookInfo
|
||||
#define M_SYS_IO_ALLOC 0x00000009 // MsysIoAlloc
|
||||
#define M_SYS_IO_FREE 0x0000000A // MsysIoFree
|
||||
#define M_SYS_IO_CONTROL 0x0000000B // MsysIoControl
|
||||
#define M_SYS_IO_INQUIRE 0x0000000C // MsysIoInquire
|
||||
#define M_SYS_IO_COMMAND_REGISTER 0x0000000D // MsysIoCommandRegister
|
||||
#define M_SYS_CONTROL_FEATURE 0x0000000E // MsysControlFeature
|
||||
#define M_SYS_INQUIRE_FEATURE 0x0000000F // MsysInquireFeature
|
||||
|
||||
#define M_BUF_ALLOC_2D 0x00000201 // MbufAlloc2d
|
||||
#define M_BUF_CHILD_2D 0x00000202 // MbufChild2d
|
||||
#define M_BUF_FREE 0x00000203 // MbufFree
|
||||
#define M_BUF_GET_2D 0x00000204 // MbufGet2d
|
||||
#define M_BUF_PUT_2D 0x00000205 // MbufPut2d
|
||||
#define M_BUF_COPY 0x00000206 // MbufCopy
|
||||
#define M_BUF_COPY_COLOR 0x00000207 // MbufCopyColor
|
||||
#define M_BUF_GET_COLOR_2D 0x00000208 // MbufGetColor2d
|
||||
#define M_BUF_PUT_COLOR_2D 0x00000209 // MbufPutColor2d
|
||||
#define M_BUF_INQUIRE 0x0000020A // MbufInquire
|
||||
#define M_BUF_CHILD_COLOR_2D 0x0000020B // MbufChildColor2d
|
||||
#define M_BUF_CLEAR 0x0000020C // MbufClear
|
||||
#define M_BUF_COPY_MASK 0x0000020D // MbufCopyMask
|
||||
#define M_BUF_COPY_COND 0x0000020E // MbufCopyCond
|
||||
#define M_BUF_CONTROL 0x00000210 // MbufControl
|
||||
#define M_BUF_GET_LINE 0x00000211 // MbufGetLine
|
||||
#define M_BUF_PUT_LINE 0x00000212 // MbufPutLine
|
||||
#define M_BUF_CREATE_COLOR 0x00000213 // MbufCreateColor
|
||||
#define M_BUF_COPY_COLOR_2D 0x00000215 // MbufCopyColor2d
|
||||
#define M_BUF_HOOK_FUNCTION 0x0000021C // MbufHookFunction
|
||||
#define M_BUF_ALLOC_1D 0x0000021D // MbufAlloc1d
|
||||
#define M_BUF_ALLOC_COLOR 0x0000021E // MbufAllocColor
|
||||
#define M_BUF_BAYER 0x0000021F // MbufBayer
|
||||
#define M_BUF_CHILD_1D 0x00000220 // MbufChild1d
|
||||
#define M_BUF_CHILD_COLOR 0x00000221 // MbufChildColor
|
||||
#define M_BUF_COPY_CLIP 0x00000222 // MbufCopyClip
|
||||
#define M_BUF_CREATE_2D 0x00000223 // MbufCreate2d
|
||||
#define M_BUF_DISK_INQUIRE 0x00000224 // MbufDiskInquire
|
||||
#define M_BUF_EXPORT 0x00000225 // MbufExport
|
||||
#define M_BUF_EXPORT_SEQUENCE 0x00000226 // MbufExportSequence
|
||||
#define M_BUF_GET 0x00000227 // MbufGet
|
||||
#define M_BUF_GET_1D 0x00000228 // MbufGet1d
|
||||
#define M_BUF_GET_COLOR 0x00000229 // MbufGetColor
|
||||
#define M_BUF_IMPORT 0x0000022A // MbufImport
|
||||
#define M_BUF_IMPORT_SEQUENCE 0x0000022B // MbufImportSequence
|
||||
#define M_BUF_LOAD 0x0000022C // MbufLoad
|
||||
#define M_BUF_CONTROL_AREA 0x0000022D // MbufControlArea
|
||||
#define M_BUF_PUT 0x0000022E // MbufPut
|
||||
#define M_BUF_PUT_1D 0x0000022F // MbufPut1d
|
||||
#define M_BUF_PUT_COLOR 0x00000230 // MbufPutColor
|
||||
#define M_BUF_RESTORE 0x00000231 // MbufRestore
|
||||
#define M_BUF_SAVE 0x00000232 // MbufSave
|
||||
#define M_BUF_TRANSFER 0x00000233 // MbufTransfer
|
||||
#define M_BUF_GET_HOOK_INFO 0x00000234 // MbufGetHookInfo
|
||||
#define M_BUF_GET_ARC 0x00000235 // MbufGetArc
|
||||
#define M_BUF_CHILD_MOVE 0x00000237 // MbufChildMove
|
||||
#define M_BUF_SET_REGION 0x00000238 // MbufSetRegion
|
||||
#define M_BUF_CLEAR_COND 0x00000239 // MbufClearCond
|
||||
#define M_BUF_LINK 0x00000240 // MbufLink
|
||||
#define M_BUF_CLONE 0x00000241 // MbufClone
|
||||
#define M_BUF_CHILD_COLOR_2D_CLIP 0x00000243 // MbufChildColor2dClip
|
||||
#define M_BUF_CONTROL_FEATURE 0x00000244 // MbufControlFeature
|
||||
#define M_BUF_INQUIRE_FEATURE 0x00000245 // MbufInquireFeature
|
||||
#define M_BUF_GET_LIST 0x00000246 // MbufGetList
|
||||
#define M_BUF_PUT_LIST 0x00000247 // MbufPutList
|
||||
#define M_BUF_ALLOC_DEFAULT 0x0000024A // MbufAllocDefault
|
||||
#define M_BUF_ALLOC_COLOR_NAMED 0x0000024B // MbufAllocColorNamed
|
||||
#define M_BUF_SET_DYNAMIC_PARAMETERS 0x0000024E // MbufSetDynamicParameters
|
||||
#define M_BUF_STREAM 0x0000024F // MbufStream
|
||||
#define M_BUF_ALLOC_CONTAINER 0x00000250 // MbufAllocContainer
|
||||
#define M_BUF_ALLOC_COMPONENT 0x00000251 // MbufAllocComponent
|
||||
#define M_BUF_COPY_COMPONENT 0x00000252 // MbufCopyComponent
|
||||
#define M_BUF_FREE_COMPONENT 0x00000253 // MbufFreeComponent
|
||||
#define M_BUF_INQUIRE_CONTAINER 0x00000254 // MbufInquireContainer
|
||||
#define M_BUF_CONTROL_CONTAINER 0x00000255 // MbufControlContainer
|
||||
#define M_BUF_CHILD_CONTAINER 0x00000256 // MbufChildContainer
|
||||
#define M_BUF_CREATE_COMPONENT 0x00000257 // MbufCreateComponent
|
||||
|
||||
#define M_DISP_ALLOC 0x00000401 // MdispAlloc
|
||||
#define M_DISP_FREE 0x00000402 // MdispFree
|
||||
#define M_DISP_ZOOM 0x00000403 // MdispZoom
|
||||
#define M_DISP_PAN 0x00000404 // MdispPan
|
||||
#define M_DISP_SELECT 0x00000405 // MdispSelect
|
||||
#define M_DISP_LUT 0x00000406 // MdispLut
|
||||
#define M_DISP_INQUIRE 0x00000407 // MdispInquire
|
||||
#define M_DISP_CONTROL 0x0000040A // MdispControl
|
||||
#define M_DISP_HOOK_FUNCTION 0x0000040B // MdispHookFunction
|
||||
#define M_DISP_SELECT_WINDOW 0x0000040C // MdispSelectWindow
|
||||
#define M_DISP_GET_HOOK_INFO 0x0000040F // MdispGetHookInfo
|
||||
|
||||
#define M_DIG_ALLOC 0x00000601 // MdigAlloc
|
||||
#define M_DIG_FREE 0x00000602 // MdigFree
|
||||
#define M_DIG_GRAB 0x00000603 // MdigGrab
|
||||
#define M_DIG_HALT 0x00000605 // MdigHalt
|
||||
#define M_DIG_INQUIRE 0x00000607 // MdigInquire
|
||||
#define M_DIG_CONTROL 0x00000609 // MdigControl
|
||||
#define M_DIG_GRAB_WAIT 0x0000060A // MdigGrabWait
|
||||
#define M_DIG_HOOK_FUNCTION 0x0000060C // MdigHookFunction
|
||||
#define M_DIG_FOCUS 0x0000060D // MdigFocus
|
||||
#define M_DIG_GRAB_CONTINUOUS 0x0000060E // MdigGrabContinuous
|
||||
#define M_DIG_PROCESS 0x00000610 // MdigProcess
|
||||
#define M_DIG_GET_HOOK_INFO 0x00000611 // MdigGetHookInfo
|
||||
#define M_DIG_CONTROL_FEATURE 0x00000612 // MdigControlFeature
|
||||
#define M_DIG_INQUIRE_FEATURE 0x00000613 // MdigInquireFeature
|
||||
|
||||
#define M_IM_EDGE_DETECT 0x00000801 // MimEdgeDetect
|
||||
#define M_IM_RANK 0x00000802 // MimRank
|
||||
#define M_IM_CONVOLVE 0x00000803 // MimConvolve
|
||||
#define M_IM_DILATE 0x00000804 // MimDilate
|
||||
#define M_IM_ERODE 0x00000805 // MimErode
|
||||
#define M_IM_CLOSE 0x00000806 // MimClose
|
||||
#define M_IM_OPEN 0x00000807 // MimOpen
|
||||
#define M_IM_LABEL 0x00000808 // MimLabel
|
||||
#define M_IM_CONNECT_MAP 0x00000809 // MimConnectMap
|
||||
#define M_IM_THIN 0x0000080A // MimThin
|
||||
#define M_IM_THICK 0x0000080B // MimThick
|
||||
#define M_IM_DISTANCE 0x0000080C // MimDistance
|
||||
#define M_IM_WATERSHED 0x0000080D // MimWatershed
|
||||
#define M_IM_ZONE_OF_INFLUENCE 0x0000080E // MimZoneOfInfluence
|
||||
#define M_IM_MORPHIC 0x0000080F // MimMorphic
|
||||
#define M_IM_LOCATE_EVENT 0x00000812 // MimLocateEvent
|
||||
#define M_IM_COUNT_DIFFERENCE 0x00000813 // MimCountDifference
|
||||
#define M_IM_LOCATE_PEAK_1D 0x00000815 // MimLocatePeak1d
|
||||
#define M_IM_TRANSLATE 0x00000816 // MimTranslate
|
||||
#define M_IM_ROTATE 0x00000817 // MimRotate
|
||||
#define M_IM_WARP 0x00000818 // MimWarp
|
||||
#define M_IM_POLAR_TRANSFORM 0x00000819 // MimPolarTransform
|
||||
#define M_IM_TRANSFORM 0x0000081A // MimTransform
|
||||
#define M_IM_DRAW 0x0000081B // MimDraw
|
||||
#define M_IM_DEAD_PIXEL_CORRECTION 0x0000081C // MimDeadPixelCorrection
|
||||
#define M_IM_MATCH 0x00000838 // MimMatch
|
||||
#define M_IM_WAVELET_TRANSFORM 0x0000083B // MimWaveletTransform
|
||||
#define M_IM_WAVELET_SET_FILTER 0x0000083C // MimWaveletSetFilter
|
||||
#define M_IM_HISTOGRAM_EQUALIZE_ADAPTIVE 0x0000083D // MimHistogramEqualizeAdaptive
|
||||
#define M_IM_FIND_ORIENTATION 0x0000083E // MimFindOrientation
|
||||
#define M_IM_WAVELET_DENOISE 0x0000083F // MimWaveletDenoise
|
||||
#define M_IM_ADAPTATIVE_LOCATE_PEAK_1D 0x00000840 // MimLocatePeak1d
|
||||
#define M_IM_BINARIZE_ADAPTIVE 0x00000841 // MimBinarizeAdaptive
|
||||
#define M_IM_WARP_LIST 0x00000846 // MimWarpList
|
||||
#define M_IM_STAT_CALCULATE 0x00000847 // MimStatCalculate
|
||||
#define M_IM_PROJECTION 0x00000848 // MimProjection
|
||||
#define M_IM_FILTER_ADAPTIVE 0x0000084E // MimFilterAdaptive
|
||||
#define M_IM_REMAP 0x0000084F // MimRemap
|
||||
#define M_IM_AUGMENT 0x00000851 // MimAugment
|
||||
#define M_IM_DIFFERENTIAL 0x00000853 // MimDifferential
|
||||
#define M_IM_BOUNDING_BOX 0x00000854 // MimBoundingBox
|
||||
#define M_IM_FILTER_MAJORITY 0x00000855 // MimFilterMajority
|
||||
#define M_IM_DETECT_EVENT 0x00000856 // MimDetectEvent
|
||||
|
||||
#define M_IM_ARITH 0x00000A01 // MimArith
|
||||
#define M_IM_ARITH_MULTIPLE 0x00000A02 // MimArithMultiple
|
||||
#define M_IM_SHIFT 0x00000A03 // MimShift
|
||||
#define M_IM_BINARIZE 0x00000A04 // MimBinarize
|
||||
#define M_IM_CLIP 0x00000A05 // MimClip
|
||||
#define M_IM_CONVERT 0x00000A06 // MimConvert
|
||||
#define M_IM_FLIP 0x00000A07 // MimFlip
|
||||
#define M_IM_HISTOGRAM 0x00000A08 // MimHistogram
|
||||
#define M_IM_HISTOGRAM_EQUALIZE 0x00000A09 // MimHistogramEqualize
|
||||
#define M_IM_LUT_MAP 0x00000A0A // MimLutMap
|
||||
#define M_IM_RESIZE 0x00000A0B // MimResize
|
||||
#define M_IM_FIND_EXTREME 0x00000A0C // MimFindExtreme
|
||||
#define M_IM_DEINTERLACE 0x00000A0D // MimDeinterlace
|
||||
#define M_IM_ALLOC 0x00000A0E // MimAlloc
|
||||
#define M_IM_CONTROL 0x00000A0F // MimControl
|
||||
#define M_IM_ALLOC_RESULT 0x00000A10 // MimAllocResult
|
||||
#define M_IM_FREE 0x00000A11 // MimFree
|
||||
#define M_IM_INQUIRE 0x00000A12 // MimInquire
|
||||
#define M_IM_GET_RESULT_1D 0x00000A13 // MimGetResult1d
|
||||
#define M_IM_GET_RESULT 0x00000A14 // MimGetResult
|
||||
#define M_IM_FLAT_FIELD 0x00000A41 // MimFlatField
|
||||
#define M_IM_REARRANGE 0x00000A43 // MimRearrange
|
||||
#define M_IM_GET_RESULT_2D 0x00000A44 // MimGetResult2d
|
||||
#define M_IM_PUT 0x00000A45 // MimPut
|
||||
#define M_IM_GET 0x00000A46 // MimGet
|
||||
#define M_IM_ALLOC_RESULT_OBJECT 0x00000A67 // MimAllocResult
|
||||
#define M_IM_GET_RESULT_SINGLE 0x00000A68 // MimGetResultSingle
|
||||
#define M_IM_RESTORE 0x00000A69 // MimRestore
|
||||
#define M_IM_SAVE 0x00000A6A // MimSave
|
||||
#define M_IM_STREAM 0x00000A6B // MimStream
|
||||
#define M_IM_ROTATE_MULT90 0x00000A6D // MimRotate
|
||||
|
||||
#define M_SEQ_ALLOC 0x00001601 // MseqAlloc
|
||||
#define M_SEQ_FREE 0x00001602 // MseqFree
|
||||
#define M_SEQ_DEFINE 0x00001603 // MseqDefine
|
||||
#define M_SEQ_CONTROL 0x00001604 // MseqControl
|
||||
#define M_SEQ_INQUIRE 0x00001605 // MseqInquire
|
||||
#define M_SEQ_HOOK_FUNCTION 0x00001606 // MseqHookFunction
|
||||
#define M_SEQ_GET_HOOK_INFO 0x00001607 // MseqGetHookInfo
|
||||
#define M_SEQ_FEED 0x00001608 // MseqFeed
|
||||
#define M_SEQ_PROCESS 0x00001609 // MseqProcess
|
||||
|
||||
#define M_GRA_CLEAR 0x00001A01 // MgraClear
|
||||
#define M_GRA_DOT 0x00001A02 // MgraDot
|
||||
#define M_GRA_LINE 0x00001A03 // MgraLine
|
||||
#define M_GRA_RECT 0x00001A04 // MgraRect
|
||||
#define M_GRA_RECT_FILL 0x00001A05 // MgraRectFill
|
||||
#define M_GRA_ARC 0x00001A06 // MgraArc
|
||||
#define M_GRA_ARC_FILL 0x00001A07 // MgraArcFill
|
||||
#define M_GRA_FILL 0x00001A08 // MgraFill
|
||||
#define M_GRA_TEXT 0x00001A09 // MgraText
|
||||
#define M_GRA_BACK_COLOR 0x00001A0A // MgraBackColor
|
||||
#define M_GRA_COLOR 0x00001A0B // MgraColor
|
||||
#define M_GRA_DOTS 0x00001A0C // MgraDots
|
||||
#define M_GRA_LINES 0x00001A0D // MgraLines
|
||||
#define M_GRA_ALLOC 0x00001A0E // MgraAlloc
|
||||
#define M_GRA_FREE 0x00001A0F // MgraFree
|
||||
#define M_GRA_CONTROL 0x00001A10 // MgraControl
|
||||
#define M_GRA_FONT 0x00001A11 // MgraFont
|
||||
#define M_GRA_FONT_SCALE 0x00001A12 // MgraFontScale
|
||||
#define M_GRA_INQUIRE 0x00001A13 // MgraInquire
|
||||
#define M_GRA_ALLOC_LIST 0x00001A14 // MgraAllocList
|
||||
#define M_GRA_CONTROL_LIST 0x00001A15 // MgraControlList
|
||||
#define M_GRA_DRAW 0x00001A16 // MgraDraw
|
||||
#define M_GRA_GET_HOOK_INFO 0x00001A1A // MgraGetHookInfo
|
||||
#define M_GRA_HOOK_FUNCTION 0x00001A1B // MgraHookFunction
|
||||
#define M_GRA_INQUIRE_LIST 0x00001A1C // MgraInquireList
|
||||
#define M_GRA_RECT_ANGLE 0x00001A1E // MgraRectAngle
|
||||
#define M_GRA_ARC_ANGLE 0x00001A1F // MgraArcAngle
|
||||
#define M_GRA_INTERACTIVE 0x00001A2A // MgraInteractive
|
||||
#define M_GRA_COPY 0x00001A2C // MgraCopy
|
||||
#define M_GRA_VECTORS 0x00001A2E // MgraVectors
|
||||
#define M_GRA_VECTORS_GRID 0x00001A2F // MgraVectorsGrid
|
||||
|
||||
#define M_GEN_LUT_RAMP 0x00001C01 // MgenLutRamp
|
||||
#define M_GEN_LUT_FUNCTION 0x00001C02 // MgenLutFunction
|
||||
#define M_GEN_WARP_PARAMETER 0x00001C03 // MgenWarpParameter
|
||||
#define M_GEN_RAMP 0x00001C04 // MgenRamp
|
||||
|
||||
#define M_APP_ALLOC 0x00002801 // MappAlloc
|
||||
#define M_APP_CONTROL 0x00002803 // MappControl
|
||||
#define M_APP_FREE 0x00002805 // MappFree
|
||||
#define M_APP_GET_ERROR 0x00002806 // MappGetError
|
||||
#define M_APP_GET_HOOK_INFO 0x00002807 // MappGetHookInfo
|
||||
#define M_APP_HOOK_FUNCTION 0x00002808 // MappHookFunction
|
||||
#define M_APP_INQUIRE 0x00002809 // MappInquire
|
||||
#define M_APP_TIMER 0x0000280B // MappTimer
|
||||
#define M_APP_FILE_OPERATION 0x00002811 // MappFileOperation
|
||||
#define M_APP_INQUIRE_MP 0x00002812 // MappInquireMp
|
||||
#define M_APP_CONTROL_MP 0x00002813 // MappControlMp
|
||||
#define M_APP_INQUIRE_CONNECTION 0x00002814 // MappInquireConnection
|
||||
#define M_APP_OPEN_CONNECTION 0x00002815 // MappOpenConnection
|
||||
#define M_APP_INQUIRE_OBJECT 0x00002816 // MappInquireObject
|
||||
#define M_APP_CONTROL_OBJECT 0x00002817 // MappControlObject
|
||||
#define M_APP_CLOSE_CONNECTION 0x00002818 // MappCloseConnection
|
||||
#define M_APP_TRACE 0x00002819 // MappTrace
|
||||
|
||||
#define M_OBJ_CONTROL 0x00002C01 // MobjControl
|
||||
#define M_OBJ_INQUIRE 0x00002C02 // MobjInquire
|
||||
#define M_OBJ_HOOK_FUNCTION 0x00002C03 // MobjHookFunction
|
||||
#define M_OBJ_ALLOC 0x00002C04 // MobjAlloc
|
||||
#define M_OBJ_FREE 0x00002C05 // MobjFree
|
||||
#define M_OBJ_GET_HOOK_INFO 0x00002C06 // MobjGetHookInfo
|
||||
#define M_OBJ_MESSAGE_WRITE 0x00002C08 // MobjMessageWrite
|
||||
#define M_OBJ_MESSAGE_READ 0x00002C09 // MobjMessageRead
|
||||
|
||||
#define M_THR_ALLOC 0x00002E01 // MthrAlloc
|
||||
#define M_THR_CONTROL 0x00002E02 // MthrControl
|
||||
#define M_THR_FREE 0x00002E03 // MthrFree
|
||||
#define M_THR_INQUIRE 0x00002E04 // MthrInquire
|
||||
#define M_THR_WAIT 0x00002E05 // MthrWait
|
||||
#define M_THR_WAIT_MULTIPLE 0x00002E06 // MthrWaitMultiple
|
||||
#define M_THR_INQUIRE_MP 0x00002E07 // MthrInquireMp
|
||||
#define M_THR_CONTROL_MP 0x00002E08 // MthrControlMp
|
||||
|
||||
#define M_MISC_DLL_MAIN 0x0000301A // DllMain
|
||||
|
||||
#define M_BLOB_ALLOC_RESULT_OLD 0x00008002 // MblobAllocResult
|
||||
#define M_BLOB_CALCULATE 0x00008003 // MblobCalculate
|
||||
#define M_BLOB_CONTROL 0x00008004 // MblobControl
|
||||
#define M_BLOB_FREE 0x00008006 // MblobFree
|
||||
#define M_BLOB_GET_LABEL 0x00008007 // MblobGetLabel
|
||||
#define M_BLOB_GET_RESULT_OLD 0x00008009 // MblobGetResult
|
||||
#define M_BLOB_INQUIRE 0x0000800C // MblobInquire
|
||||
#define M_BLOB_LABEL_FUNC 0x0000800D // MblobLabel
|
||||
#define M_BLOB_RECONSTRUCT 0x0000800E // MblobReconstruct
|
||||
#define M_BLOB_SELECT 0x0000800F // MblobSelect
|
||||
#define M_BLOB_DRAW 0x00008013 // MblobDraw
|
||||
#define M_BLOB_MERGE 0x00008014 // MblobMerge
|
||||
#define M_BLOB_ALLOC 0x00008015 // MblobAlloc
|
||||
#define M_BLOB_SAVE 0x00008016 // MblobSave
|
||||
#define M_BLOB_RESTORE 0x00008017 // MblobRestore
|
||||
#define M_BLOB_STREAM 0x00008018 // MblobStream
|
||||
#define M_BLOB_ALLOC_RESULT 0x00008019 // MblobAllocResult
|
||||
#define M_BLOB_GET_RESULT 0x0000801A // MblobGetResult
|
||||
#define M_BLOB_TRANSFORM 0x0000801B // MblobTransform
|
||||
|
||||
#define M_MEAS_ALLOC_MARKER 0x00008201 // MmeasAllocMarker
|
||||
#define M_MEAS_SET_MARKER 0x00008202 // MmeasSetMarker
|
||||
#define M_MEAS_FIND_MARKER 0x00008203 // MmeasFindMarker
|
||||
#define M_MEAS_GET_RESULT 0x00008204 // MmeasGetResult
|
||||
#define M_MEAS_GET_RESULT_SINGLE 0x00008205 // MmeasGetResultSingle
|
||||
#define M_MEAS_INQUIRE 0x00008206 // MmeasInquire
|
||||
#define M_MEAS_SAVE_MARKER 0x00008207 // MmeasSaveMarker
|
||||
#define M_MEAS_CALCULATE 0x00008208 // MmeasCalculate
|
||||
#define M_MEAS_FREE 0x00008209 // MmeasFree
|
||||
#define M_MEAS_ALLOC_RESULT 0x0000820A // MmeasAllocResult
|
||||
#define M_MEAS_ALLOC_CONTEXT 0x0000820B // MmeasAllocContext
|
||||
#define M_MEAS_CONTROL 0x0000820C // MmeasControl
|
||||
#define M_MEAS_RESTORE_MARKER 0x0000820D // MmeasRestoreMarker
|
||||
#define M_MEAS_DRAW 0x0000820E // MmeasDraw
|
||||
#define M_MEAS_STREAM 0x0000820F // MmeasStream
|
||||
#define M_MEAS_SET_SCORE 0x00008210 // MmeasSetScore
|
||||
#define M_MEAS_GET_SCORE 0x00008211 // MmeasGetScore
|
||||
|
||||
#define M_CAL_ALLOC 0x00008401 // McalAlloc
|
||||
#define M_CAL_GRID 0x00008402 // McalGrid
|
||||
#define M_CAL_TRANSFORM_IMAGE 0x00008403 // McalTransformImage
|
||||
#define M_CAL_CONTROL 0x00008404 // McalControl
|
||||
#define M_CAL_FREE 0x00008405 // McalFree
|
||||
#define M_CAL_INQUIRE 0x00008406 // McalInquire
|
||||
#define M_CAL_LIST 0x00008407 // McalList
|
||||
#define M_CAL_SAVE 0x00008408 // McalSave
|
||||
#define M_CAL_RESTORE 0x00008409 // McalRestore
|
||||
#define M_CAL_RELATIVE_ORIGIN 0x0000840A // McalRelativeOrigin
|
||||
#define M_CAL_TRANSFORM_COORDINATE 0x0000840B // McalTransformCoordinate
|
||||
#define M_CAL_TRANSFORM_COORDINATE_LIST 0x0000840C // McalTransformCoordinateList
|
||||
#define M_CAL_TRANSFORM_RESULT 0x0000840D // McalTransformResult
|
||||
#define M_CAL_STREAM 0x00008410 // McalStream
|
||||
#define M_CAL_ASSOCIATE 0x00008411 // McalAssociate
|
||||
#define M_CAL_GET_COORDINATE_SYSTEM 0x00008412 // McalGetCoordinateSystem
|
||||
#define M_CAL_SET_COORDINATE_SYSTEM 0x00008413 // McalSetCoordinateSystem
|
||||
#define M_CAL_DRAW 0x00008414 // McalDraw
|
||||
#define M_CAL_TRANSFORM_COORDINATE_3D_LIST 0x00008415 // McalTransformCoordinate3dList
|
||||
#define M_CAL_INQUIRE_SINGLE 0x00008416 // McalInquireSingle
|
||||
#define M_CAL_FIXTURE 0x00008417 // McalFixture
|
||||
#define M_CAL_TRANSFORM_RESULT_AT_POSITION 0x00008418 // McalTransformResultAtPosition
|
||||
#define M_CAL_UNIFORM 0x00008419 // McalUniform
|
||||
#define M_CAL_WARP 0x0000841A // McalWarp
|
||||
#define M_CAL_DRAW_3D 0x0000841B // McalDraw3d
|
||||
#define M_CAL_CALCULATE_HAND_EYE 0x0000841C // McalCalculateHandEye
|
||||
#define M_CAL_COPY_RESULT 0x0000841D // McalCopyResult
|
||||
#define M_CAL_ALLOC_RESULT 0x0000841E // McalAllocResult
|
||||
|
||||
#define M_CODE_ALLOC 0x00008601 // McodeAlloc
|
||||
#define M_CODE_CONTROL 0x00008602 // McodeControl
|
||||
#define M_CODE_FREE 0x00008603 // McodeFree
|
||||
#define M_CODE_GET_RESULT_OLD 0x00008604 // McodeGetResultOld
|
||||
#define M_CODE_INQUIRE 0x00008605 // McodeInquire
|
||||
#define M_CODE_READ 0x00008606 // McodeRead
|
||||
#define M_CODE_WRITE_OLD 0x00008607 // McodeWriteOld
|
||||
#define M_CODE_SAVE 0x00008608 // McodeSave
|
||||
#define M_CODE_RESTORE 0x00008609 // McodeRestore
|
||||
#define M_CODE_STREAM 0x0000860B // McodeStream
|
||||
#define M_CODE_DRAW_OLD 0x0000860C // McodeDrawOld
|
||||
#define M_CODE_ALLOC_RESULT 0x0000860D // McodeAllocResult
|
||||
#define M_CODE_MODEL_FUNC 0x0000860E // McodeModel
|
||||
#define M_CODE_GET_RESULT_SINGLE 0x0000860F // McodeGetResultSingle
|
||||
#define M_CODE_GRADE 0x00008610 // McodeGrade
|
||||
#define M_CODE_TRAIN 0x00008611 // McodeTrain
|
||||
#define M_CODE_DETECT 0x00008612 // McodeDetect
|
||||
#define M_CODE_GET_RESULT 0x00008613 // McodeGetResult
|
||||
#define M_CODE_DRAW 0x00008614 // McodeDraw
|
||||
#define M_CODE_WRITE 0x00008615 // McodeWrite
|
||||
#define M_CODE_HOOK_FUNCTION 0x00008616 // McodeHookFunction
|
||||
#define M_CODE_GET_HOOK_INFO 0x00008617 // McodeGetHookInfo
|
||||
|
||||
#define M_OCR_ALLOC_FONT 0x00008801 // MocrAllocFont
|
||||
#define M_OCR_ALLOC_RESULT 0x00008802 // MocrAllocResult
|
||||
#define M_OCR_CALIBRATE_FONT 0x00008803 // MocrCalibrateFont
|
||||
#define M_OCR_CONTROL 0x00008804 // MocrControl
|
||||
#define M_OCR_COPY_FONT 0x00008805 // MocrCopyFont
|
||||
#define M_OCR_FREE 0x00008806 // MocrFree
|
||||
#define M_OCR_GET_RESULT 0x00008807 // MocrGetResult
|
||||
#define M_OCR_HOOK_FUNCTION 0x00008808 // MocrHookFunction
|
||||
#define M_OCR_IMPORT_FONT 0x00008809 // MocrImportFont
|
||||
#define M_OCR_INQUIRE 0x0000880A // MocrInquire
|
||||
#define M_OCR_MODIFY_FONT 0x0000880B // MocrModifyFont
|
||||
#define M_OCR_READ_STRING 0x0000880C // MocrReadString
|
||||
#define M_OCR_RESTORE_FONT 0x0000880D // MocrRestoreFont
|
||||
#define M_OCR_SAVE_FONT 0x0000880E // MocrSaveFont
|
||||
#define M_OCR_SET_CONSTRAINT 0x0000880F // MocrSetConstraint
|
||||
#define M_OCR_VERIFY_STRING 0x00008811 // MocrVerifyString
|
||||
#define M_OCR_PREPROCESS 0x00008813 // MocrPreprocess
|
||||
#define M_OCR_STREAM 0x00008816 // MocrStream
|
||||
#define M_OCR_DRAW 0x00008817 // MocrDraw
|
||||
|
||||
#define M_PAT_ALLOC_RESULT_OLD 0x00008C03 // MpatAllocResult
|
||||
#define M_PAT_DRAW 0x00008C06 // MpatDraw
|
||||
#define M_PAT_FREE 0x00008C0A // MpatFree
|
||||
#define M_PAT_GET_RESULT_OLD 0x00008C0C // MpatGetResult
|
||||
#define M_PAT_INQUIRE_OLD 0x00008C0D // MpatInquire
|
||||
#define M_PAT_RESTORE_OLD 0x00008C11 // MpatRestore
|
||||
#define M_PAT_SAVE_OLD 0x00008C12 // MpatSave
|
||||
#define M_PAT_STREAM 0x00008C22 // MpatStream
|
||||
#define M_PAT_PREPROCESS 0x00008C23 // MpatPreprocess
|
||||
#define M_PAT_ALLOC_RESULT 0x00008C24 // MpatAllocResult
|
||||
#define M_PAT_GET_RESULT 0x00008C25 // MpatGetResult
|
||||
#define M_PAT_INQUIRE 0x00008C26 // MpatInquire
|
||||
#define M_PAT_RESTORE 0x00008C27 // MpatRestore
|
||||
#define M_PAT_SAVE 0x00008C28 // MpatSave
|
||||
#define M_PAT_ALLOC 0x00008C29 // MpatAlloc
|
||||
#define M_PAT_CONTROL 0x00008C2A // MpatControl
|
||||
#define M_PAT_DEFINE 0x00008C2B // MpatDefine
|
||||
#define M_PAT_FIND 0x00008C2C // MpatFind
|
||||
#define M_PAT_MASK 0x00008C2D // MpatMask
|
||||
|
||||
#define M_MOD_ALLOC 0x00008E01 // MmodAlloc
|
||||
#define M_MOD_ALLOC_RESULT 0x00008E02 // MmodAllocResult
|
||||
#define M_MOD_DEFINE 0x00008E03 // MmodDefine
|
||||
#define M_MOD_CONTROL 0x00008E04 // MmodControl
|
||||
#define M_MOD_PREPROCESS 0x00008E05 // MmodPreprocess
|
||||
#define M_MOD_DRAW 0x00008E06 // MmodDraw
|
||||
#define M_MOD_FIND 0x00008E07 // MmodFind
|
||||
#define M_MOD_GET_RESULT 0x00008E08 // MmodGetResult
|
||||
#define M_MOD_FREE 0x00008E09 // MmodFree
|
||||
#define M_MOD_INQUIRE 0x00008E0A // MmodInquire
|
||||
#define M_MOD_SAVE 0x00008E0B // MmodSave
|
||||
#define M_MOD_RESTORE 0x00008E0C // MmodRestore
|
||||
#define M_MOD_MASK 0x00008E0D // MmodMask
|
||||
#define M_MOD_DEFINE_FROM_FILE 0x00008E0E // MmodDefineFromFile
|
||||
#define M_MOD_STREAM 0x00008E0F // MmodStream
|
||||
|
||||
#define M_EDGE_ALLOC 0x00009401 // MedgeAlloc
|
||||
#define M_EDGE_ALLOC_RESULT 0x00009402 // MedgeAllocResult
|
||||
#define M_EDGE_INQUIRE 0x00009403 // MedgeInquire
|
||||
#define M_EDGE_CONTROL 0x00009404 // MedgeControl
|
||||
#define M_EDGE_CALCULATE 0x00009405 // MedgeCalculate
|
||||
#define M_EDGE_DRAW 0x00009406 // MedgeDraw
|
||||
#define M_EDGE_GET_RESULT 0x00009407 // MedgeGetResult
|
||||
#define M_EDGE_FREE 0x00009408 // MedgeFree
|
||||
#define M_EDGE_SAVE 0x00009409 // MedgeSave
|
||||
#define M_EDGE_RESTORE 0x0000940A // MedgeRestore
|
||||
#define M_EDGE_MASK 0x0000940B // MedgeMask
|
||||
#define M_EDGE_SELECT 0x0000940C // MedgeSelect
|
||||
#define M_EDGE_GET_NEIGHBORS 0x0000940D // MedgeGetNeighbors
|
||||
#define M_EDGE_PUT 0x0000940E // MedgePut
|
||||
#define M_EDGE_STREAM 0x0000940F // MedgeStream
|
||||
|
||||
#define M_STR_ALLOC 0x00009601 // MstrAlloc
|
||||
#define M_STR_ALLOC_RESULT 0x00009602 // MstrAllocResult
|
||||
#define M_STR_FREE 0x00009603 // MstrFree
|
||||
#define M_STR_CONTROL 0x00009604 // MstrControl
|
||||
#define M_STR_INQUIRE 0x00009605 // MstrInquire
|
||||
#define M_STR_EDIT_FONT 0x00009606 // MstrEditFont
|
||||
#define M_STR_SET_CONSTRAINT 0x00009607 // MstrSetConstraint
|
||||
#define M_STR_PREPROCESS 0x00009608 // MstrPreprocess
|
||||
#define M_STR_READ 0x00009609 // MstrRead
|
||||
#define M_STR_GET_RESULT 0x0000960A // MstrGetResult
|
||||
#define M_STR_DRAW 0x0000960B // MstrDraw
|
||||
#define M_STR_SAVE 0x0000960C // MstrSave
|
||||
#define M_STR_RESTORE 0x0000960D // MstrRestore
|
||||
#define M_STR_STREAM 0x0000960E // MstrStream
|
||||
#define M_STR_EXPERT 0x0000960F // MstrExpert
|
||||
|
||||
#define M_MET_ALLOC 0x00009A01 // MmetAlloc
|
||||
#define M_MET_ALLOC_RESULT 0x00009A02 // MmetAllocResult
|
||||
#define M_MET_CONTROL 0x00009A03 // MmetControl
|
||||
#define M_MET_INQUIRE 0x00009A04 // MmetInquire
|
||||
#define M_MET_ADD_FEATURE 0x00009A05 // MmetAddFeature
|
||||
#define M_MET_ADD_TOLERANCE 0x00009A06 // MmetAddTolerance
|
||||
#define M_MET_SET_POSITION 0x00009A07 // MmetSetPosition
|
||||
#define M_MET_SET_REGION 0x00009A08 // MmetSetRegion
|
||||
#define M_MET_CALCULATE 0x00009A09 // MmetCalculate
|
||||
#define M_MET_GET_RESULT 0x00009A0A // MmetGetResult
|
||||
#define M_MET_DRAW 0x00009A0B // MmetDraw
|
||||
#define M_MET_SAVE 0x00009A0C // MmetSave
|
||||
#define M_MET_RESTORE 0x00009A0D // MmetRestore
|
||||
#define M_MET_STREAM 0x00009A0E // MmetStream
|
||||
#define M_MET_FREE 0x00009A0F // MmetFree
|
||||
#define M_MET_NAME 0x00009A10 // MmetName
|
||||
#define M_MET_PUT 0x00009A11 // MmetPut
|
||||
|
||||
#define M_COL_ALLOC 0x00009C01 // McolAlloc
|
||||
#define M_COL_ALLOC_RESULT 0x00009C02 // McolAllocResult
|
||||
#define M_COL_DEFINE 0x00009C03 // McolDefine
|
||||
#define M_COL_MATCH 0x00009C04 // McolMatch
|
||||
#define M_COL_FREE 0x00009C05 // McolFree
|
||||
#define M_COL_CONTROL 0x00009C06 // McolControl
|
||||
#define M_COL_INQUIRE 0x00009C07 // McolInquire
|
||||
#define M_COL_PREPROCESS 0x00009C08 // McolPreprocess
|
||||
#define M_COL_GET_RESULT 0x00009C09 // McolGetResult
|
||||
#define M_COL_DISTANCE 0x00009C0A // McolDistance
|
||||
#define M_COL_DRAW 0x00009C0B // McolDraw
|
||||
#define M_COL_STREAM 0x00009C0C // McolStream
|
||||
#define M_COL_SAVE 0x00009C0D // McolSave
|
||||
#define M_COL_RESTORE 0x00009C0E // McolRestore
|
||||
#define M_COL_MASK 0x00009C0F // McolMask
|
||||
#define M_COL_SET_METHOD 0x00009C10 // McolSetMethod
|
||||
#define M_COL_PROJECT 0x00009C11 // McolProject
|
||||
#define M_COL_TRANSFORM 0x00009C12 // McolTransform
|
||||
|
||||
#define M_3DMAP_ALLOC 0x00009E01 // M3dmapAlloc
|
||||
#define M_3DMAP_ALLOC_RESULT 0x00009E02 // M3dmapAllocResult
|
||||
#define M_3DMAP_INQUIRE 0x00009E03 // M3dmapInquire
|
||||
#define M_3DMAP_CONTROL 0x00009E04 // M3dmapControl
|
||||
#define M_3DMAP_GET_RESULT 0x00009E05 // M3dmapGetResult
|
||||
#define M_3DMAP_FREE 0x00009E06 // M3dmapFree
|
||||
#define M_3DMAP_SAVE 0x00009E07 // M3dmapSave
|
||||
#define M_3DMAP_RESTORE 0x00009E08 // M3dmapRestore
|
||||
#define M_3DMAP_STREAM 0x00009E09 // M3dmapStream
|
||||
#define M_3DMAP_ADD_SCAN 0x00009E0A // M3dmapAddScan
|
||||
#define M_3DMAP_CALIBRATE 0x00009E0B // M3dmapCalibrate
|
||||
#define M_3DMAP_EXTRACT 0x00009E0C // M3dmapExtract
|
||||
#define M_3DMAP_TRIANGULATE 0x00009E0D // M3dmapTriangulate
|
||||
#define M_3DMAP_SET_GEOMETRY 0x00009E0E // M3dmapSetGeometry
|
||||
#define M_3DMAP_DRAW 0x00009E0F // M3dmapDraw
|
||||
#define M_3DMAP_STAT 0x00009E10 // M3dmapStat
|
||||
#define M_3DMAP_ARITH 0x00009E11 // M3dmapArith
|
||||
#define M_3DMAP_PUT 0x00009E12 // M3dmapPut
|
||||
#define M_3DMAP_PUT_ORGANIZED 0x00009E13 // M3dmapPutOrganized
|
||||
#define M_3DMAP_CALIBRATE_MULTIPLE 0x00009E14 // M3dmapCalibrateMultiple
|
||||
#define M_3DMAP_CLEAR 0x00009E15 // M3dmapClear
|
||||
#define M_3DMAP_ALIGN 0x00009E16 // M3dmapAlign
|
||||
#define M_3DMAP_GET 0x00009E17 // M3dmapGet
|
||||
#define M_3DMAP_IMPORT 0x00009E18 // M3dmapImport
|
||||
#define M_3DMAP_SET_BOX 0x00009E19 // M3dmapSetBox
|
||||
#define M_3DMAP_EXPORT 0x00009E1A // M3dmapExport
|
||||
#define M_3DMAP_COPY 0x00009E1B // M3dmapCopy
|
||||
#define M_3DMAP_COPY_COND 0x00009E1C // M3dmapCopyCond
|
||||
#define M_3DMAP_PT_CLD_CALCULATE 0x00009E1D // M3dmapPtCldCalculate
|
||||
#define M_3DMAP_COPY_RESULT 0x00009E1E // M3dmapCopyResult
|
||||
#define M_3DMAP_DRAW_3D 0x00009E1F // M3dmapDraw3d
|
||||
#define M_3DMAP_ALIGN_SCAN 0x00009E20 // M3dmapAlignScan
|
||||
|
||||
#define M_REG_ALLOC 0x0000A001 // MregAlloc
|
||||
#define M_REG_ALLOC_RESULT 0x0000A002 // MregAllocResult
|
||||
#define M_REG_INQUIRE 0x0000A003 // MregInquire
|
||||
#define M_REG_CONTROL 0x0000A004 // MregControl
|
||||
#define M_REG_CALCULATE 0x0000A005 // MregCalculate
|
||||
#define M_REG_DRAW 0x0000A006 // MregDraw
|
||||
#define M_REG_GET_RESULT 0x0000A008 // MregGetResult
|
||||
#define M_REG_FREE 0x0000A009 // MregFree
|
||||
#define M_REG_SAVE 0x0000A00B // MregSave
|
||||
#define M_REG_RESTORE 0x0000A00C // MregRestore
|
||||
#define M_REG_STREAM 0x0000A00F // MregStream
|
||||
#define M_REG_SET_LOCATION 0x0000A010 // MregSetLocation
|
||||
#define M_REG_TRANSFORM_IMAGE 0x0000A011 // MregTransformImage
|
||||
#define M_REG_TRANSFORM_COORDINATE 0x0000A012 // MregTransformCoordinate
|
||||
#define M_REG_TRANSFORM_COORDINATE_LIST 0x0000A013 // MregTransformCoordinateList
|
||||
|
||||
#define M_DMR_ALLOC 0x0000A201 // MdmrAlloc
|
||||
#define M_DMR_ALLOC_RESULT 0x0000A202 // MdmrAllocResult
|
||||
#define M_DMR_INQUIRE 0x0000A203 // MdmrInquire
|
||||
#define M_DMR_CONTROL 0x0000A204 // MdmrControl
|
||||
#define M_DMR_PREPROCESS 0x0000A205 // MdmrPreprocess
|
||||
#define M_DMR_READ 0x0000A206 // MdmrRead
|
||||
#define M_DMR_GET_RESULT 0x0000A207 // MdmrGetResult
|
||||
#define M_DMR_FREE 0x0000A208 // MdmrFree
|
||||
#define M_DMR_SAVE 0x0000A209 // MdmrSave
|
||||
#define M_DMR_RESTORE 0x0000A20A // MdmrRestore
|
||||
#define M_DMR_STREAM 0x0000A20B // MdmrStream
|
||||
#define M_DMR_CONTROL_FONT 0x0000A20C // MdmrControlFont
|
||||
#define M_DMR_INQUIRE_FONT 0x0000A20D // MdmrInquireFont
|
||||
#define M_DMR_CONTROL_STRING_MODEL 0x0000A20E // MdmrControlStringModel
|
||||
#define M_DMR_INQUIRE_STRING_MODEL 0x0000A20F // MdmrInquireStringModel
|
||||
#define M_DMR_DRAW 0x0000A210 // MdmrDraw
|
||||
#define M_DMR_IMPORT_FONT 0x0000A211 // MdmrImportFont
|
||||
#define M_DMR_EXPORT_FONT 0x0000A212 // MdmrExportFont
|
||||
#define M_DMR_NAME 0x0000A213 // MdmrName
|
||||
|
||||
#define M_COM_ALLOC 0x0000A601 // McomAlloc
|
||||
#define M_COM_CONTROL 0x0000A602 // McomControl
|
||||
#define M_COM_INQUIRE 0x0000A603 // McomInquire
|
||||
#define M_COM_HOOK_FUNCTION 0x0000A604 // McomHookFunction
|
||||
#define M_COM_GET_HOOK_INFO 0x0000A605 // McomGetHookInfo
|
||||
#define M_COM_READ 0x0000A606 // McomRead
|
||||
#define M_COM_WRITE 0x0000A607 // McomWrite
|
||||
#define M_COM_FREE 0x0000A608 // McomFree
|
||||
#define M_COM_RECEIVE_POSITION_COMMAND 0x0000A609 // McomReceivePositionCommand
|
||||
#define M_COM_SEND_POSITION_COMMAND 0x0000A60A // McomSendPositionCommand
|
||||
#define M_COM_SEND_COMMAND 0x0000A60B // McomSendCommand
|
||||
#define M_COM_RECEIVE_COMMAND 0x0000A60C // McomReceiveCommand
|
||||
|
||||
#define M_BEAD_ALLOC 0x0000A801 // MbeadAlloc
|
||||
#define M_BEAD_ALLOC_RESULT 0x0000A802 // MbeadAllocResult
|
||||
#define M_BEAD_FREE 0x0000A803 // MbeadFree
|
||||
#define M_BEAD_CONTROL 0x0000A804 // MbeadControl
|
||||
#define M_BEAD_INQUIRE 0x0000A805 // MbeadInquire
|
||||
#define M_BEAD_TRAIN 0x0000A806 // MbeadTrain
|
||||
#define M_BEAD_TEMPLATE 0x0000A807 // MbeadTemplate
|
||||
#define M_BEAD_VERIFY 0x0000A808 // MbeadVerify
|
||||
#define M_BEAD_GET_RESULT 0x0000A809 // MbeadGetResult
|
||||
#define M_BEAD_DRAW 0x0000A80A // MbeadDraw
|
||||
#define M_BEAD_SAVE 0x0000A80B // MbeadSave
|
||||
#define M_BEAD_RESTORE 0x0000A80C // MbeadRestore
|
||||
#define M_BEAD_STREAM 0x0000A80D // MbeadStream
|
||||
#define M_BEAD_GET_NEIGHBORS 0x0000A80E // MbeadGetNeighbors
|
||||
|
||||
#define M_CLASS_ALLOC 0x0000AC01 // MclassAlloc
|
||||
#define M_CLASS_ALLOC_RESULT 0x0000AC02 // MclassAllocResult
|
||||
#define M_CLASS_INQUIRE 0x0000AC03 // MclassInquire
|
||||
#define M_CLASS_CONTROL 0x0000AC04 // MclassControl
|
||||
#define M_CLASS_IMPORT 0x0000AC08 // MclassImport
|
||||
#define M_CLASS_PREPROCESS 0x0000AC09 // MclassPreprocess
|
||||
#define M_CLASS_PREDICT 0x0000AC0A // MclassPredict
|
||||
#define M_CLASS_GET_RESULT 0x0000AC0B // MclassGetResult
|
||||
#define M_CLASS_FREE 0x0000AC0C // MclassFree
|
||||
#define M_CLASS_SAVE 0x0000AC0D // MclassSave
|
||||
#define M_CLASS_RESTORE 0x0000AC0E // MclassRestore
|
||||
#define M_CLASS_STREAM 0x0000AC0F // MclassStream
|
||||
#define M_CLASS_DRAW 0x0000AC10 // MclassDraw
|
||||
#define M_CLASS_PREDICT_MULTIBAND 0x0000AC13 // MclassPredictMultiband
|
||||
#define M_CLASS_CONTROL_ENTRY 0x0000AC14 // MclassControlEntry
|
||||
#define M_CLASS_TRAIN 0x0000AC15 // MclassTrain
|
||||
#define M_CLASS_INQUIRE_ENTRY 0x0000AC16 // MclassInquireEntry
|
||||
#define M_CLASS_EXPORT 0x0000AC17 // MclassExport
|
||||
#define M_CLASS_COPY_RESULT 0x0000AC18 // MclassCopyResult
|
||||
#define M_CLASS_HOOK_FUNCTION 0x0000AC19 // MclassHookFunction
|
||||
#define M_CLASS_GET_HOOK_INFO 0x0000AC1A // MclassGetHookInfo
|
||||
#define M_CLASS_COPY 0x0000AC1B // MclassCopy
|
||||
#define M_CLASS_SPLIT_DATASET 0x0000AC1D // MclassSplitDataset
|
||||
#define M_CLASS_PREPARE_DATA 0x0000AC1F // MclassPrepareData
|
||||
#define M_CLASS_SET_HOOK_INFO 0x0000AC20 // MclassSetHookInfo
|
||||
#define M_CLASS_DRAW_ENTRY 0x0000AC21 // MclassDrawEntry
|
||||
#define M_CLASS_ENTRY_ADD_REGION 0x0000AC22 // MclassEntryAddRegion
|
||||
#define M_CLASS_GET_RESULT_ENTRY 0x0000AC23 // MclassGetResultEntry
|
||||
|
||||
#define M_AGM_ALLOC 0x0000AE01 // MagmAlloc
|
||||
#define M_AGM_ALLOC_RESULT 0x0000AE02 // MagmAllocResult
|
||||
#define M_AGM_INQUIRE 0x0000AE03 // MagmInquire
|
||||
#define M_AGM_CONTROL 0x0000AE04 // MagmControl
|
||||
#define M_AGM_PREPROCESS 0x0000AE05 // MagmPreprocess
|
||||
#define M_AGM_GET_RESULT 0x0000AE06 // MagmGetResult
|
||||
#define M_AGM_FREE 0x0000AE07 // MagmFree
|
||||
#define M_AGM_SAVE 0x0000AE08 // MagmSave
|
||||
#define M_AGM_RESTORE 0x0000AE09 // MagmRestore
|
||||
#define M_AGM_STREAM 0x0000AE0A // MagmStream
|
||||
#define M_AGM_DRAW 0x0000AE0B // MagmDraw
|
||||
#define M_AGM_DEFINE 0x0000AE0C // MagmDefine
|
||||
#define M_AGM_FIND 0x0000AE0D // MagmFind
|
||||
#define M_AGM_TRAIN 0x0000AE0E // MagmTrain
|
||||
#define M_AGM_COPY_RESULT 0x0000AE0F // MagmCopyResult
|
||||
|
||||
|
||||
#define M_3DGRA_ALLOC 0x00000101 // M3dgraAlloc
|
||||
#define M_3DGRA_ADD 0x00000102 // M3dgraAdd
|
||||
#define M_3DGRA_CONTROL 0x00000103 // M3dgraControl
|
||||
#define M_3DGRA_COPY 0x00000104 // M3dgraCopy
|
||||
#define M_3DGRA_FREE 0x00000105 // M3dgraFree
|
||||
#define M_3DGRA_INQUIRE 0x00000106 // M3dgraInquire
|
||||
#define M_3DGRA_REMOVE 0x00000107 // M3dgraRemove
|
||||
#define M_3DGRA_BOX 0x00000108 // M3dgraBox
|
||||
#define M_3DGRA_SPHERE 0x00000109 // M3dgraSphere
|
||||
#define M_3DGRA_CYLINDER 0x0000010A // M3dgraCylinder
|
||||
#define M_3DGRA_GRID 0x0000010B // M3dgraGrid
|
||||
#define M_3DGRA_LINE 0x0000010C // M3dgraLine
|
||||
#define M_3DGRA_TEXT 0x0000010D // M3dgraText
|
||||
#define M_3DGRA_AXIS 0x0000010E // M3dgraAxis
|
||||
#define M_3DGRA_PLANE 0x0000010F // M3dgraPlane
|
||||
#define M_3DGRA_DOTS 0x00000110 // M3dgraDots
|
||||
#define M_3DGRA_POLYGON 0x00000111 // M3dgraPolygon
|
||||
#define M_3DGRA_ARC 0x00000112 // M3dgraArc
|
||||
#define M_3DGRA_NODE 0x00000113 // M3dgraNode
|
||||
#define M_3DGRA_HOOK_FUNCTION 0x00000114 // M3dgraHookFunction
|
||||
#define M_3DGRA_GET_HOOK_INFO 0x00000115 // M3dgraGetHookInfo
|
||||
#define M_3DGRA_LINES 0x00000116 // M3dgraLines
|
||||
|
||||
#define M_3DDISP_ALLOC 0x00000301 // M3ddispAlloc
|
||||
#define M_3DDISP_CONTROL 0x00000302 // M3ddispControl
|
||||
#define M_3DDISP_FREE 0x00000303 // M3ddispFree
|
||||
#define M_3DDISP_INQUIRE 0x00000304 // M3ddispInquire
|
||||
#define M_3DDISP_SELECT 0x00000305 // M3ddispSelect
|
||||
#define M_3DDISP_SELECT_WINDOW 0x00000306 // M3ddispSelectWindow
|
||||
#define M_3DDISP_SET_VIEW 0x00000307 // M3ddispSetView
|
||||
#define M_3DDISP_GET_VIEW 0x00000308 // M3ddispGetView
|
||||
#define M_3DDISP_COPY 0x00000309 // M3ddispCopy
|
||||
#define M_3DDISP_HOOK_FUNCTION 0x0000030B // M3ddispHookFunction
|
||||
#define M_3DDISP_GET_HOOK_INFO 0x0000030C // M3ddispGetHookInfo
|
||||
#define M_3DDISP_LUT 0x0000030D // M3ddispLut
|
||||
|
||||
#define M_3DGEO_ALLOC 0x00000501 // M3dgeoAlloc
|
||||
#define M_3DGEO_INQUIRE 0x00000502 // M3dgeoInquire
|
||||
#define M_3DGEO_FREE 0x00000503 // M3dgeoFree
|
||||
#define M_3DGEO_SAVE 0x00000504 // M3dgeoSave
|
||||
#define M_3DGEO_RESTORE 0x00000505 // M3dgeoRestore
|
||||
#define M_3DGEO_STREAM 0x00000506 // M3dgeoStream
|
||||
#define M_3DGEO_BOX 0x00000507 // M3dgeoBox
|
||||
#define M_3DGEO_SPHERE 0x00000508 // M3dgeoSphere
|
||||
#define M_3DGEO_PLANE 0x00000509 // M3dgeoPlane
|
||||
#define M_3DGEO_COPY 0x0000050A // M3dgeoCopy
|
||||
#define M_3DGEO_MATRIX_SET_TRANSFORM 0x0000050B // M3dgeoMatrixSetTransform
|
||||
#define M_3DGEO_MATRIX_PUT 0x0000050C // M3dgeoMatrixPut
|
||||
#define M_3DGEO_MATRIX_GET 0x0000050D // M3dgeoMatrixGet
|
||||
#define M_3DGEO_MATRIX_GET_TRANSFORM 0x0000050E // M3dgeoMatrixGetTransform
|
||||
#define M_3DGEO_CYLINDER 0x0000050F // M3dgeoCylinder
|
||||
#define M_3DGEO_DRAW_3D 0x00000510 // M3dgeoDraw3d
|
||||
#define M_3DGEO_UNDEFINED 0x00000511 // M3dgeoUndefined
|
||||
#define M_3DGEO_LINE 0x00000512 // M3dgeoLine
|
||||
#define M_3DGEO_MATRIX_SET_WITH_AXES 0x00000513 // M3dgeoMatrixSetWithAxes
|
||||
#define M_3DGEO_POINT 0x00000514 // M3dgeoPoint
|
||||
#define M_3DGEO_CONSTRUCT 0x00000515 // M3dgeoConstruct
|
||||
#define M_3DGEO_EVAL_CURVE 0x00000516 // M3dgeoEvalCurve
|
||||
#define M_3DGEO_EVAL_SURFACE 0x00000517 // M3dgeoEvalSurface
|
||||
|
||||
#define M_3DBUF_IMPORT 0x00000901 // M3dbufImport
|
||||
#define M_3DBUF_EXPORT 0x00000902 // M3dbufExport
|
||||
#define M_3DBUF_CONVERT 0x00000903 // MbufConvert3d
|
||||
|
||||
#define M_3DIM_ALLOC 0x00002101 // M3dimAlloc
|
||||
#define M_3DIM_ALLOC_RESULT 0x00002102 // M3dimAllocResult
|
||||
#define M_3DIM_INQUIRE 0x00002103 // M3dimInquire
|
||||
#define M_3DIM_CONTROL 0x00002104 // M3dimControl
|
||||
#define M_3DIM_GET_RESULT 0x00002105 // M3dimGetResult
|
||||
#define M_3DIM_FREE 0x00002106 // M3dimFree
|
||||
#define M_3DIM_SAVE 0x00002107 // M3dimSave
|
||||
#define M_3DIM_RESTORE 0x00002108 // M3dimRestore
|
||||
#define M_3DIM_STREAM 0x00002109 // M3dimStream
|
||||
#define M_3DIM_TRANSLATE 0x0000210A // M3dimTranslate
|
||||
#define M_3DIM_SCALE 0x0000210B // M3dimScale
|
||||
#define M_3DIM_ROTATE 0x0000210C // M3dimRotate
|
||||
#define M_3DIM_MATRIX_TRANSFORM 0x0000210D // M3dimMatrixTransform
|
||||
#define M_3DIM_CROP 0x0000210E // M3dimCrop
|
||||
#define M_3DIM_MERGE 0x0000210F // M3dimMerge
|
||||
#define M_3DIM_SAMPLE 0x00002110 // M3dimSample
|
||||
#define M_3DIM_NORMALS 0x00002111 // M3dimNormals
|
||||
#define M_3DIM_MESH 0x00002112 // M3dimMesh
|
||||
#define M_3DIM_STAT 0x00002113 // M3dimStat
|
||||
#define M_3DIM_COPY_RESULT 0x00002114 // M3dimCopyResult
|
||||
#define M_3DIM_PROJECT 0x00002115 // M3dimProject
|
||||
#define M_3DIM_COPY 0x00002116 // M3dimCopy
|
||||
#define M_3DIM_CALIBRATE_DEPTH_MAP 0x00002117 // M3dimCalibrateDepthMap
|
||||
#define M_3DIM_MATRIX_TRANSFORM_LIST 0x00002118 // M3dimMatrixTransformList
|
||||
#define M_3DIM_CALCULATE_MAP_SIZE 0x00002119 // M3dimCalculateMapSize
|
||||
#define M_3DIM_REMOVE_POINTS 0x0000211A // M3dimRemovePoints
|
||||
#define M_3DIM_ARITH 0x0000211B // M3dimArith
|
||||
#define M_3DIM_FILL_GAP 0x0000211C // M3dimFillGaps
|
||||
#define M_3DIM_FIX 0x0000211D // M3dimFix
|
||||
#define M_3DIM_PROFILE 0x0000211E // M3dimProfile
|
||||
#define M_3DIM_DRAW_3D 0x0000211F // M3dimDraw3d
|
||||
#define M_3DIM_GET 0x00002120 // M3dimGet
|
||||
#define M_3DIM_FILTER 0x00002121 // M3dimFilter
|
||||
#define M_3DIM_FIND_TRANSFORMATION 0x00002122 // M3dimFindTransformation
|
||||
#define M_3DIM_REMAP_DEPTH_MAP 0x00002123 // M3dimRemapDepthMap
|
||||
#define M_3DIM_GET_LIST 0x00002124 // M3dimGetList
|
||||
#define M_3DIM_OUTLIERS 0x00002125 // M3dimOutliers
|
||||
|
||||
#define M_3DMET_ALLOC 0x00002301 // M3dmetAlloc
|
||||
#define M_3DMET_ALLOC_RESULT 0x00002302 // M3dmetAllocResult
|
||||
#define M_3DMET_INQUIRE 0x00002303 // M3dmetInquire
|
||||
#define M_3DMET_CONTROL 0x00002304 // M3dmetControl
|
||||
#define M_3DMET_GET_RESULT 0x00002305 // M3dmetGetResult
|
||||
#define M_3DMET_FREE 0x00002306 // M3dmetFree
|
||||
#define M_3DMET_SAVE 0x00002307 // M3dmetSave
|
||||
#define M_3DMET_RESTORE 0x00002308 // M3dmetRestore
|
||||
#define M_3DMET_STREAM 0x00002309 // M3dmetStream
|
||||
#define M_3DMET_DISTANCE 0x0000230A // M3dmetDistance
|
||||
#define M_3DMET_FIT 0x0000230B // M3dmetFit
|
||||
#define M_3DMET_COPY_RESULT 0x0000230C // M3dmetCopyResult
|
||||
#define M_3DMET_STAT 0x0000230D // M3dmetStat
|
||||
#define M_3DMET_COPY 0x0000230E // M3dmetCopy
|
||||
#define M_3DMET_VOLUME 0x0000230F // M3dmetVolume
|
||||
#define M_3DMET_DRAW_3D 0x00002310 // M3dmetDraw3d
|
||||
#define M_3DMET_FEATURE_EX 0x00002311 // M3dmetFeatureEx
|
||||
#define M_3DMET_FEATURE 0x00002312 // M3dmetFeature
|
||||
#define M_3DMET_VOLUME_EX 0x00002313 // M3dmetVolumeEx
|
||||
#define M_3DMET_CONTROL_DRAW 0x00002314 // M3dmetControlDraw
|
||||
#define M_3DMET_INQUIRE_DRAW 0x00002315 // M3dmetInquireDraw
|
||||
|
||||
#define M_3DREG_ALLOC 0x00002501 // M3dregAlloc
|
||||
#define M_3DREG_ALLOC_RESULT 0x00002502 // M3dregAllocResult
|
||||
#define M_3DREG_INQUIRE 0x00002503 // M3dregInquire
|
||||
#define M_3DREG_CONTROL 0x00002504 // M3dregControl
|
||||
#define M_3DREG_GET_RESULT 0x00002505 // M3dregGetResult
|
||||
#define M_3DREG_FREE 0x00002506 // M3dregFree
|
||||
#define M_3DREG_SAVE 0x00002507 // M3dregSave
|
||||
#define M_3DREG_RESTORE 0x00002508 // M3dregRestore
|
||||
#define M_3DREG_STREAM 0x00002509 // M3dregStream
|
||||
#define M_3DREG_COPY_RESULT 0x0000250A // M3dregCopyResult
|
||||
#define M_3DREG_CALCULATE 0x0000250B // M3dregCalculate
|
||||
#define M_3DREG_COPY 0x0000250C // M3dregCopy
|
||||
#define M_3DREG_SET_LOCATION 0x0000250D // M3dregSetLocation
|
||||
#define M_3DREG_MERGE 0x0000250E // M3dregMerge
|
||||
#define M_3DREG_CONTROL_DRAW 0x0000250F // M3dregControlDraw
|
||||
#define M_3DREG_INQUIRE_DRAW 0x00002510 // M3dregInquireDraw
|
||||
#define M_3DREG_DRAW_3D 0x00002511 // M3dregDraw3d
|
||||
|
||||
#define M_3DMOD_ALLOC 0x00002701 // M3dmodAlloc
|
||||
#define M_3DMOD_ALLOC_RESULT 0x00002702 // M3dmodAllocResult
|
||||
#define M_3DMOD_INQUIRE 0x00002703 // M3dmodInquire
|
||||
#define M_3DMOD_CONTROL 0x00002704 // M3dmodControl
|
||||
#define M_3DMOD_GET_RESULT 0x00002705 // M3dmodGetResult
|
||||
#define M_3DMOD_FREE 0x00002706 // M3dmodFree
|
||||
#define M_3DMOD_SAVE 0x00002707 // M3dmodSave
|
||||
#define M_3DMOD_RESTORE 0x00002708 // M3dmodRestore
|
||||
#define M_3DMOD_STREAM 0x00002709 // M3dmodStream
|
||||
#define M_3DMOD_FIND 0x0000270A // M3dmodFind
|
||||
#define M_3DMOD_COPY_RESULT 0x0000270B // M3dmodCopyResult
|
||||
#define M_3DMOD_DRAW_3D 0x0000270C // M3dmodDraw3d
|
||||
#define M_3DMOD_PREPROCESS 0x0000270D // M3dmodPreprocess
|
||||
#define M_3DMOD_COPY 0x0000270E // M3dmodCopy
|
||||
#define M_3DMOD_DEFINE 0x0000270F // M3dmodDefine
|
||||
#define M_3DMOD_INQUIRE_DRAW 0x00002710 // M3dmodInquireDraw
|
||||
#define M_3DMOD_CONTROL_DRAW 0x00002711 // M3dmodControlDraw
|
||||
|
||||
#define M_3DBLOB_ALLOC 0x00002901 // M3dblobAlloc
|
||||
#define M_3DBLOB_ALLOC_RESULT 0x00002902 // M3dblobAllocResult
|
||||
#define M_3DBLOB_INQUIRE 0x00002903 // M3dblobInquire
|
||||
#define M_3DBLOB_CONTROL 0x00002904 // M3dblobControl
|
||||
#define M_3DBLOB_GET_RESULT 0x00002905 // M3dblobGetResult
|
||||
#define M_3DBLOB_FREE 0x00002906 // M3dblobFree
|
||||
#define M_3DBLOB_SAVE 0x00002907 // M3dblobSave
|
||||
#define M_3DBLOB_RESTORE 0x00002908 // M3dblobRestore
|
||||
#define M_3DBLOB_STREAM 0x00002909 // M3dblobStream
|
||||
#define M_3DBLOB_COPY_RESULT 0x0000290A // M3dblobCopyResult
|
||||
#define M_3DBLOB_SEGMENT 0x0000290B // M3dblobSegment
|
||||
#define M_3DBLOB_SELECT 0x0000290C // M3dblobSelect
|
||||
#define M_3DBLOB_SORT 0x0000290D // M3dblobSort
|
||||
#define M_3DBLOB_COMBINE 0x0000290E // M3dblobCombine
|
||||
#define M_3DBLOB_EXTRACT 0x0000290F // M3dblobExtract
|
||||
#define M_3DBLOB_DRAW_3D 0x00002910 // M3dblobDraw3d
|
||||
#define M_3DBLOB_CALCULATE 0x00002911 // M3dblobCalculate
|
||||
#define M_3DBLOB_INQUIRE_DRAW 0x00002912 // M3dblobInquireDraw
|
||||
#define M_3DBLOB_CONTROL_DRAW 0x00002913 // M3dblobControlDraw
|
||||
#define M_3DBLOB_COPY 0x00002914 // M3dblobCopy
|
||||
|
||||
|
||||
#endif //__FUNCTIONCODES_H__
|
||||
2780
Include/Milerr.h
Normal file
2780
Include/Milerr.h
Normal file
File diff suppressed because it is too large
Load Diff
24765
Include/json.hpp
Normal file
24765
Include/json.hpp
Normal file
File diff suppressed because it is too large
Load Diff
518
Include/milfpga.h
Normal file
518
Include/milfpga.h
Normal file
@ -0,0 +1,518 @@
|
||||
/************************************************************************/
|
||||
/*
|
||||
*
|
||||
* Filename : milfpga.h
|
||||
* Revision : 10.60.0776
|
||||
* Content : This file contains the defines necessary to use the
|
||||
* Matrox Imaging Library FPGA DTK "C" user interface.
|
||||
*
|
||||
* Comments : Some defines may be here but not yet
|
||||
* implemented in the library.
|
||||
*
|
||||
* Copyright © Matrox Electronic Systems Ltd., 1992-2023.
|
||||
* All Rights Reserved
|
||||
*************************************************************************/
|
||||
|
||||
#ifndef __MILFPGA_H__
|
||||
#define __MILFPGA_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* MIL FPGA context identifier type */
|
||||
/************************************************************************/
|
||||
typedef void* MIL_FPGA_CONTEXT;
|
||||
typedef MIL_INT (MFTYPE* MIL_FPGA_HOOK_FUNCTION_PTR)( MIL_INT HookType,
|
||||
MIL_ID EventId,
|
||||
void* UserDataPtr);
|
||||
|
||||
typedef MIL_INT (MFTYPE* MFPGAINQUIRE)( MIL_ID SystemId,
|
||||
MIL_INT FpgaDeviceNum,
|
||||
MIL_INT64 InquireType,
|
||||
void* ResultPtr);
|
||||
/************************************************************************/
|
||||
/* MIL FPGA API declaration */
|
||||
/************************************************************************/
|
||||
MIL_INT MFTYPE MfpgaCommandAlloc( MIL_ID MilSysId,
|
||||
MIL_INT DeviceNumber,
|
||||
MIL_INT FunctionId,
|
||||
MIL_INT SubFunctionId,
|
||||
MIL_INT64 FunctionNumber,
|
||||
MIL_INT ExecutionMode,
|
||||
MIL_INT64 ControlFlag,
|
||||
MIL_FPGA_CONTEXT* FpgaCommandContextPtr);
|
||||
|
||||
MIL_INT MFTYPE MfpgaCommandFree( MIL_FPGA_CONTEXT FpgaCommandContext,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
#if M_MIL_USE_UNICODE
|
||||
|
||||
MIL_INT MFTYPE MfpgaLoadA( MIL_ID MilSystemId,
|
||||
MIL_INT FpgaDeviceNumber,
|
||||
MIL_CONST_TEXTA_PTR FirmwareFile,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT MFTYPE MfpgaLoadW( MIL_ID MilSystemId,
|
||||
MIL_INT FpgaDeviceNumber,
|
||||
MIL_CONST_TEXTW_PTR FirmwareFile,
|
||||
MIL_INT64 ControlFlag);
|
||||
#if M_MIL_UNICODE_API
|
||||
#define MfpgaLoad MfpgaLoadW
|
||||
#else
|
||||
#define MfpgaLoad MfpgaLoadA
|
||||
#endif
|
||||
#else
|
||||
|
||||
MIL_INT MFTYPE MfpgaLoad( MIL_ID MilSystemId,
|
||||
MIL_INT FpgaDeviceNumber,
|
||||
MIL_CONST_TEXT_PTR FirmwareFile,
|
||||
MIL_INT64 ControlFlag);
|
||||
#define MfpgaLoadW MfpgaLoad
|
||||
#endif
|
||||
|
||||
void MFTYPE MfpgaSetSource( MIL_FPGA_CONTEXT FpgaCommandContext,
|
||||
MIL_BUFFER_INFO SrcBuf,
|
||||
MIL_INT StreamInputNumber,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT MFTYPE MfpgaSetDestination(MIL_FPGA_CONTEXT FpgaCommandContext,
|
||||
MIL_BUFFER_INFO DstBuf,
|
||||
MIL_INT StreamOutputNumber,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
MIL_INT MFTYPE MfpgaSetLink( MIL_FPGA_CONTEXT SrcFpgaCommandContext,
|
||||
MIL_INT SrcStreamPort,
|
||||
MIL_FPGA_CONTEXT DstFpgaCommandContext,
|
||||
MIL_INT DstStreamPort,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE MfpgaCommandQueue( MIL_FPGA_CONTEXT FpgaCommandContext,
|
||||
MIL_INT64 CompletionMode,
|
||||
MIL_INT64 QueueType);
|
||||
|
||||
void MFTYPE MfpgaGetRegister( MIL_FPGA_CONTEXT FpgaCommandContext,
|
||||
MIL_INT64 RegisterSection,
|
||||
MIL_INT Offset,
|
||||
MIL_INT Length,
|
||||
void *ValuePtr,
|
||||
MIL_INT64 ReadAccessFlag);
|
||||
|
||||
void MFTYPE MfpgaSetRegister( MIL_FPGA_CONTEXT FpgaCommandContext,
|
||||
MIL_INT64 RegisterSection,
|
||||
MIL_INT Offset,
|
||||
MIL_INT Length,
|
||||
void *ValuePtr,
|
||||
MIL_INT64 WriteAccessFlag);
|
||||
|
||||
void MFTYPE MfpgaGetAndSetRegister(MIL_FPGA_CONTEXT FpgaCommandContext,
|
||||
MIL_INT64 SrcRegisterBank,
|
||||
MIL_INT SrcOffset,
|
||||
MIL_INT64 DstRegisterBank,
|
||||
MIL_INT DstOffset,
|
||||
MIL_INT64 BitMaskRegisterBank,
|
||||
MIL_INT BitMaskOffset,
|
||||
MIL_INT Length,
|
||||
MIL_INT64 ControlFlag);
|
||||
|
||||
void MFTYPE MfpgaCommandControl( MIL_FPGA_CONTEXT FpgaCommandContext,
|
||||
MIL_INT64 ControlType,
|
||||
const void *ControlValuePtr);
|
||||
|
||||
void MFTYPE MfpgaCommandInquire( MIL_FPGA_CONTEXT FpgaCommandContext,
|
||||
MIL_INT64 InquireType,
|
||||
void *UserVarPtr);
|
||||
|
||||
MIL_INT MFTYPE MfpgaInquire( MIL_ID MilSystemId,
|
||||
MIL_INT FpgaDeviceNumber,
|
||||
MIL_INT64 InquireType,
|
||||
void* UserVarPtr);
|
||||
|
||||
MIL_INT MFTYPE MfpgaControl( MIL_ID MilSystemId,
|
||||
MIL_INT FpgaDeviceNumber,
|
||||
MIL_INT64 ControlType,
|
||||
const void* ControlValuePtr);
|
||||
|
||||
void MFTYPE MfpgaHookFunction( MIL_ID MilSystemId,
|
||||
MIL_INT DeviceNumber,
|
||||
MIL_INT FunctionId,
|
||||
MIL_INT SubFunctionId,
|
||||
MIL_INT64 FunctionNumber,
|
||||
MIL_INT HookType,
|
||||
MIL_FPGA_HOOK_FUNCTION_PTR HookHandlerPtr,
|
||||
void *UserDataPtr);
|
||||
|
||||
MIL_INT MFTYPE MfpgaGetHookInfo( MIL_ID EventId,
|
||||
MIL_INT64 InfoType,
|
||||
void *UserVarPtr);
|
||||
|
||||
/************************************************************************/
|
||||
/* Transfer unit Function ID and SubFunction ID definitions */
|
||||
/************************************************************************/
|
||||
#define FPGA_HOST_2_AVALON_FID 0xC001
|
||||
#define FPGA_DMA_READ_2_STREAM_FID 0xC010
|
||||
#define FPGA_STREAM_2_DMA_WRITE_FID 0xC011
|
||||
#define FPGA_HSSI_2_AVALON_FID 0xC012
|
||||
|
||||
#define FPGA_HLS_FID 0xD000
|
||||
#define FPGA_FID 0x1000
|
||||
#define IS_HLS_FID(x) ( (x >= FPGA_HLS_FID) && (x < (FPGA_HLS_FID + 0x1000)))
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* For Processing unit Function ID definitions */
|
||||
/* see milfunctioncode.h */
|
||||
/************************************************************************/
|
||||
|
||||
/************************************************************************/
|
||||
/* */
|
||||
/* MfpgaSetSource, MfpgaSetDestination and MfpgaSetLink */
|
||||
/* stream offset defines */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
#define M_FPGA_STREAM_INPUT_BIT 0x10000000
|
||||
#define M_FPGA_STREAM_OUTPUT_BIT 0x20000000
|
||||
#define M_FPGA_STREAM_IO_MASK (M_FPGA_STREAM_INPUT_BIT | M_FPGA_STREAM_OUTPUT_BIT)
|
||||
#define M_FPGA_STREAM_IO_FILTER (~ (M_FPGA_STREAM_INPUT_BIT | M_FPGA_STREAM_OUTPUT_BIT))
|
||||
|
||||
#define M_INPUT0 (M_FPGA_STREAM_INPUT_BIT | 0x00000000)
|
||||
#define M_INPUT1 (M_FPGA_STREAM_INPUT_BIT | 0x00000001)
|
||||
#define M_INPUT2 (M_FPGA_STREAM_INPUT_BIT | 0x00000002)
|
||||
#define M_INPUT3 (M_FPGA_STREAM_INPUT_BIT | 0x00000003)
|
||||
#define M_INPUT4 (M_FPGA_STREAM_INPUT_BIT | 0x00000004)
|
||||
#define M_INPUT5 (M_FPGA_STREAM_INPUT_BIT | 0x00000005)
|
||||
#define M_INPUT6 (M_FPGA_STREAM_INPUT_BIT | 0x00000006)
|
||||
#define M_INPUT7 (M_FPGA_STREAM_INPUT_BIT | 0x00000007)
|
||||
#define M_INPUT8 (M_FPGA_STREAM_INPUT_BIT | 0x00000008)
|
||||
#define M_INPUT9 (M_FPGA_STREAM_INPUT_BIT | 0x00000009)
|
||||
|
||||
#define M_OUTPUT0 (M_FPGA_STREAM_OUTPUT_BIT | 0x00000000)
|
||||
#define M_OUTPUT1 (M_FPGA_STREAM_OUTPUT_BIT | 0x00000001)
|
||||
#define M_OUTPUT2 (M_FPGA_STREAM_OUTPUT_BIT | 0x00000002)
|
||||
#define M_OUTPUT3 (M_FPGA_STREAM_OUTPUT_BIT | 0x00000003)
|
||||
#define M_OUTPUT4 (M_FPGA_STREAM_OUTPUT_BIT | 0x00000004)
|
||||
#define M_OUTPUT5 (M_FPGA_STREAM_OUTPUT_BIT | 0x00000005)
|
||||
#define M_OUTPUT6 (M_FPGA_STREAM_OUTPUT_BIT | 0x00000006)
|
||||
#define M_OUTPUT7 (M_FPGA_STREAM_OUTPUT_BIT | 0x00000007)
|
||||
#define M_OUTPUT8 (M_FPGA_STREAM_OUTPUT_BIT | 0x00000008)
|
||||
#define M_OUTPUT9 (M_FPGA_STREAM_OUTPUT_BIT | 0x00000009)
|
||||
|
||||
/************************************************************************/
|
||||
/* */
|
||||
/* MfpgaSetSource, MfpgaSetDestination and MfpgaSetLink */
|
||||
/* flag defines */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
//#define M_DEFAULT 0x10000000L
|
||||
#define M_FPGA_FLAG_TYPE 0xf0000000L
|
||||
#define M_FPGA_FLAG_TU_FLAVOR_MASK 0x70000000L
|
||||
#define M_FPGA_MULTI_CONTEXT 0x30000000L
|
||||
#define M_FPGA_MULTI_STREAM_PORT 0x40000000L
|
||||
#define M_FPGA_DONT_INTERSECT 0x80000000L
|
||||
#define M_FPGA_TU_NUMBER 0xA0000000L
|
||||
|
||||
#define M_CONTEXT0 (M_FPGA_MULTI_CONTEXT | 0)
|
||||
#define M_CONTEXT1 (M_FPGA_MULTI_CONTEXT | 1)
|
||||
#define M_CONTEXT2 (M_FPGA_MULTI_CONTEXT | 2)
|
||||
#define M_CONTEXT3 (M_FPGA_MULTI_CONTEXT | 3)
|
||||
|
||||
#define M_FPGA_FLIP_VERTICAL 0x01000000L
|
||||
#define M_FPGA_FLIP_HORIZONTAL 0x02000000L
|
||||
|
||||
/************************************************************************/
|
||||
/* */
|
||||
/* MfpgaCommandQueue completion mode defines */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
//#define M_DEFAULT 0x10000000L
|
||||
#define M_PROCESSING_COMPLETED 0x00000001L
|
||||
#define M_DESTINATION_WRITTEN 0x00000002L
|
||||
#define M_SOURCE_READ 0x00000003L
|
||||
|
||||
/************************************************************************/
|
||||
/* */
|
||||
/* MfpgaCommandQueue flags */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
//#define M_DEFAULT 0x10000000L
|
||||
//#define M_WAIT 1L
|
||||
#define M_DISPATCH 2L
|
||||
#define M_DISPATCH_IMMEDIATE 3L
|
||||
|
||||
/************************************************************************/
|
||||
/* */
|
||||
/* MfpgaGetRegister/MfpgaSetRegister Register bank defines */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
#define M_USER 0x00000001L
|
||||
#define M_STREAMER_BASE 0x00000002L
|
||||
#define M_PU_BASE 0x00000003L
|
||||
#define M_FPGA_BASE 0x00000004L
|
||||
#define M_ABSOLUTE_BASE 0x00000005L
|
||||
|
||||
/************************************************************************/
|
||||
/* */
|
||||
/* MfpgaGetRegister/MfpgaSetRegister Flag defines */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
#define M_WHEN_DISPATCHED 1
|
||||
#define M_WHEN_COMPLETED 2
|
||||
#define M_AFTER_DISPATCHED 3
|
||||
|
||||
/************************************************************************/
|
||||
/* */
|
||||
/* MfpgaGetError */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
#define M_FPGA_ERROR_CODE 1
|
||||
#define M_FPGA_ERROR_MESSAGE 2
|
||||
#define M_FPGA_ERROR_SYSTEM 3
|
||||
#define M_FPGA_ERROR_DELETE 0x80000000L
|
||||
|
||||
/************************************************************************/
|
||||
/* */
|
||||
/* MfpgaInquire / MfpgaControl */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
#define M_MAX_NB_OF_PUS 512
|
||||
#define M_MAX_NB_OF_PORTS 255
|
||||
#define M_NUMBER_OF_PU 0x1000
|
||||
#define M_NUMBER_OF_TU 0x1001
|
||||
#define M_PU_LIST 0x1002
|
||||
#define M_TU_LIST 0x1003
|
||||
#define M_FPGA_PACKAGE_NAME (0x1005|M_CLIENT_ENCODING)
|
||||
#define M_FPGA_PACKAGE_NAME_LENGTH 0x1004
|
||||
#define M_FPGA_CONFIGURATION_FILENAME (0x1007|M_CLIENT_ENCODING)
|
||||
#define M_FPGA_CONFIGURATION_FILENAME_LENGTH 0x1006
|
||||
#define M_FPGA_CONFIG 0x1008
|
||||
#define M_FPGA_BUILD_NUMBER 0x1009
|
||||
#define M_PU_SELECT 0x1010
|
||||
|
||||
#define M_PU_NAME (0x1100|M_CLIENT_ENCODING)
|
||||
/* Reserve next 511 values from (0x1100) */
|
||||
/* to (0x12ff) */
|
||||
#define M_PU_NAME_LENGTH (M_PU_NAME + M_STRING_SIZE)
|
||||
#define M_TU_NAME (0x1300|M_CLIENT_ENCODING)
|
||||
/* Reserve next 511 values from (0x1300) */
|
||||
/* to (0x14ff) */
|
||||
#define M_TU_NAME_LENGTH (M_TU_NAME + M_STRING_SIZE)
|
||||
#define M_PU_FID 0x1500
|
||||
/* Reserve next 511 values from (0x1500 */
|
||||
/* to (0x16ff */
|
||||
#define M_TU_FID 0x1700
|
||||
/* Reserve next 511 values from (0x1700 */
|
||||
/* to (0x18ff */
|
||||
#define M_FPGA_CONFIGURATION (0x1900|M_CLIENT_ENCODING)
|
||||
|
||||
/************************************************************************/
|
||||
/* */
|
||||
/* MfpgaCommandInquire */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
#define M_MINOR_VERSION 0x2000
|
||||
#define M_MAJOR_VERSION 0x2001
|
||||
#define M_FUNCTION_ID 0x2003
|
||||
#define M_INSTANCE_ID 0x2004
|
||||
#define M_REG_USER_SIZE 0x2005
|
||||
#define M_REG_FULL_SIZE 0x2006
|
||||
#define M_REG_USER_OFFSET 0x2007
|
||||
#define M_REG_IOCTL_OFFSET 0x2008
|
||||
#define M_NUMBER_OF_EVENTS 0x2009
|
||||
#define M_CAPABILITY 0x200A
|
||||
#define M_SUB_FUNCTION_ID 0x200B
|
||||
#define M_NUMBER_OF_INPUTS 2835L // used in milclass.h 0xB13
|
||||
#define M_NUMBER_OF_OUTPUTS 2836L // used in milclass.h 0xB14
|
||||
|
||||
// M_PORT_NAME is ored with M_FPGA_STREAM_IO_MASK (0x30000000)
|
||||
#define M_PORT_NAME (0x2200|M_CLIENT_ENCODING)
|
||||
/* Reserve next 255 values from (0x2200 */
|
||||
/* to (0x22FF */
|
||||
#define M_PORT_NAME_LENGTH (M_PORT_NAME + M_STRING_SIZE)
|
||||
|
||||
/************************************************************************/
|
||||
/* */
|
||||
/* MfpgaCommandControl */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
#define M_FPGA_CMD_CTRL_TYPE_MASK 0x0FFFF000L
|
||||
#define M_COMPLETION_MODE 0x00003000L
|
||||
#define M_STREAM_OUTPUT_FORMAT 0x00004000L
|
||||
|
||||
#define M_FPGA_OVERSCAN 0x00005000L
|
||||
#define M_LEFT 0x00000100L
|
||||
#define M_RIGHT 0x00000200L
|
||||
#define M_TOP 0x00000400L
|
||||
#define M_BOTTOM 0x00000800L
|
||||
#define M_FPGA_OVERSCAN_POSITION_MASK (M_LEFT|M_RIGHT|M_TOP|M_BOTTOM)
|
||||
|
||||
/************************************************************************/
|
||||
/* */
|
||||
/* MfpgaHookFunction */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
#define M_END_OF_PROCESSING 0x0001
|
||||
#define M_INTERRUPT_OVERRUN 0x0080
|
||||
|
||||
/************************************************************************/
|
||||
/* */
|
||||
/* MfpgaGetHookInfo */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
//#define M_TIME_STAMP 0x0040
|
||||
//#define M_FUNCTION_ID 0x2003
|
||||
//#define M_INSTANCE_ID 0x2004
|
||||
//#define M_SUB_FUNCTION_ID 0x200B
|
||||
#define M_FPGA_DEVICE_NUMBER 0x2100
|
||||
|
||||
#define M_IN_FPGA_INQUIRE_UNKNOWN_SIZE_OF_RANGE(X) (false)
|
||||
#define M_IN_FPGA_INQUIRE_STRING_RANGE(X) (((X&~M_CLIENT_TEXT_ENCODING) == M_FPGA_PACKAGE_NAME) || \
|
||||
(((X&~M_CLIENT_TEXT_ENCODING) >= M_PU_NAME) && ((X&~M_CLIENT_TEXT_ENCODING) < (M_PU_NAME + M_MAX_NB_OF_PUS))) ||\
|
||||
(((X&~M_CLIENT_TEXT_ENCODING) >= M_TU_NAME) && ((X&~M_CLIENT_TEXT_ENCODING) < (M_TU_NAME + M_MAX_NB_OF_PUS))))
|
||||
|
||||
#define M_IN_FPGA_INQUIRE_DOUBLE_RANGE(X) (false)
|
||||
#define M_IN_FPGA_INQUIRE_MIL_INT64_RANGE(X) (false)
|
||||
#define M_FPGA_INQUIRE_MUST_HAVE_USER_PTR(X) (M_IN_FPGA_INQUIRE_STRING_RANGE(X) || \
|
||||
M_IN_FPGA_INQUIRE_UNKNOWN_SIZE_OF_RANGE(X) )
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#if M_MIL_USE_STRING
|
||||
|
||||
#if defined(__cplusplus) && !defined(__MIL_AVX_H__) && (!defined(M_LINUX_KERNEL) || !M_LINUX_KERNEL) && (!defined(M_WINDOWS_NT_KERNEL_MODE) || !M_WINDOWS_NT_KERNEL_MODE)
|
||||
inline MIL_INT MFTYPE MfpgaInquire(MIL_ID SystemId, MIL_INT FpgaDeviceNum, MIL_INT64 InquireType, MIL_STRING &ResultPtr)
|
||||
{
|
||||
MIL_INT RetValue = 0;
|
||||
MIL_INT InternalStringSize = 0;
|
||||
|
||||
MfpgaInquire(SystemId, FpgaDeviceNum, InquireType + M_STRING_SIZE, &InternalStringSize);
|
||||
if(InternalStringSize > 0)
|
||||
{
|
||||
ResultPtr.assign(InternalStringSize, MIL_TEXT('\0'));
|
||||
RetValue = MfpgaInquire(SystemId, FpgaDeviceNum, InquireType, &ResultPtr[0]);
|
||||
ResultPtr.resize(InternalStringSize - 1);
|
||||
|
||||
}
|
||||
return RetValue;
|
||||
}
|
||||
|
||||
inline void MFTYPE MfpgaCommandInquire(MIL_FPGA_CONTEXT FpgaCommandContext,
|
||||
MIL_INT64 InquireType,
|
||||
MIL_STRING &UserVarPtr)
|
||||
{
|
||||
MIL_INT InternalStringSize = 0;
|
||||
|
||||
MfpgaCommandInquire(FpgaCommandContext, InquireType + M_STRING_SIZE, &InternalStringSize);
|
||||
if(InternalStringSize > 0)
|
||||
{
|
||||
UserVarPtr.assign(InternalStringSize, MIL_TEXT('\0'));
|
||||
MfpgaCommandInquire(FpgaCommandContext, InquireType, &UserVarPtr[0]);
|
||||
UserVarPtr.resize(InternalStringSize - 1);
|
||||
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#if M_MIL_USE_VECTOR
|
||||
|
||||
inline MIL_INT MFTYPE MfpgaInquire(MIL_ID SystemId, MIL_INT FpgaDeviceNum, MIL_INT64 InquireType, std::vector<MIL_STRING> &ResultArrayPtr)
|
||||
{
|
||||
MIL_INT RetValue = 0;
|
||||
|
||||
if(InquireType == M_PU_NAME)
|
||||
{
|
||||
MIL_INT numberOfPUs = 0;
|
||||
|
||||
MfpgaInquire(SystemId, FpgaDeviceNum, M_NUMBER_OF_PU, &numberOfPUs);
|
||||
ResultArrayPtr.resize(numberOfPUs);
|
||||
|
||||
for(MIL_INT i = 0; i < numberOfPUs; i++)
|
||||
{
|
||||
MIL_INT InternalStringSize = 0;
|
||||
MfpgaInquire(SystemId, FpgaDeviceNum, M_PU_NAME + i + M_STRING_SIZE, &InternalStringSize);
|
||||
|
||||
if(InternalStringSize > 0)
|
||||
{
|
||||
ResultArrayPtr[i].assign(InternalStringSize, MIL_TEXT('\0'));
|
||||
RetValue = MfpgaInquire(SystemId, FpgaDeviceNum, M_PU_NAME + i, &ResultArrayPtr[i][0]);
|
||||
ResultArrayPtr[i].resize(InternalStringSize - 1);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(InquireType == M_TU_NAME)
|
||||
{
|
||||
MIL_INT numberOfTUs = 0;
|
||||
|
||||
MfpgaInquire(SystemId, FpgaDeviceNum, M_NUMBER_OF_TU, &numberOfTUs);
|
||||
ResultArrayPtr.resize(numberOfTUs);
|
||||
|
||||
for(MIL_INT i = 0; i < numberOfTUs; i++)
|
||||
{
|
||||
MIL_INT InternalStringSize = 0;
|
||||
MfpgaInquire(SystemId, FpgaDeviceNum, M_TU_NAME + i + M_STRING_SIZE, &InternalStringSize);
|
||||
|
||||
if(InternalStringSize > 0)
|
||||
{
|
||||
ResultArrayPtr[i].assign(InternalStringSize, MIL_TEXT('\0'));
|
||||
RetValue = MfpgaInquire(SystemId, FpgaDeviceNum, M_TU_NAME + i, &ResultArrayPtr[i][0]);
|
||||
ResultArrayPtr[i].resize(InternalStringSize - 1);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
#if M_MIL_USE_SAFE_TYPE
|
||||
SafeTypeError(MIL_TEXT("MfpgaInquire"), MIL_TEXT("Inquire type compatible with std::vector<MIL_STRING> overload."));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
return RetValue;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if M_MIL_USE_VECTOR
|
||||
inline MIL_INT MFTYPE MfpgaInquire(MIL_ID SystemId, MIL_INT FpgaDeviceNum, MIL_INT64 InquireType, std::vector<MIL_INT> &ResultArrayPtr)
|
||||
{
|
||||
MIL_INT RetValue = 0;
|
||||
MIL_INT numberOfPUs = 0;
|
||||
|
||||
if(InquireType == M_PU_LIST)
|
||||
{
|
||||
MfpgaInquire(SystemId, FpgaDeviceNum, M_NUMBER_OF_PU, &numberOfPUs);
|
||||
if(numberOfPUs)
|
||||
{
|
||||
ResultArrayPtr.resize(numberOfPUs);
|
||||
RetValue = MfpgaInquire(SystemId, FpgaDeviceNum, InquireType, &ResultArrayPtr[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
ResultArrayPtr.resize(0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ResultArrayPtr.resize(1);
|
||||
RetValue = MfpgaInquire(SystemId, FpgaDeviceNum, InquireType, &ResultArrayPtr[0]);
|
||||
}
|
||||
|
||||
return RetValue;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
746
Include/milweb.h
Normal file
746
Include/milweb.h
Normal file
@ -0,0 +1,746 @@
|
||||
/////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Filename : milweb.h
|
||||
// Revision : 10.60.0776
|
||||
// Content : This file contains the defines necessary to use the milwebclient
|
||||
//
|
||||
// Copyright © Matrox Electronic Systems Ltd., 1992-2023.
|
||||
// All Rights Reserved
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////
|
||||
#ifndef __MIL_WEB_CLIENT_H
|
||||
#define __MIL_WEB_CLIENT_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#if !defined(MIL_COMPILE_VERSION_HEX) || (MIL_COMPILE_VERSION_HEX== 0)
|
||||
#ifdef MIL_COMPILE_VERSION_HEX
|
||||
#undef MIL_COMPILE_VERSION_HEX
|
||||
#endif
|
||||
#define MIL_COMPILE_VERSION_HEX 0x1060
|
||||
#endif
|
||||
|
||||
// Let's put the hex value in decimal.
|
||||
#define MIL_COMPILE_VERSION ((((MIL_COMPILE_VERSION_HEX >> 12) & 0xf) * 1000) + (((MIL_COMPILE_VERSION_HEX >> 8) & 0xf) * 100) + (((MIL_COMPILE_VERSION_HEX >> 4) & 0xf) * 10) + (((MIL_COMPILE_VERSION_HEX) & 0xf) ))
|
||||
#define MIL_COMPILE_TRUNK_VERSION 1095
|
||||
#define MIL_COMPILE_NEXT_MAJOR_VERSION 1100
|
||||
|
||||
|
||||
#define WEB_CLIENT 1
|
||||
#define M_CLIENT_VERSION 0x1000000
|
||||
|
||||
#if defined(__linux__)
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
#define M_MIL_USE_ARM 1
|
||||
#else
|
||||
#define M_MIL_USE_ARM 0
|
||||
#endif
|
||||
#define M_MIL_USE_LINUX 1
|
||||
#define M_MIL_USE_WINDOWS 0
|
||||
#if defined(__x86_64__) || defined(__aarch64__)
|
||||
#define M_MIL_USE_64BIT 1
|
||||
#else
|
||||
#define M_MIL_USE_64BIT 0
|
||||
#endif
|
||||
#else
|
||||
#define M_MIL_USE_LINUX 0
|
||||
#define M_MIL_USE_WINDOWS 1
|
||||
#if defined(_WIN64) || defined(WIN64)
|
||||
#define M_MIL_USE_64BIT 1
|
||||
#else
|
||||
#define M_MIL_USE_64BIT 0
|
||||
#endif
|
||||
#endif
|
||||
#define M_NULL 0
|
||||
|
||||
#if !defined(M_MIL_USE_UNICODE) && !M_MIL_USE_LINUX
|
||||
#define M_MIL_USE_UNICODE 1
|
||||
#elif !defined (M_MIL_USE_UNICODE)
|
||||
#define M_MIL_USE_UNICODE 0
|
||||
#endif
|
||||
|
||||
#if M_MIL_USE_UNICODE
|
||||
#if defined(UNICODE)
|
||||
#define M_MIL_UNICODE_API 1
|
||||
#else
|
||||
#define M_MIL_UNICODE_API 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if M_MIL_USE_UNICODE && M_MIL_UNICODE_API
|
||||
#define MIL_TEXT(quote) L##quote
|
||||
typedef wchar_t MIL_TEXT_CHAR;
|
||||
#elif M_MIL_USE_WINDOWS || M_MIL_USE_LINUX
|
||||
#define MIL_TEXT(quote) quote
|
||||
typedef char MIL_TEXT_CHAR;
|
||||
#else
|
||||
#error Operating system not supported !
|
||||
#endif
|
||||
typedef MIL_TEXT_CHAR* MIL_TEXT_PTR;
|
||||
typedef const MIL_TEXT_CHAR* MIL_CONST_TEXT_PTR;
|
||||
|
||||
|
||||
#if M_MIL_USE_WINDOWS
|
||||
#define MFTYPE _stdcall // Exported Function type
|
||||
#elif M_MIL_USE_LINUX
|
||||
#define MFTYPE // Exported Function type
|
||||
#else
|
||||
#error Operating system not supported in Mil.h!
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* MIL TYPE DEFINITIONS */
|
||||
/************************************************************************/
|
||||
/* GENERAL RELATED DEFINES */
|
||||
/***************************/
|
||||
#if M_MIL_USE_WINDOWS
|
||||
#if M_MIL_USE_64BIT
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1310)
|
||||
typedef __int64 MIL_INT;
|
||||
typedef unsigned __int64 MIL_UINT;
|
||||
#else
|
||||
typedef long long MIL_INT;
|
||||
typedef unsigned long long MIL_UINT;
|
||||
#endif
|
||||
|
||||
#define MIL_UINT_MIN 0ULL
|
||||
#define MIL_UINT_MAX 18446744073709551615ULL
|
||||
#define MIL_INT_MIN (-9223372036854775807LL - 1)
|
||||
#define MIL_INT_MAX 9223372036854775807LL
|
||||
#else
|
||||
#if (_MSC_VER < 1400) // Visual Studio 2003
|
||||
typedef long MIL_INT;
|
||||
typedef unsigned long MIL_UINT;
|
||||
#else // Visual Studio 2005
|
||||
// _W64 Lets you mark variables, such that when you compile
|
||||
// with /Wp64 the compiler will report any warnings that would
|
||||
// be reported if you were compiling with a 64-bit compiler.
|
||||
typedef _W64 long MIL_INT;
|
||||
typedef _W64 unsigned long MIL_UINT;
|
||||
#endif
|
||||
#define MIL_UINT_MIN 0UL
|
||||
#define MIL_UINT_MAX 4294967295UL
|
||||
#define MIL_INT_MIN (-2147483647L-1L)
|
||||
#define MIL_INT_MAX 2147483647L
|
||||
#endif
|
||||
|
||||
typedef long MIL_INT32;
|
||||
typedef const long MIL_CINT32;
|
||||
typedef unsigned long MIL_UINT32;
|
||||
typedef const unsigned long MIL_CUINT32;
|
||||
#define MIL_UINT32_MIN 0UL
|
||||
#define MIL_UINT32_MAX 4294967295UL
|
||||
#define MIL_INT32_MIN (-2147483647L-1L)
|
||||
#define MIL_INT32_MAX 2147483647L
|
||||
#define MIL_UINT32_MIN_FLT 0UL //Min precise value in 32-bit floating point.
|
||||
#define MIL_UINT32_MAX_FLT 0xFFFFFF00UL //Max precise value in 32-bit floating point.
|
||||
#define MIL_INT32_MIN_FLT (-2147483647L-1L) //Min precise value in 32-bit floating point.
|
||||
#define MIL_INT32_MAX_FLT 0x7FFFFF80L //Max precise value in 32-bit floating point.
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1310)
|
||||
typedef __int64 MIL_INT64;
|
||||
typedef const __int64 MIL_CINT64;
|
||||
typedef unsigned __int64 MIL_UINT64;
|
||||
typedef const unsigned __int64 MIL_CUINT64;
|
||||
#else
|
||||
typedef long long MIL_INT64;
|
||||
typedef const long long MIL_CINT64;
|
||||
typedef unsigned long long MIL_UINT64;
|
||||
typedef const unsigned long long MIL_CUINT64;
|
||||
#endif
|
||||
#define MIL_UINT64_MIN 0ULL
|
||||
#define MIL_UINT64_MAX 18446744073709551615ULL
|
||||
#define MIL_INT64_MIN (-9223372036854775807LL - 1)
|
||||
#define MIL_INT64_MAX 9223372036854775807LL
|
||||
#define MIL_UINT64_MIN_DBL 0ULL //Min precise value in 64-bit floating point.
|
||||
#define MIL_UINT64_MAX_DBL 0xFFFFFFFFFFFFF800ULL //Max precise value in 64-bit floating point.
|
||||
#define MIL_INT64_MIN_DBL (-9223372036854775807LL - 1LL) //Min precise value in 64-bit floating point.
|
||||
#define MIL_INT64_MAX_DBL 0x7FFFFFFFFFFFFC00LL //Max precise value in 64-bit floating point.
|
||||
|
||||
typedef double MIL_DOUBLE;
|
||||
typedef float MIL_FLOAT;
|
||||
typedef char MIL_INT8;
|
||||
typedef const char MIL_CINT8;
|
||||
typedef unsigned char MIL_UINT8;
|
||||
typedef const unsigned char MIL_CUINT8;
|
||||
typedef short MIL_INT16;
|
||||
typedef const short MIL_CINT16;
|
||||
typedef unsigned short MIL_UINT16;
|
||||
typedef const unsigned short MIL_CUINT16;
|
||||
typedef MIL_INT32 MIL_BOOL;
|
||||
typedef const MIL_INT32 MIL_CBOOL;
|
||||
|
||||
#define MIL_UINT8_MIN 0UL
|
||||
#define MIL_UINT8_MAX 255UL
|
||||
#define MIL_INT8_MIN -128L
|
||||
#define MIL_INT8_MAX 127L
|
||||
#define MIL_UINT16_MIN 0UL
|
||||
#define MIL_UINT16_MAX 65535UL
|
||||
#define MIL_INT16_MIN -32768L
|
||||
#define MIL_INT16_MAX 32767L
|
||||
#define MIL_DOUBLE_MIN DBL_MIN
|
||||
#define MIL_DOUBLE_MAX DBL_MAX
|
||||
#define MIL_FLOAT_MIN FLT_MIN
|
||||
#define MIL_FLOAT_MAX FLT_MAX
|
||||
#define MIL_BOOL_MIN 0UL
|
||||
#define MIL_BOOL_MAX 1UL
|
||||
|
||||
#if (M_MIL_USE_UNICODE && M_MIL_UNICODE_API) || defined (_NATIVE_WCHAR_T_DEFINED)
|
||||
typedef wchar_t MIL_WCHAR;
|
||||
#else
|
||||
typedef unsigned short MIL_WCHAR;
|
||||
#endif
|
||||
|
||||
#elif M_MIL_USE_LINUX
|
||||
typedef long MIL_INT;
|
||||
typedef unsigned long MIL_UINT;
|
||||
|
||||
#if M_MIL_USE_64BIT
|
||||
typedef int MIL_INT32;
|
||||
typedef const int MIL_CINT32;
|
||||
typedef unsigned int MIL_UINT32;
|
||||
typedef const unsigned int MIL_CUINT32;
|
||||
|
||||
#define MIL_UINT_MIN MIL_UINT64_MIN
|
||||
#define MIL_UINT_MAX MIL_UINT64_MAX
|
||||
#define MIL_INT_MIN MIL_INT64_MIN
|
||||
#define MIL_INT_MAX MIL_INT64_MAX
|
||||
#else // M_MIL_USE_64BIT
|
||||
typedef long MIL_INT32;
|
||||
typedef const long MIL_CINT32;
|
||||
typedef unsigned long MIL_UINT32;
|
||||
typedef const unsigned long MIL_CUINT32;
|
||||
|
||||
#define MIL_UINT_MIN MIL_UINT32_MIN
|
||||
#define MIL_UINT_MAX MIL_UINT32_MAX
|
||||
#define MIL_INT_MIN MIL_INT32_MIN
|
||||
#define MIL_INT_MAX MIL_INT32_MAX
|
||||
#endif
|
||||
|
||||
#define MIL_UINT32_MIN 0
|
||||
#define MIL_UINT32_MAX 4294967295U
|
||||
#define MIL_INT32_MIN (-MIL_INT32_MAX - 1) // -2147483648L does not yield the right value
|
||||
#define MIL_INT32_MAX 2147483647
|
||||
#define MIL_UINT32_MIN_FLT 0U //Min precise value in 32-bit floating point.
|
||||
#define MIL_UINT32_MAX_FLT 0xFFFFFF00U //Max precise value in 32-bit floating point.
|
||||
#define MIL_INT32_MIN_FLT (-2147483647-1) //Min precise value in 32-bit floating point.
|
||||
#define MIL_INT32_MAX_FLT 0x7FFFFF80 //Max precise value in 32-bit floating point.
|
||||
|
||||
#if M_MIL_USE_64BIT
|
||||
typedef long MIL_INT64;
|
||||
typedef const long MIL_CINT64;
|
||||
typedef unsigned long MIL_UINT64;
|
||||
typedef const unsigned long MIL_CUINT64;
|
||||
#else
|
||||
typedef long long MIL_INT64;
|
||||
typedef const long long MIL_CINT64;
|
||||
typedef unsigned long long MIL_UINT64;
|
||||
typedef const unsigned long long MIL_CUINT64;
|
||||
#endif
|
||||
#define MIL_UINT64_MIN 0ULL
|
||||
#define MIL_UINT64_MAX 18446744073709551615ULL
|
||||
#define MIL_INT64_MAX 9223372036854775807LL
|
||||
#define MIL_INT64_MIN (-MIL_INT64_MAX - 1LL) // Using -9223372036854775808LL directly causes weird warnings.
|
||||
#define MIL_UINT64_MIN_DBL 0ULL //Min precise value in 64-bit floating point.
|
||||
#define MIL_UINT64_MAX_DBL 0xFFFFFFFFFFFFF800ULL //Max precise value in 64-bit floating point.
|
||||
#define MIL_INT64_MIN_DBL (-9223372036854775807LL - 1LL) //Min precise value in 64-bit floating point.
|
||||
#define MIL_INT64_MAX_DBL 0x7FFFFFFFFFFFFC00LL //Max precise value in 64-bit floating point.
|
||||
|
||||
typedef double MIL_DOUBLE;
|
||||
typedef float MIL_FLOAT;
|
||||
typedef char MIL_INT8;
|
||||
typedef const char MIL_CINT8;
|
||||
typedef unsigned char MIL_UINT8;
|
||||
typedef const unsigned char MIL_CUINT8;
|
||||
typedef short MIL_INT16;
|
||||
typedef const short MIL_CINT16;
|
||||
typedef unsigned short MIL_UINT16;
|
||||
typedef const unsigned short MIL_CUINT16;
|
||||
typedef MIL_INT32 MIL_BOOL;
|
||||
typedef const MIL_INT32 MIL_CBOOL;
|
||||
|
||||
#define MIL_UINT8_MIN 0UL
|
||||
#define MIL_UINT8_MAX 255UL
|
||||
#define MIL_INT8_MIN -128L
|
||||
#define MIL_INT8_MAX 127L
|
||||
#define MIL_UINT16_MIN 0UL
|
||||
#define MIL_UINT16_MAX 65535UL
|
||||
#define MIL_INT16_MIN -32768L
|
||||
#define MIL_INT16_MAX 32767L
|
||||
#define MIL_DOUBLE_MIN DBL_MIN
|
||||
#define MIL_DOUBLE_MAX DBL_MAX
|
||||
#define MIL_FLOAT_MIN FLT_MIN
|
||||
#define MIL_FLOAT_MAX FLT_MAX
|
||||
#define MIL_BOOL_MIN 0UL
|
||||
#define MIL_BOOL_MAX 1UL
|
||||
|
||||
typedef unsigned short MIL_WCHAR;
|
||||
|
||||
#else
|
||||
#error Operating system not supported!
|
||||
#endif
|
||||
|
||||
typedef MIL_UINT64 MIL_DATA_PTR;
|
||||
|
||||
typedef MIL_DATA_PTR MIL_PHYS_DATA_PTR;
|
||||
typedef void* MIL_HOST_DATA_PTR;
|
||||
typedef const void* MIL_CONST_HOST_DATA_PTR;
|
||||
|
||||
typedef MIL_UINT MIL_ADDR; // this type is used to cast a pointer to an integer type for arithmetic conversion
|
||||
// for example void *NewPtr = (void*)((MIL_ADDR)OldPtr + Offset);
|
||||
|
||||
typedef unsigned char MIL_BYTE;
|
||||
|
||||
#if M_MIL_USE_64BIT
|
||||
#define M_MIL_USE_INT64_ID 1
|
||||
#endif
|
||||
|
||||
#if defined(M_MIL_USE_INT64_ID) && M_MIL_USE_INT64_ID
|
||||
typedef MIL_INT64 MIL_ID;
|
||||
#else
|
||||
typedef MIL_INT32 MIL_ID;
|
||||
#endif
|
||||
|
||||
#if M_MIL_USE_LINUX && M_MIL_USE_64BIT
|
||||
#define MAKE_INT64(I) (I ## L)
|
||||
#define MAKE_UINT64(I) (I ## LU)
|
||||
#elif M_MIL_USE_LINUX || (defined(__GNUC__) && __GNUC__)
|
||||
#define MAKE_INT64(I) (I ## LL)
|
||||
#define MAKE_UINT64(I) (I ## LLU)
|
||||
#elif M_MIL_USE_WINDOWS
|
||||
#define MAKE_INT64(I) (I##I64)
|
||||
#define MAKE_UINT64(I) (I##Ui64)
|
||||
#else
|
||||
#define MAKE_INT64(I) (I)
|
||||
#define MAKE_UINT64(I) (I)
|
||||
#endif
|
||||
|
||||
#if !M_MIL_USE_64BIT
|
||||
#define M_PTR_TO_DOUBLE(ptr) ((double) MPtrToInt((void*)(ptr)))
|
||||
#define M_STRING_TO_DOUBLE(ptr) M_PTR_TO_DOUBLE((ptr))
|
||||
#define M_PTR_TO_MIL_INT(val) ((MIL_INT)MPtrToInt((void*)(val)))
|
||||
#else
|
||||
#define M_PTR_TO_DOUBLE(ptr) (MIL_INT64)(ptr)
|
||||
#define M_STRING_TO_DOUBLE(ptr) M_PTR_TO_DOUBLE(ptr)
|
||||
#define M_PTR_TO_MIL_INT(val) ((MIL_INT)((MIL_UINT)val))
|
||||
#endif //!M_MIL_USE_64BIT
|
||||
#define M_DOUBLE_TO_PTR(val) ((void *)((MIL_UINT)val))
|
||||
#define M_CLIENT_ASCII_ENCODING MAKE_INT64(0x0001000000000000)
|
||||
#define M_CLIENT_TEXT_ENCODING MAKE_INT64(0x0001000000000000)
|
||||
|
||||
#if M_MIL_USE_UNICODE && !M_MIL_UNICODE_API
|
||||
#define M_CLIENT_ENCODING M_CLIENT_ASCII_ENCODING
|
||||
#else
|
||||
#define M_CLIENT_ENCODING 0
|
||||
#endif
|
||||
|
||||
#define M_CLIENT_ASCII_ENCODING_SET(X) ((((X) & M_CLIENT_TEXT_ENCODING) == M_CLIENT_ASCII_ENCODING) ? true : false)
|
||||
#define M_STRIP_CLIENT_TEXT_ENCODING(X) ((X) & ~M_CLIENT_TEXT_ENCODING)
|
||||
|
||||
#define M_STRING_SIZE MAKE_INT64(0x0000050000000000)
|
||||
#define M_FUNC_INQUIRE_STRING_START 47
|
||||
#define M_APP_INQUIRE_OBJ_STRING_STA M_FUNC_INQUIRE_STRING_START // 47
|
||||
#define M_OBJECT_NAME ((M_FUNC_INQUIRE_STRING_START+0)|M_CLIENT_ENCODING) //47
|
||||
|
||||
#define M_OBJECT_NAME_SIZE (M_STRING_SIZE + M_OBJECT_NAME)
|
||||
|
||||
#define M_OBJ_HOOK_RANGE_START 0x000000800L
|
||||
#define M_INVALID -1
|
||||
#define M_DEFAULT 0x10000000L
|
||||
#define M_UNHOOK 0x04000000L
|
||||
#define M_NULL_ERROR 0L
|
||||
#define M_NO_ERROR 0L
|
||||
|
||||
#define M_NO_TIMEOUT 0x00000800
|
||||
#define M_BUFFER_TOO_SMALL 1
|
||||
#define M_SUCCESS 0x00000000L // Already defined in milreg.h, milcolor.h
|
||||
|
||||
#define M_CURRENT 0x00000002L
|
||||
#define M_CURRENT_FCT 0x00030000L
|
||||
#define M_CURRENT_SUB_NB 0x00000004L
|
||||
#define M_CURRENT_SUB 0x00050000L
|
||||
#define M_CURRENT_SUB_1 0x00050000L
|
||||
#define M_CURRENT_SUB_2 0x00060000L
|
||||
#define M_CURRENT_SUB_3 0x00070000L
|
||||
#define M_GLOBAL 0x00000008L
|
||||
#define M_GLOBAL_FCT 0x00090000L
|
||||
#define M_GLOBAL_SUB_NB 0x000A0000L
|
||||
#define M_GLOBAL_SUB 0x000B0000L
|
||||
#define M_GLOBAL_SUB_1 0x000B0000L
|
||||
#define M_GLOBAL_SUB_2 0x000C0000L
|
||||
#define M_GLOBAL_SUB_3 0x000D0000L
|
||||
#define M_PARAM_NB 0x00140000L
|
||||
#define M_BUFFER_ID 0x00160000L
|
||||
#define M_REGION_OFFSET_X 0x00410000L
|
||||
#define M_REGION_OFFSET_Y 0x00420000L
|
||||
#define M_REGION_SIZE_X 0x00430000L
|
||||
#define M_REGION_SIZE_Y 0x00480000L
|
||||
#define M_OBJECT_ID 0x001B0000L
|
||||
#define M_PARAM_VALUE 0x08000000L
|
||||
#define M_EXTENDED_PARAM_TYPE 0x10000000L
|
||||
#define M_PARAM_ATTRIBUTES 0x04000000L
|
||||
#define M_PARAM_SIZE 0x01000000L
|
||||
#if MIL_COMPILE_VERSION < MIL_COMPILE_TRUNK_VERSION
|
||||
#if (M_MIL_USE_UNICODE && !M_MIL_UNICODE_API )
|
||||
#define M_MESSAGE (0x20000000L|M_CLIENT_ERROR_ASCII_MODE)
|
||||
#else
|
||||
#define M_MESSAGE 0x20000000L
|
||||
#endif
|
||||
#else
|
||||
#define M_MESSAGE (0x20000000L | M_CLIENT_ENCODING)
|
||||
#endif
|
||||
|
||||
#if MIL_COMPILE_VERSION < MIL_COMPILE_TRUNK_VERSION
|
||||
#define M_OLD_OBJECT_PUBLISH_WEB 34L
|
||||
#endif
|
||||
|
||||
#define M_SILENT 0x00000100L
|
||||
|
||||
#define M_ERROR 0x40000000L
|
||||
#define M_ERROR_CURRENT (M_ERROR|M_CURRENT)
|
||||
#define M_CONNECTING 1L
|
||||
#define M_DISCONNECT 2L
|
||||
#define M_CONNECT 3L
|
||||
#define M_TIMEOUT 2077L
|
||||
#define M_UPDATE_WEB 3187L
|
||||
#define M_UPDATE_END M_OBJ_HOOK_RANGE_START+8L
|
||||
#define M_OBJECT_FREE 0x00010000L
|
||||
#define M_OBJECT_PUBLISH_WEB 38L
|
||||
#define M_COMPONENT_ADD 0x00040000
|
||||
#define M_COMPONENT_REMOVE M_OBJ_HOOK_RANGE_START+10L
|
||||
#define M_GET_END 32L
|
||||
#define M_READ_END 11L
|
||||
#define M_UPDATE_INTERACTIVE_STATE 84L
|
||||
|
||||
#define M_ERROR_MESSAGE_SIZE 320L
|
||||
|
||||
#define M_INTERNAL_FORMAT 0x00003F00L
|
||||
#define M_INTERNAL_FORMAT_SHIFT 8L
|
||||
#define M_INTERNAL_COMPLETE_FORMAT 0x7FFFFF80L
|
||||
#define M_ANY_INTERNAL_FORMAT (0 << M_INTERNAL_FORMAT_SHIFT)
|
||||
#define M_BGRX32 (17 << M_INTERNAL_FORMAT_SHIFT) // Force 32 bits pixels in color BGRX 8.8.8.8 format
|
||||
#define M_BGR32 M_BGRX32
|
||||
|
||||
#define M_APP_INQUIRE_SYS_START 15000L
|
||||
#define M_CLOSE_CONNECTION (M_APP_INQUIRE_SYS_START+504L)
|
||||
#define M_WEB_PUBLISHED_FORMAT 3206L
|
||||
|
||||
// Inquires
|
||||
#if MIL_COMPILE_VERSION < MIL_COMPILE_TRUNK_VERSION
|
||||
#define M_OLD_WEB_PUBLISH 14L
|
||||
#define M_OLD_WEB_PUBLISHED_LIST 4
|
||||
#define M_OLD_WEB_PUBLISHED_LIST_SIZE 5
|
||||
#define M_OLD_WEB_PUBLISHED_NAME (6 | M_CLIENT_ENCODING)
|
||||
#endif
|
||||
#define M_WEB_PUBLISH 244
|
||||
#define M_WEB_PUBLISHED_LIST 12
|
||||
#define M_WEB_PUBLISHED_LIST_SIZE 17
|
||||
#define M_WEB_PUBLISHED_NAME (7 | M_CLIENT_ENCODING)
|
||||
|
||||
#define M_TYPE 1008L
|
||||
#define M_SIZE_X 1536L
|
||||
#define M_SIZE_Y 1537L
|
||||
#define M_SIZE_BYTE 5061L
|
||||
#define M_MESSAGE_LENGTH 16L
|
||||
#define M_INTERACTIVE M_NULL
|
||||
|
||||
// Object Type
|
||||
#define M_APPLICATION 0x00000200L
|
||||
#define M_DISPLAY 0x00200000L
|
||||
#define M_LUT 0x00040000L
|
||||
#define M_KERNEL 0x00400000L
|
||||
#define M_EVENT 0x00000080L
|
||||
#define M_STRUCT_ELEMENT 0x08000000L
|
||||
#define M_ARRAY 0x00000040L
|
||||
#define M_GROUP MAKE_INT64(0x0000400000000000)
|
||||
#define M_IMAGE 0x00000004L
|
||||
#define M_MODIFIED_BUFFER 0x40000000L
|
||||
#define M_BUFFER_ID 0x00160000L
|
||||
#define M_OBJECT_ID 0x001B0000L
|
||||
#define M_GROUP_ID 18L
|
||||
#define M_MESSAGE_MAILBOX MAKE_INT64(0x0000800000000000)
|
||||
#define M_FUNC_INQUIRE_STRING_START 47
|
||||
|
||||
#define M_OBJECT_NAME ((M_FUNC_INQUIRE_STRING_START+0)|M_CLIENT_ENCODING)
|
||||
#define M_OBJECT_NAME_SIZE (M_STRING_SIZE + M_OBJECT_NAME)
|
||||
#define M_OBJECT_TYPE 136
|
||||
#define M_COMPONENT_COUNT 17L
|
||||
#define M_WEB_CLIENT_INDEX 219L
|
||||
#define M_WEB_CLIENT_TYPE 220L
|
||||
#define M_READ_WRITE 0x00000010L
|
||||
#define M_READ_ONLY 0x00000020L
|
||||
#define M_NO 0L
|
||||
|
||||
#define M_COMPONENT_ID_LIST M_COMPONENT_LIST
|
||||
#define M_COMPONENT_LIST 0x00100000
|
||||
#define M_ARRAY_ID_MASK 0x000FFFFF
|
||||
#define M_ARRAY_ID_SIZE(N) (N & M_ARRAY_ID_MASK)
|
||||
#define M_EXTRACT_ARRAY_ID_SIZE(N) ((MIL_INT)(N & M_ARRAY_ID_MASK))
|
||||
|
||||
#define M_HOST_ADDRESS 0x00010000L
|
||||
#define M_IMAGE_HOST_ADDRESS 0x00010000L
|
||||
// DataType
|
||||
#define M_SIGN 1014L
|
||||
#define M_SIZE_BAND 1005L
|
||||
#define M_UNSIGNED 0x00000000L
|
||||
#define M_SIGNED 0x08000000L
|
||||
#define M_FLOAT (0x40000000L | M_SIGNED)
|
||||
#define M_USER_DATA_PTR 0x00000001
|
||||
|
||||
#define M_MESSAGE_PTR 101
|
||||
|
||||
#define M_MOUSE_LEFT_BUTTON_DOWN 56L
|
||||
#define M_MOUSE_RIGHT_BUTTON_DOWN 57L
|
||||
#define M_MOUSE_LEFT_BUTTON_UP 58L
|
||||
#define M_MOUSE_RIGHT_BUTTON_UP 59L
|
||||
#define M_MOUSE_MOVE 64L
|
||||
#define M_MOUSE_WHEEL 65L
|
||||
#define M_MOUSE_MIDDLE_BUTTON_DOWN 66L
|
||||
#define M_MOUSE_MIDDLE_BUTTON_UP 67L
|
||||
#define M_KEY_DOWN 68L
|
||||
#define M_KEY_UP 69L
|
||||
#define M_MOUSE_LEAVE 85L
|
||||
|
||||
#define M_KEY_SHIFT 0x00010000
|
||||
#define M_KEY_CTRL 0x00020000
|
||||
#define M_KEY_ALT 0x00040000
|
||||
#define M_MOUSE_LEFT_BUTTON 0x00080000
|
||||
#define M_MOUSE_MIDDLE_BUTTON 0x00100000
|
||||
#define M_MOUSE_RIGHT_BUTTON 0x00200000
|
||||
#define M_KEY_WIN 0x00400000
|
||||
|
||||
#define M_MOUSE_POSITION_X 1L
|
||||
#define M_MOUSE_POSITION_Y 2L
|
||||
#define M_ANNOTATIONS_DC 3L
|
||||
#define M_COMBINATION_KEYS 7L
|
||||
#define M_EVENT_VALUE 8L
|
||||
|
||||
#define M_MOUSE_WHEEL_VALUE M_EVENT_VALUE
|
||||
#define M_KEY_VALUE M_EVENT_VALUE
|
||||
|
||||
|
||||
|
||||
#define M_FRAMES_PER_SECOND_DEFAULT 10
|
||||
|
||||
#define M_ENABLE -9997L
|
||||
#define M_DISABLE -9999L
|
||||
#define M_NOW 29L
|
||||
|
||||
#define M_PRINT_DISABLE 0L
|
||||
#define M_PRINT_ENABLE 1L
|
||||
|
||||
#define M_FRAME_RATE 6002L
|
||||
|
||||
#define M_PIXEL_FORMAT 3032L //M_LOCAL_DISPLAY_CONTROL
|
||||
#define M_DATA_FORMAT 1041L
|
||||
#define M_PITCH 0x20000000L
|
||||
#define M_PITCH_BYTE 0x08000000L
|
||||
#define M_INTERNAL_FORMAT_SHIFT 8L
|
||||
#define M_MONO8 (2 << M_INTERNAL_FORMAT_SHIFT) // Force 8 bits pixels in monochrome format
|
||||
#define M_RGBX32 (9 << M_INTERNAL_FORMAT_SHIFT) // Force 32 bits pixels in color RGBX 8.8.8.8 format
|
||||
#define M_RGB32 M_RGBX32
|
||||
|
||||
#define WEB_TIMEOUT 100
|
||||
#define WEB_MAX_LOOP_WAIT 20
|
||||
|
||||
// MIL Web application Type
|
||||
#define M_WEB_APPLICATION 1L
|
||||
#define M_STANDALONE_APPLICATION 2L
|
||||
|
||||
typedef MIL_INT (MFTYPE* MIL_HOOK_FUNCTION_PTR)(MIL_INT HookType,
|
||||
MIL_ID EventId,
|
||||
void* UserData);
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
#if M_MIL_USE_UNICODE
|
||||
void MFTYPE MilWebMappOpenConnectionW(MIL_CONST_TEXT_PTR ConnectionDescriptor, MIL_INT64 InitFlag, MIL_INT64 ControlFlag, MIL_ID* RemoteContextAppIdPtr);
|
||||
void MFTYPE MilWebMappOpenConnectionA(const char* ConnectionDescriptor, MIL_INT64 InitFlag, MIL_INT64 ControlFlag, MIL_ID* RemoteContextAppIdPtr);
|
||||
#if M_MIL_UNICODE_API
|
||||
#define MilWebMappOpenConnection MilWebMappOpenConnectionW
|
||||
#else
|
||||
#define MilWebMappOpenConnection MilWebMappOpenConnectionA
|
||||
#endif
|
||||
#else
|
||||
void MFTYPE MilWebMappOpenConnection(MIL_CONST_TEXT_PTR ConnectionDescriptor, MIL_INT64 InitFlag, MIL_INT64 ControlFlag, MIL_ID* RemoteContextAppIdPtr);
|
||||
#endif
|
||||
void MFTYPE MilWebMappCloseConnection(MIL_ID ContextAppId);
|
||||
MIL_INT MFTYPE MilWebMappInquireConnection(MIL_ID ContextAppId, MIL_INT64 InquireType, MIL_INT64 ControlFlag, MIL_INT64 ExtraFlag, void* UserVarPtr);
|
||||
MIL_INT MFTYPE MilWebMappInquire(MIL_ID ContextAppId, MIL_INT64 InquireType, void* ResultPtr);
|
||||
void MFTYPE MilWebMappControl(MIL_ID ContextAppId, MIL_INT64 ControlType, MIL_INT ControlFlag);
|
||||
void MFTYPE MilWebMappHookFunction(MIL_ID ContextAppId, MIL_INT HookType, MIL_HOOK_FUNCTION_PTR HookHandlerPtr, void* UserDataPtr);
|
||||
MIL_INT MFTYPE MilWebMappGetHookInfo(MIL_ID ContextAppId, MIL_ID EventId, MIL_INT64 InfoType, void* UserPtr);
|
||||
|
||||
MIL_INT MFTYPE MilWebMdispInquire(MIL_ID DisplayId, MIL_INT64 InquireType, void* ResultPtr);
|
||||
void MFTYPE MilWebMdispControl(MIL_ID DisplayId, MIL_INT64 ControlType, MIL_DOUBLE ControlFlag);
|
||||
void MFTYPE MilWebMdispMessage( MIL_ID DisplayId, MIL_INT EventType, MIL_INT MousePositionX,MIL_INT MousePositionY, MIL_INT EventValue, MIL_INT CombinationKeys, MIL_INT UserValue);
|
||||
void MFTYPE MilWebMdispHookFunction(MIL_ID ObjectId, MIL_INT HookType, MIL_HOOK_FUNCTION_PTR HookHandler, void *UserDataPtr);
|
||||
MIL_INT MFTYPE MilWebMdispGetHookInfo(MIL_ID EventId, MIL_INT64 InfoType, void* UserVarPtr);
|
||||
void MFTYPE MilWebMdispZoom(MIL_ID DisplayId, MIL_DOUBLE XFactor, MIL_DOUBLE YFactor);
|
||||
void MFTYPE MilWebMdispPan(MIL_ID DisplayId, MIL_DOUBLE XOffset, MIL_DOUBLE YOffset);
|
||||
|
||||
MIL_INT MFTYPE MilWebMbufInquire(MIL_ID BufId, MIL_INT64 InquireType, void* ResultPtr);
|
||||
void MFTYPE MilWebMbufControl(MIL_ID BufId, MIL_INT64 ControlType, MIL_DOUBLE ControlFlag);
|
||||
MIL_INT MFTYPE MilWebMbufGetHookInfo(MIL_ID EventId, MIL_INT64 InfoType, void* UserPtr);
|
||||
void MFTYPE MilWebMbufGet(MIL_ID SrcBufId, void* BufferPtr);
|
||||
|
||||
MIL_INT MFTYPE MilWebMobjInquire(MIL_ID ObjectId, MIL_INT64 InquireType, void* ResultPtr);
|
||||
void MFTYPE MilWebMobjControl(MIL_ID ObjId, MIL_INT64 ControlType, MIL_DOUBLE ControlFlag);
|
||||
void MFTYPE MilWebMobjHookFunction(MIL_ID ObjectId, MIL_INT HookType, MIL_HOOK_FUNCTION_PTR HookHandler, void *UserDataPtr);
|
||||
MIL_INT MFTYPE MilWebMobjGetHookInfo(MIL_ID EventId, MIL_INT64 InfoType, void* UserVarPtr);
|
||||
|
||||
|
||||
MIL_INT64 MFTYPE MilWebMobjMessageRead(MIL_ID MessageId, void* MessagePtr, MIL_INT64 MessageInSize, MIL_INT64 *MessageOutSizePtr, MIL_INT64 *MessageTagPtr, MIL_INT64 *StatusPtr, MIL_INT64 OperationFlag);
|
||||
void MFTYPE MilWebMobjMessageWrite(MIL_ID MessageId, const void* MessagePtr, MIL_INT64 MessageSize, MIL_INT64 MessageTag, MIL_INT64 OperationFlag);
|
||||
|
||||
MIL_UINT MFTYPE MPtrToInt(void *pPtr);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
namespace MilWeb
|
||||
{
|
||||
#if M_MIL_USE_UNICODE
|
||||
#if M_MIL_UNICODE_API
|
||||
inline void MappOpenConnection(MIL_CONST_TEXT_PTR ConnectionDescriptor, MIL_INT64 InitFlag, MIL_INT64 ControlFlag, MIL_ID* RemoteContextAppIdPtr)
|
||||
{
|
||||
MilWebMappOpenConnectionW(ConnectionDescriptor, InitFlag, ControlFlag, RemoteContextAppIdPtr);
|
||||
}
|
||||
#else
|
||||
inline void MappOpenConnection(const char* ConnectionDescriptor, MIL_INT64 InitFlag, MIL_INT64 ControlFlag, MIL_ID* RemoteContextAppIdPtr)
|
||||
{
|
||||
MilWebMappOpenConnectionA(ConnectionDescriptor, InitFlag, ControlFlag, RemoteContextAppIdPtr);
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
inline void MappOpenConnection(MIL_CONST_TEXT_PTR ConnectionDescriptor, MIL_INT64 InitFlag, MIL_INT64 ControlFlag, MIL_ID* RemoteContextAppIdPtr)
|
||||
{
|
||||
MilWebMappOpenConnection(ConnectionDescriptor, InitFlag, ControlFlag, RemoteContextAppIdPtr);
|
||||
}
|
||||
#endif
|
||||
inline void MappCloseConnection(MIL_ID ContextAppId)
|
||||
{
|
||||
MilWebMappCloseConnection(ContextAppId);
|
||||
}
|
||||
|
||||
inline MIL_INT MappInquireConnection(MIL_ID ContextAppId, MIL_INT64 InquireType, MIL_INT64 ControlFlag, MIL_INT64 ExtraFlag, void* UserVarPtr)
|
||||
{
|
||||
return MilWebMappInquireConnection(ContextAppId, InquireType, ControlFlag, ExtraFlag, UserVarPtr);
|
||||
}
|
||||
|
||||
inline MIL_INT MappInquireConnection(MIL_ID ContextAppId, MIL_INT64 InquireType, MIL_CONST_TEXT_PTR ControlFlag, MIL_INT64 ExtraFlag, void* UserVarPtr)
|
||||
{
|
||||
return MilWebMappInquireConnection(ContextAppId, InquireType, M_PTR_TO_MIL_INT(ControlFlag), ExtraFlag, UserVarPtr);
|
||||
}
|
||||
|
||||
inline MIL_INT MappInquire(MIL_ID ContextAppId, MIL_INT64 InquireType, void* ResultPtr)
|
||||
{
|
||||
return MilWebMappInquire(ContextAppId, InquireType, ResultPtr);
|
||||
}
|
||||
|
||||
inline void MappControl(MIL_ID ContextAppId, MIL_INT64 ControlType, MIL_INT ControlValue)
|
||||
{
|
||||
MilWebMappControl(ContextAppId, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void MappHookFunction(MIL_ID ContextAppId, MIL_INT HookType, MIL_HOOK_FUNCTION_PTR HookHandlerPtr, void* UserDataPtr)
|
||||
{
|
||||
MilWebMappHookFunction(ContextAppId, HookType, HookHandlerPtr, UserDataPtr);
|
||||
}
|
||||
|
||||
inline MIL_INT MappGetHookInfo(MIL_ID ContextAppId, MIL_ID EventId, MIL_INT64 InfoType, void* UserVarPtr)
|
||||
{
|
||||
return MilWebMappGetHookInfo(ContextAppId,EventId, InfoType, UserVarPtr);
|
||||
}
|
||||
|
||||
inline MIL_INT MdispInquire(MIL_ID DisplayId, MIL_INT64 InquireType, void* UserVarPtr)
|
||||
{
|
||||
return MilWebMdispInquire(DisplayId, InquireType, UserVarPtr);
|
||||
}
|
||||
|
||||
inline void MdispControl(MIL_ID DisplayId, MIL_INT64 ControlType, MIL_DOUBLE ControlValue)
|
||||
{
|
||||
MilWebMdispControl(DisplayId, ControlType, ControlValue);
|
||||
}
|
||||
|
||||
inline void MdispMessage( MIL_ID DisplayId, MIL_INT EventType, MIL_INT MousePositionX,MIL_INT MousePositionY, MIL_INT EventValue, MIL_INT CombinationKeys, MIL_INT UserValue)
|
||||
{
|
||||
MilWebMdispMessage(DisplayId, EventType, MousePositionX, MousePositionY, EventValue, CombinationKeys, UserValue);
|
||||
}
|
||||
|
||||
inline void MdispHookFunction(MIL_ID ObjectId, MIL_INT HookType, MIL_HOOK_FUNCTION_PTR HookHandler, void *UserDataPtr)
|
||||
{
|
||||
MilWebMdispHookFunction(ObjectId, HookType, HookHandler, UserDataPtr);
|
||||
}
|
||||
|
||||
inline MIL_INT MdispGetHookInfo(MIL_ID EventId, MIL_INT64 InfoType, void* UserVarPtr)
|
||||
{
|
||||
return MilWebMdispGetHookInfo(EventId, InfoType, UserVarPtr);
|
||||
}
|
||||
|
||||
inline void MdispZoom(MIL_ID DisplayId, MIL_DOUBLE XFactor, MIL_DOUBLE YFactor)
|
||||
{
|
||||
MilWebMdispZoom(DisplayId, XFactor, YFactor);
|
||||
}
|
||||
|
||||
inline void MdispPan(MIL_ID DisplayId, MIL_DOUBLE XOffset, MIL_DOUBLE YOffset)
|
||||
{
|
||||
MilWebMdispPan(DisplayId, XOffset, YOffset);
|
||||
}
|
||||
|
||||
inline MIL_INT MbufInquire(MIL_ID BufId, MIL_INT64 InquireType, void* ResultPtr)
|
||||
{
|
||||
return MilWebMbufInquire(BufId, InquireType, ResultPtr);
|
||||
}
|
||||
|
||||
inline MIL_INT MbufGetHookInfo(MIL_ID EventId, MIL_INT64 InfoType, void* UserPtr)
|
||||
{
|
||||
return MilWebMbufGetHookInfo(EventId, InfoType, UserPtr);
|
||||
}
|
||||
|
||||
inline void MbufGet(MIL_ID SrcBufId, void* BufferPtr)
|
||||
{
|
||||
MilWebMbufGet(SrcBufId, BufferPtr);
|
||||
}
|
||||
|
||||
inline void MbufControl(MIL_ID BufId, MIL_INT64 ControlType, MIL_DOUBLE ControlFlag)
|
||||
{
|
||||
MilWebMbufControl(BufId, ControlType, ControlFlag);
|
||||
}
|
||||
|
||||
inline MIL_INT MobjInquire(MIL_ID ObjId, MIL_INT64 InquireType, void* ResultPtr)
|
||||
{
|
||||
return MilWebMobjInquire(ObjId, InquireType, ResultPtr);
|
||||
}
|
||||
|
||||
inline void MobjControl(MIL_ID ObjectId, MIL_INT64 ControlType, MIL_DOUBLE ControlFlag)
|
||||
{
|
||||
MilWebMobjControl(ObjectId, ControlType, ControlFlag);
|
||||
}
|
||||
|
||||
inline void MobjHookFunction(MIL_ID ObjectId, MIL_INT HookType, MIL_HOOK_FUNCTION_PTR HookHandler, void *UserDataPtr)
|
||||
{
|
||||
MilWebMobjHookFunction(ObjectId, HookType, HookHandler, UserDataPtr);
|
||||
}
|
||||
|
||||
inline MIL_INT MobjGetHookInfo(MIL_ID EventId, MIL_INT64 InfoType, void* UserVarPtr)
|
||||
{
|
||||
return MilWebMobjGetHookInfo(EventId, InfoType, UserVarPtr);
|
||||
}
|
||||
|
||||
|
||||
inline MIL_INT64 MobjMessageRead(MIL_ID MessageId, void* MessagePtr, MIL_INT64 MessageInSize, MIL_INT64 *MessageOutSizePtr, MIL_INT64 *MessageTagPtr, MIL_INT64 *StatusPtr, MIL_INT64 OperationFlag)
|
||||
{
|
||||
return MilWebMobjMessageRead(MessageId, MessagePtr, MessageInSize, MessageOutSizePtr, MessageTagPtr, StatusPtr, OperationFlag);
|
||||
}
|
||||
|
||||
inline void MobjMessageWrite(MIL_ID MessageId, const void* MessagePtr, MIL_INT64 MessageSize, MIL_INT64 MessageTag, MIL_INT64 OperationFlag)
|
||||
{
|
||||
MilWebMobjMessageWrite(MessageId, MessagePtr, MessageSize, MessageTag, OperationFlag);
|
||||
}
|
||||
}
|
||||
#endif // __cplusplus
|
||||
#endif //__MIL_WEB_CLIENT_H
|
||||
BIN
LIB/Mil3d.lib
Normal file
BIN
LIB/Mil3d.lib
Normal file
Binary file not shown.
BIN
LIB/Mil3dmap.lib
Normal file
BIN
LIB/Mil3dmap.lib
Normal file
Binary file not shown.
BIN
LIB/MilStr.lib
Normal file
BIN
LIB/MilStr.lib
Normal file
Binary file not shown.
BIN
LIB/Milbead.lib
Normal file
BIN
LIB/Milbead.lib
Normal file
Binary file not shown.
BIN
LIB/Milim.lib
Normal file
BIN
LIB/Milim.lib
Normal file
Binary file not shown.
BIN
LIB/Milmetrol.lib
Normal file
BIN
LIB/Milmetrol.lib
Normal file
Binary file not shown.
BIN
LIB/Milreg.lib
Normal file
BIN
LIB/Milreg.lib
Normal file
Binary file not shown.
BIN
LIB/mil.lib
Normal file
BIN
LIB/mil.lib
Normal file
Binary file not shown.
BIN
LIB/mil3dblob.lib
Normal file
BIN
LIB/mil3dblob.lib
Normal file
Binary file not shown.
BIN
LIB/mil3dim.lib
Normal file
BIN
LIB/mil3dim.lib
Normal file
Binary file not shown.
BIN
LIB/mil3dmet.lib
Normal file
BIN
LIB/mil3dmet.lib
Normal file
Binary file not shown.
BIN
LIB/mil3dmod.lib
Normal file
BIN
LIB/mil3dmod.lib
Normal file
Binary file not shown.
BIN
LIB/mil3dreg.lib
Normal file
BIN
LIB/mil3dreg.lib
Normal file
Binary file not shown.
BIN
LIB/milagm.lib
Normal file
BIN
LIB/milagm.lib
Normal file
Binary file not shown.
BIN
LIB/milblob.lib
Normal file
BIN
LIB/milblob.lib
Normal file
Binary file not shown.
BIN
LIB/milcal.lib
Normal file
BIN
LIB/milcal.lib
Normal file
Binary file not shown.
BIN
LIB/milclass.lib
Normal file
BIN
LIB/milclass.lib
Normal file
Binary file not shown.
BIN
LIB/milcode.lib
Normal file
BIN
LIB/milcode.lib
Normal file
Binary file not shown.
BIN
LIB/milcolor.lib
Normal file
BIN
LIB/milcolor.lib
Normal file
Binary file not shown.
BIN
LIB/milcom.lib
Normal file
BIN
LIB/milcom.lib
Normal file
Binary file not shown.
BIN
LIB/mildmr.lib
Normal file
BIN
LIB/mildmr.lib
Normal file
Binary file not shown.
BIN
LIB/miledge.lib
Normal file
BIN
LIB/miledge.lib
Normal file
Binary file not shown.
BIN
LIB/milfpga.lib
Normal file
BIN
LIB/milfpga.lib
Normal file
Binary file not shown.
BIN
LIB/milmeas.lib
Normal file
BIN
LIB/milmeas.lib
Normal file
Binary file not shown.
BIN
LIB/milmod.lib
Normal file
BIN
LIB/milmod.lib
Normal file
Binary file not shown.
BIN
LIB/milocr.lib
Normal file
BIN
LIB/milocr.lib
Normal file
Binary file not shown.
BIN
LIB/milpat.lib
Normal file
BIN
LIB/milpat.lib
Normal file
Binary file not shown.
BIN
LIB/milwebclient.lib
Normal file
BIN
LIB/milwebclient.lib
Normal file
Binary file not shown.
10
Makefile
10
Makefile
@ -241,6 +241,7 @@ Makefile: cotton_double2.pro ..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\win32-msvc
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\resolve_config.prf \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\exclusive_builds_post.prf \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\default_post.prf \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\win32\console.prf \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\qtquickcompiler.prf \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\precompile_header.prf \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\warn_on.prf \
|
||||
@ -253,7 +254,6 @@ Makefile: cotton_double2.pro ..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\win32-msvc
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\uic.prf \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\qmake_use.prf \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\file_copies.prf \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\win32\windows.prf \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\testcase_targets.prf \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\exceptions.prf \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\yacc.prf \
|
||||
@ -263,13 +263,11 @@ Makefile: cotton_double2.pro ..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\win32-msvc
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\lib\Qt6Gui.prl \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\lib\Qt6Network.prl \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\lib\Qt6Core.prl \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\lib\Qt6EntryPoint.prl \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\build_pass.prf \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\lib\Qt6Widgetsd.prl \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\lib\Qt6Guid.prl \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\lib\Qt6Networkd.prl \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\lib\Qt6Cored.prl \
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\lib\Qt6EntryPointd.prl
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\lib\Qt6Cored.prl
|
||||
$(QMAKE) -o Makefile cotton_double2.pro -spec win32-msvc "CONFIG+=qtquickcompiler"
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\spec_pre.prf:
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\common\windows-desktop.conf:
|
||||
@ -428,6 +426,7 @@ Makefile: cotton_double2.pro ..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\win32-msvc
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\resolve_config.prf:
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\exclusive_builds_post.prf:
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\default_post.prf:
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\win32\console.prf:
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\qtquickcompiler.prf:
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\precompile_header.prf:
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\warn_on.prf:
|
||||
@ -440,7 +439,6 @@ Makefile: cotton_double2.pro ..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\win32-msvc
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\uic.prf:
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\qmake_use.prf:
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\file_copies.prf:
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\win32\windows.prf:
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\testcase_targets.prf:
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\exceptions.prf:
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\yacc.prf:
|
||||
@ -450,13 +448,11 @@ cotton_double2.pro:
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\lib\Qt6Gui.prl:
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\lib\Qt6Network.prl:
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\lib\Qt6Core.prl:
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\lib\Qt6EntryPoint.prl:
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\mkspecs\features\build_pass.prf:
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\lib\Qt6Widgetsd.prl:
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\lib\Qt6Guid.prl:
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\lib\Qt6Networkd.prl:
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\lib\Qt6Cored.prl:
|
||||
..\..\..\..\Qt\6.7.3\msvc2022_64\lib\Qt6EntryPointd.prl:
|
||||
qmake: FORCE
|
||||
@$(QMAKE) -o Makefile cotton_double2.pro -spec win32-msvc "CONFIG+=qtquickcompiler"
|
||||
|
||||
|
||||
6739
Makefile.Debug
6739
Makefile.Debug
File diff suppressed because one or more lines are too long
6739
Makefile.Release
6739
Makefile.Release
File diff suppressed because one or more lines are too long
1053
camera.cpp
1053
camera.cpp
File diff suppressed because it is too large
Load Diff
37
camera.h
37
camera.h
@ -9,7 +9,9 @@
|
||||
#include <QString>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <future>
|
||||
|
||||
#include <QTimer>
|
||||
#include <chrono>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
@ -22,12 +24,18 @@
|
||||
#include <QTcpServer>
|
||||
#include "globals.h"
|
||||
#include "img_utils.h"
|
||||
#include "color_algorithms.h"
|
||||
|
||||
extern MIL_ID MilApplication;
|
||||
extern MIL_ID MilSystem;
|
||||
|
||||
std::vector<std::vector<uint8_t>> generateMaskFromImage(const MIL_ID& inputImage, int widthBlocks, int heightBlocks, int thresholds);
|
||||
std::vector<std::vector<uint8_t>> generateMaskFromImage2(const cv::Mat& image, int widthBlocks, int heightBlocks, int thresholds);
|
||||
std::vector<std::vector<uint8_t>> generateMaskFromMatImage(const cv::Mat& image,
|
||||
int widthBlocks,
|
||||
int heightBlocks,
|
||||
int thresholds = 10,
|
||||
int skipLeftCols = 0,
|
||||
int skipRightCols = 0);
|
||||
|
||||
|
||||
void PadColumns(std::vector<std::vector<uint8_t>>& data, int pad_left, int pad_right, uint8_t fill_value );
|
||||
@ -65,12 +73,18 @@ bool iniColor();
|
||||
|
||||
bool iniOnnx();
|
||||
|
||||
void Start_camera();
|
||||
void start_camera();
|
||||
|
||||
bool setLowMacParam();
|
||||
|
||||
bool DestoryCamera();
|
||||
|
||||
bool DestoryLowMac();
|
||||
|
||||
bool start_grab();
|
||||
|
||||
bool stop_grab();
|
||||
|
||||
extern int SaveImg_Flag;
|
||||
|
||||
MIL_INT MFTYPE ProcessingFunction0(MIL_INT HookType, MIL_ID HookId, void* HookDataPtr);
|
||||
@ -78,24 +92,23 @@ MIL_INT MFTYPE ProcessingFunction1(MIL_INT HookType, MIL_ID HookId, void* HookDa
|
||||
|
||||
|
||||
//图像处理
|
||||
std::vector<int> psLabToOpenCVLab(const std::vector<int>& lab_ps);
|
||||
|
||||
std::vector<int> opencvLabToPsLab(const std::vector<int>& lab_cv);
|
||||
|
||||
std::unordered_map<std::string, int> loadConfig(const std::string& filename);
|
||||
|
||||
void lab_process(const MIL_ID& inputImage, MIL_ID& outputImageLab, const std::map<std::string, int>& params);
|
||||
|
||||
void hsv_process(const MIL_ID& inputImage, MIL_ID& outputImageHSV, const std::map<std::string, int>& params);
|
||||
|
||||
void lab_process_raw(const MIL_ID& inputImage, MIL_ID& outputImageLab, const std::map<std::string, int>& params,const std::vector<std::string>& color_vector);
|
||||
|
||||
void high_sat_detect(const MIL_ID& inputImage, MIL_ID& outputImage, const std::map<std::string, int>& params);
|
||||
|
||||
extern std::map<std::string, int> params;
|
||||
|
||||
void read_params_from_file(const std::string& filename, std::map<std::string, int>& params) ;
|
||||
|
||||
void read_color(const std::string& filename, std::vector<std::string>& colors);
|
||||
|
||||
pair<vector<vector<uint8_t>>, vector<vector<uint8_t>>> applyRowRangeDelay(
|
||||
const vector<vector<uint8_t>>& mask,
|
||||
const vector<vector<uint8_t>>& tail,
|
||||
int rowRange
|
||||
);
|
||||
|
||||
pair<vector<vector<uint8_t>>, vector<vector<uint8_t>>> generateMaskWithTail(
|
||||
const MIL_ID& inputImg,
|
||||
const vector<vector<uint8_t>>& tail,
|
||||
@ -119,4 +132,6 @@ extern bool volatile is_running;
|
||||
|
||||
bool get_valve_data(std::vector<std::vector<uint8_t>> mask );
|
||||
|
||||
void max_valves_together_limit(std::vector<std::vector<uint8_t>> &mask_expaned, const int row_threshold);
|
||||
|
||||
#endif // CAMERA_H
|
||||
|
||||
2359
config/1.dcf
Normal file
2359
config/1.dcf
Normal file
File diff suppressed because it is too large
Load Diff
2357
config/2.dcf
Normal file
2357
config/2.dcf
Normal file
File diff suppressed because it is too large
Load Diff
60
config/color_range_config.txt
Normal file
60
config/color_range_config.txt
Normal file
@ -0,0 +1,60 @@
|
||||
# Green color parameters
|
||||
green_L_min = 16
|
||||
green_L_max = 56
|
||||
green_a_min = -33
|
||||
green_a_max = -11
|
||||
green_b_min = -7
|
||||
green_b_max = 24
|
||||
|
||||
# Blue color parameters
|
||||
blue_L_min = 20
|
||||
blue_L_max = 43
|
||||
blue_a_min = -13
|
||||
blue_a_max = 22
|
||||
blue_b_min = -48
|
||||
blue_b_max = -8
|
||||
|
||||
# Orange color parameters
|
||||
orange_L_min = 63
|
||||
orange_L_max = 78
|
||||
orange_a_min = 7
|
||||
orange_a_max = 14
|
||||
orange_b_min = 23
|
||||
orange_b_max = 47
|
||||
|
||||
# Black color parameters
|
||||
black_L_min = 0
|
||||
black_L_max = 8
|
||||
black_a_min = -4
|
||||
black_a_max = 2
|
||||
black_b_min = -3
|
||||
black_b_max = 4
|
||||
|
||||
# Red color parameters
|
||||
red_L_min = 23
|
||||
red_L_max = 48
|
||||
red_a_min = 12
|
||||
red_a_max = 55
|
||||
red_b_min = -80
|
||||
red_b_max = 37
|
||||
|
||||
# Purple color parameters
|
||||
purple_L_min = 38
|
||||
purple_L_max = 54
|
||||
purple_a_min = 10
|
||||
purple_a_max = 20
|
||||
purple_b_min = -45
|
||||
purple_b_max = 1
|
||||
|
||||
# yellow color parameters
|
||||
yellow_L_min = 45
|
||||
yellow_L_max = 56
|
||||
yellow_a_min = -4
|
||||
yellow_a_max = 7
|
||||
yellow_b_min = 20
|
||||
yellow_b_max = 21
|
||||
|
||||
# Other parameters
|
||||
lab_denoising = 1
|
||||
saturation_threshold = 165
|
||||
saturation_denoising = 1
|
||||
7
config/colors.txt
Normal file
7
config/colors.txt
Normal file
@ -0,0 +1,7 @@
|
||||
green
|
||||
blue
|
||||
orange
|
||||
black
|
||||
red
|
||||
purple
|
||||
yellow
|
||||
BIN
config/dimo_369_640.onnx
Normal file
BIN
config/dimo_369_640.onnx
Normal file
Binary file not shown.
@ -3,26 +3,57 @@ QT += core gui network
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
CONFIG += c++17
|
||||
CONFIG += console
|
||||
|
||||
DEFINES += WIN32_LEAN_AND_MEAN
|
||||
DEFINES += _WINSOCKAPI_
|
||||
|
||||
# You can make your code fail to compile if it uses deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
SOURCES += \
|
||||
countdown_dialog.cpp \
|
||||
libmodbus/modbus-data.c \
|
||||
libmodbus/modbus-rtu.c \
|
||||
libmodbus/modbus-tcp.c \
|
||||
libmodbus/modbus.c \
|
||||
camera.cpp \
|
||||
color_algorithms.cpp \
|
||||
detection_worker.cpp \
|
||||
globals.cpp \
|
||||
img_utils.cpp \
|
||||
license_dialog.cpp \
|
||||
license_dialog.cpp \
|
||||
licesing.cpp \
|
||||
lower_machine.cpp \
|
||||
main.cpp \
|
||||
onnxrunner.cpp \
|
||||
storageworker.cpp \
|
||||
plc_connector.cpp \
|
||||
storage_worker.cpp \
|
||||
widget.cpp
|
||||
|
||||
HEADERS += \
|
||||
countdown_dialog.h \
|
||||
libmodbus/modbus-version.h \
|
||||
libmodbus/modbus.h \
|
||||
libmodbus/modbus-private.h \
|
||||
libmodbus/modbus-tcp.h \
|
||||
libmodbus/modbus-tcp-private.h \
|
||||
libmodbus/modbus-rtu.h \
|
||||
libmodbus/modbus-rtu-private.h \
|
||||
camera.h \
|
||||
color_algorithms.h \
|
||||
detection_worker.h \
|
||||
globals.h \
|
||||
img_utils.h \
|
||||
license_dialog.h \
|
||||
license_dialog.h \
|
||||
licesing.h \
|
||||
lower_machine.h \
|
||||
onnxrunner.h \
|
||||
storageworker.h \
|
||||
plc_connector.h \
|
||||
storage_worker.h \
|
||||
widget.h
|
||||
|
||||
FORMS += \
|
||||
@ -33,14 +64,24 @@ qnx: target.path = /tmp/$${TARGET}/bin
|
||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||
!isEmpty(target.path): INSTALLS += target
|
||||
|
||||
INCLUDEPATH += C:/Users/Administrator/Desktop/cotton_double/Include
|
||||
DEPENDPATH += C:/Users/Administrator/Desktop/cotton_double/Include
|
||||
LIBS += -LC:/Users/Administrator/Desktop/cotton_double/LIB -lmil
|
||||
LIBS += -LC:/Users/Administrator/Desktop/cotton_double/LIB -lMilim
|
||||
|
||||
INCLUDEPATH += $${PWD}/Include
|
||||
DEPENDPATH += $${PWD}/Include
|
||||
LIBS += -L$${PWD}/LIB -lmil
|
||||
LIBS += -L$${PWD}/LIB -lMilim
|
||||
LIBS += -L$${PWD}/LIB -lmilblob
|
||||
# LIBS += -Ldll -lws2_32
|
||||
|
||||
LIBS += \
|
||||
D:/opencv/opencv410-vs22/x64/vc17/lib/*.lib
|
||||
# $${PWD}/opencv410-vs22/x64/vc17/lib/*.lib
|
||||
$${PWD}/opencv/build/x64/vc16/lib/*.lib
|
||||
|
||||
INCLUDEPATH += \
|
||||
D:/opencv/opencv410-vs22/include
|
||||
# $${PWD}/opencv410-vs22/include
|
||||
$${PWD}/opencv/build/include
|
||||
|
||||
# 指定库目录
|
||||
LIBS += "$$PWD/libsodium/x64/Release/v143/static/libsodium.lib"
|
||||
DEFINES += SODIUM_STATIC
|
||||
INCLUDEPATH += $${PWD}/libsodium/include
|
||||
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 15.0.0, 2024-12-23T16:03:42. -->
|
||||
<!-- Written by QtCreator 15.0.0, 2025-01-16T12:30:28. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
@ -140,7 +140,7 @@
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:\Users\Administrator\Documents\cotton_double</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">C:/Users/Administrator/Documents/cotton_double/build/Desktop_Qt_6_7_3_MSVC2022_64bit-Release</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">C:/Users/Administrator/Documents/cotton_double</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
|
||||
42
detection_worker.cpp
Normal file
42
detection_worker.cpp
Normal file
@ -0,0 +1,42 @@
|
||||
// detection_worker.cpp
|
||||
#include "detection_worker.h"
|
||||
#include "globals.h"
|
||||
#include <QDebug>
|
||||
#include "onnxrunner.h"
|
||||
|
||||
// 声明外部ONNXRunner实例数组
|
||||
extern ONNXRunner* g_runner_array[2];
|
||||
|
||||
// 定义检测工作者函数
|
||||
void detectionWorker(int camera_id)
|
||||
{
|
||||
// 验证相机ID的有效性
|
||||
if(camera_id < 0 || camera_id >= 2)
|
||||
{
|
||||
qCritical() << "Invalid camera_id:" << camera_id;
|
||||
return;
|
||||
}
|
||||
|
||||
// 运行检测工作者线程,直到停止信号被触发
|
||||
while(g_recognitionRunning[camera_id]->load())
|
||||
{
|
||||
ImageData data;
|
||||
// 从图像队列中获取图像数据
|
||||
if(g_img_Queue[camera_id]->dequeue(data))
|
||||
{
|
||||
// 执行ONNX推理
|
||||
std::vector<Detection> detections = g_runner_array[camera_id]->predict(data.image);
|
||||
cv::Mat processed_img = g_runner_array[camera_id]->postProcess(detections, data.image);
|
||||
|
||||
// 构建检测结果
|
||||
ImageData result;
|
||||
result.camera_id = data.camera_id;
|
||||
result.image = processed_img;
|
||||
|
||||
// 将检测结果推入结果队列
|
||||
g_result_Queue[camera_id]->enqueue(result);
|
||||
}
|
||||
}
|
||||
|
||||
qDebug() << "DetectionWorker: Stopped for camera" << camera_id;
|
||||
}
|
||||
8
detection_worker.h
Normal file
8
detection_worker.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef DETECTION_WORKER_H
|
||||
#define DETECTION_WORKER_H
|
||||
#include "onnxrunner.h"
|
||||
|
||||
// 检测工作者函数声明
|
||||
void detectionWorker(int camera_id);
|
||||
|
||||
#endif // DETECTION_WORKER_H
|
||||
2359
dist/config/1.dcf
vendored
Normal file
2359
dist/config/1.dcf
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2357
dist/config/2.dcf
vendored
Normal file
2357
dist/config/2.dcf
vendored
Normal file
File diff suppressed because it is too large
Load Diff
66
dist/config/color_range_config.txt
vendored
Normal file
66
dist/config/color_range_config.txt
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
green_L_min = 16
|
||||
green_L_max = 56
|
||||
green_a_min = -33
|
||||
green_a_max = -11
|
||||
green_b_min = -7
|
||||
green_b_max = 24
|
||||
|
||||
blue_L_min = 20
|
||||
blue_L_max = 43
|
||||
blue_a_min = -13
|
||||
blue_a_max = 22
|
||||
blue_b_min = -48
|
||||
blue_b_max = -8
|
||||
|
||||
orange_L_min = 63
|
||||
orange_L_max = 78
|
||||
orange_a_min = 7
|
||||
orange_a_max = 14
|
||||
orange_b_min = 23
|
||||
orange_b_max = 47
|
||||
|
||||
black_L_min = 0
|
||||
black_L_max = 8
|
||||
black_a_min = -4
|
||||
black_a_max = 2
|
||||
black_b_min = -3
|
||||
black_b_max = 4
|
||||
|
||||
red_L_min = 23
|
||||
red_L_max = 48
|
||||
red_a_min = 12
|
||||
red_a_max = 55
|
||||
red_b_min = -80
|
||||
red_b_max = 37
|
||||
|
||||
purple_L_min = 38
|
||||
purple_L_max = 54
|
||||
purple_a_min = 10
|
||||
purple_a_max = 20
|
||||
purple_b_min = -45
|
||||
purple_b_max = 1
|
||||
|
||||
yellow_L_min = 45
|
||||
yellow_L_max = 56
|
||||
yellow_a_min = -4
|
||||
yellow_a_max = 7
|
||||
yellow_b_min = 20
|
||||
yellow_b_max = 21
|
||||
|
||||
expansionRaidus = 1
|
||||
file_delay = 1180
|
||||
lab_denoising = 1
|
||||
lowmac_dp = 350
|
||||
lowmac_sg = 70
|
||||
lowmac_sm = 1200
|
||||
lowmac_td = 7
|
||||
lowmac_ts = 10
|
||||
machine_num = 0
|
||||
max_valves_together = 18
|
||||
saturation_denoising = 1
|
||||
saturation_threshold = 165
|
||||
screen_left_0 = 0
|
||||
screen_left_1 = 0
|
||||
screen_right_0 = 10
|
||||
screen_right_1 = 0
|
||||
sizeThreshold = 4
|
||||
111
dist/license.txt
vendored
Normal file
111
dist/license.txt
vendored
Normal file
@ -0,0 +1,111 @@
|
||||
# Software License Agreement
|
||||
|
||||
**Important Notice**: Please read this Software License Agreement (hereinafter referred to as “this Agreement”) carefully before using this software. If you do not agree with any term of this Agreement, you are not authorized to install, copy, or use this software. By installing or using this software, you acknowledge that you have read, understood, and agree to be bound by all terms and conditions of this Agreement.
|
||||
|
||||
---
|
||||
|
||||
## 1. Definitions
|
||||
|
||||
1. **“Software”** refers to the application named “cotton_double,” developed and provided by **Nanjing Forestry University** (hereinafter referred to as “Licensor”). This includes but is not limited to the related executable files, data, documentation, updates, and upgrades.
|
||||
2. **“User”** refers to any individual or entity that installs or uses this Software.
|
||||
3. **“Licensor”** refers to **Nanjing Forestry University**, which holds the copyright or lawful authorization rights to this Software.
|
||||
|
||||
---
|
||||
|
||||
## 2. Scope of License
|
||||
|
||||
1. **License Grant**
|
||||
The Licensor hereby grants the User a **non-exclusive, non-transferable, and revocable** license to use this Software in accordance with the terms of this Agreement. This license is limited to **personal or internal business use** only and does not include the right to resell, lease, sublicense, or distribute for commercial purposes.
|
||||
|
||||
2. **License Restrictions**
|
||||
- The User shall not reverse engineer, decompile, disassemble, or otherwise attempt to derive the source code of the Software.
|
||||
- The User shall not modify, distribute, sell, rent, sublicense, or otherwise dispose of the Software or any part thereof.
|
||||
- The User shall not remove, alter, or obscure any copyright, trademark, or other proprietary notices contained in the Software.
|
||||
- The User shall not use the Software for any illegal or infringing purpose, nor shall they violate the legitimate rights of others.
|
||||
|
||||
3. **Reservation of Rights**
|
||||
Except for the rights explicitly granted in this Agreement, the Licensor reserves all other rights to the Software.
|
||||
|
||||
---
|
||||
|
||||
## 3. Intellectual Property
|
||||
|
||||
1. **Copyright**
|
||||
The copyright and other intellectual property rights in the Software belong to the Licensor and are protected by applicable laws and international treaties.
|
||||
2. **Third-Party Components**
|
||||
Any third-party software or libraries included or referenced within the Software are used under their respective licenses. The User’s use of such third-party components shall comply with the relevant third-party license terms.
|
||||
|
||||
---
|
||||
|
||||
## 4. Installation and Use
|
||||
|
||||
1. **Installation**
|
||||
The User may install the Software on compatible operating systems or environments solely for the purposes permitted by this Agreement.
|
||||
2. **Updates and Upgrades**
|
||||
The Licensor may periodically provide updates or upgrades for the Software, and the User may choose whether to install such updates.
|
||||
|
||||
---
|
||||
|
||||
## 5. Privacy and Data
|
||||
|
||||
1. **No Collection of Personal Information**
|
||||
This Software **does not collect** personal or private data from the User. If the User voluntarily submits any information to the Licensor while using this Software, such information will only be used for user inquiries, technical support, or troubleshooting, and will not be used for commercialization or shared with third parties.
|
||||
|
||||
2. **User Responsibility**
|
||||
Since the Software itself does not collect or transmit personal information, if the User independently inputs or processes personal data within the Software, the User bears the responsibility for relevant compliance and data security.
|
||||
|
||||
---
|
||||
|
||||
## 6. Warranty and Disclaimer
|
||||
|
||||
1. **Software Provided “As Is”**
|
||||
The Software and any related services are provided on an “as is” basis. The Licensor makes no express or implied warranties regarding the performance, quality, compatibility, or suitability of the Software.
|
||||
2. **Assumption of Risk**
|
||||
The User understands and agrees that any risks or losses arising from the use of or inability to use the Software are borne by the User. The Licensor shall not be liable for any direct or indirect losses arising therefrom. And the Licensor shall agree that NC is NC.
|
||||
|
||||
---
|
||||
|
||||
## 7. Limitation of Liability
|
||||
|
||||
To the maximum extent permitted by applicable law, the Licensor shall not be liable for any profit loss, data loss, business interruption, or any other indirect, incidental, special, punitive, or consequential damages arising from the use of or inability to use the Software, even if the Licensor has been advised of the possibility of such damages.
|
||||
|
||||
---
|
||||
|
||||
## 8. Termination
|
||||
|
||||
1. **Termination Conditions**
|
||||
If the User violates any provision of this Agreement, the Licensor has the right to terminate this Agreement and the User’s license to the Software immediately without prior notice.
|
||||
2. **Consequences of Termination**
|
||||
Upon termination of this Agreement, the User shall immediately cease using the Software and delete or destroy all copies of the Software.
|
||||
|
||||
---
|
||||
|
||||
## 9. Governing Law and Dispute Resolution
|
||||
|
||||
1. **Governing Law**
|
||||
The formation, interpretation, and performance of this Agreement and the resolution of any disputes shall be governed by the laws of the People’s Republic of China.
|
||||
2. **Dispute Resolution**
|
||||
In the event of any dispute arising out of or in connection with this Agreement, the parties shall first attempt to resolve it amicably through negotiation. If negotiation fails, either party may submit the dispute to the competent courts of China.
|
||||
|
||||
---
|
||||
|
||||
## 10. Miscellaneous
|
||||
|
||||
1. **Entire Agreement**
|
||||
This Agreement constitutes the entire agreement between the User and the Licensor with respect to the Software and supersedes any prior communications or understandings related to its subject matter.
|
||||
2. **Severability**
|
||||
If any provision of this Agreement is held to be invalid or unenforceable, the remaining provisions shall remain in full force and effect.
|
||||
3. **Modifications**
|
||||
The Licensor reserves the right to revise this Agreement as necessary. If there are substantial changes, the Licensor will notify the User in an appropriate manner. The User’s continued use of the Software after such notification constitutes acceptance of the modified terms.
|
||||
|
||||
---
|
||||
|
||||
## Contact Information
|
||||
|
||||
If you have any questions regarding this Agreement or the Software, please contact:
|
||||
- **Institution**: Nanjing Forestry University
|
||||
- **Contact Person**: Ni Chao
|
||||
- **Email**: chaoni@njfu.edu.cn
|
||||
- **Address**: 159 Longpan Road, Nanjing Forestry University, Nanjing, Jiangsu, China
|
||||
|
||||
**By reading this Agreement in full and installing or using this Software, you indicate your acceptance of all the terms and conditions herein.**
|
||||
BIN
dist/nc.ico
vendored
Normal file
BIN
dist/nc.ico
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 200 KiB |
13
dist/nvcc.profile
vendored
Normal file
13
dist/nvcc.profile
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
TOP = $(_HERE_)/..
|
||||
|
||||
NVVMIR_LIBRARY_DIR = $(TOP)/$(_NVVM_BRANCH_)/libdevice
|
||||
|
||||
PATH += $(TOP)/$(_NVVM_BRANCH_)/bin;$(_HERE_);$(TOP)/lib;
|
||||
|
||||
INCLUDES += "-I$(TOP)/include" $(_SPACE_)
|
||||
|
||||
LIBRARIES =+ $(_SPACE_) "/LIBPATH:$(TOP)/lib/$(_WIN_PLATFORM_)"
|
||||
|
||||
CUDAFE_FLAGS +=
|
||||
PTXAS_FLAGS +=
|
||||
164
globals.cpp
164
globals.cpp
@ -1,22 +1,58 @@
|
||||
// globals.cpp
|
||||
#include "globals.h"
|
||||
|
||||
// 图片显示
|
||||
// camera.cpp 顶部或 globals.cpp 中
|
||||
long long g_valveActionCount = 0;
|
||||
std::atomic<bool> g_camera_error(false);
|
||||
|
||||
std::atomic<bool> g_lower_machine_connected(false);
|
||||
|
||||
// 初始化图片显示互斥锁和MIL_ID
|
||||
QMutex gDispPicMutex0;
|
||||
MIL_ID gDispCurrentPicId0 = 0;
|
||||
|
||||
QMutex gDispPicMutex1;
|
||||
MIL_ID gDispCurrentPicId1 = 0;
|
||||
|
||||
// 检测结果
|
||||
// 初始化掩膜互斥锁和MIL_ID
|
||||
QMutex gMaskMutex0;
|
||||
MIL_ID gMask0 = 0;
|
||||
|
||||
QMutex gMaskMutex1;
|
||||
MIL_ID gMask1 = 0;
|
||||
//艳丽检测参数
|
||||
std::map<std::string, int> params;
|
||||
std::vector<std::string> colors;
|
||||
|
||||
// 双相机结果同步
|
||||
// 初始化 CameraData 实例
|
||||
DetectionResult g_detection_result[2];
|
||||
|
||||
// 初始化检测准备信号量
|
||||
QSemaphore detection_ready(0);
|
||||
|
||||
// 初始化全局存储队列
|
||||
ThreadSafeQueue<ImageData> g_storageQueue;
|
||||
|
||||
// 初始化全局图像队列和结果队列
|
||||
ThreadSafeQueue<ImageData>* g_img_Queue[2] = { nullptr, nullptr };
|
||||
ThreadSafeQueue<ImageData>* g_result_Queue[2] = { nullptr, nullptr };
|
||||
|
||||
// 初始化全局识别线程指针
|
||||
std::thread* g_recognitionThread[2] = { nullptr, nullptr };
|
||||
|
||||
// 初始化线程控制变量指针
|
||||
std::atomic<bool>* g_recognitionRunning[2] = { nullptr, nullptr };
|
||||
|
||||
bool g_dl_enable[2] = { true, true };
|
||||
bool g_traditional_enable[2] = { true, true };
|
||||
|
||||
int sizeThreshold = 4; // 转化为喷阀的每块要求像素个数
|
||||
int expansionRaidus = 1; // 获取mask后进行左右位置的扩展
|
||||
|
||||
// 初始化全局ONNXRunner实例数组
|
||||
ONNXRunner* g_runner_array[2] = { nullptr, nullptr };
|
||||
|
||||
// 实现获取保存目录和配置目录的函数
|
||||
QString getSaveDirectory() {
|
||||
QDir appDir(QCoreApplication::applicationDirPath());
|
||||
QString saveDir = appDir.filePath("images");
|
||||
@ -28,16 +64,124 @@ QString getSaveDirectory() {
|
||||
return saveDir;
|
||||
}
|
||||
|
||||
|
||||
QString getConfigDirectory() {
|
||||
QDir appDir(QCoreApplication::applicationDirPath());
|
||||
QString saveDir = appDir.filePath("config");
|
||||
// 获取应用程序的目录路径
|
||||
QString appPath = QCoreApplication::applicationDirPath();
|
||||
QDir appDir(appPath);
|
||||
|
||||
if (!appDir.exists(saveDir)) {
|
||||
appDir.mkdir("config"); // 创建目录,如果不存在
|
||||
// 获取绝对路径的 config 目录
|
||||
QString configDir = appDir.absoluteFilePath("config");
|
||||
|
||||
// 检查 config 目录是否存在
|
||||
if (!appDir.exists("config")) {
|
||||
// 尝试创建 config 目录
|
||||
if (!appDir.mkdir("config")) {
|
||||
qCritical() << "无法创建配置目录:" << configDir;
|
||||
// 根据需求,可以选择返回空字符串、抛出异常或采取其他错误处理措施
|
||||
return QString();
|
||||
}
|
||||
}
|
||||
return configDir;
|
||||
}
|
||||
|
||||
return saveDir;
|
||||
// 初始化全局图像队列和结果队列
|
||||
void initializeGlobalQueues() {
|
||||
for(int i = 0; i < 2; ++i)
|
||||
{
|
||||
g_img_Queue[i] = new ThreadSafeQueue<ImageData>();
|
||||
g_result_Queue[i] = new ThreadSafeQueue<ImageData>();
|
||||
}
|
||||
}
|
||||
|
||||
ThreadSafeQueue<ImageData> g_storageQueue;
|
||||
// 初始化线程控制变量和识别线程
|
||||
void initializeGlobalThreads() {
|
||||
for(int i = 0; i < 2; ++i)
|
||||
{
|
||||
g_recognitionRunning[i] = new std::atomic<bool>(false);
|
||||
g_recognitionThread[i] = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化全局ONNXRunner实例数组
|
||||
void initializeGlobalONNXRunner() {
|
||||
for(int i = 0; i < 2; ++i)
|
||||
{
|
||||
g_runner_array[i] = new ONNXRunner();
|
||||
std::string modelPath = (getConfigDirectory() + "/dimo_369_640.onnx").toStdString();
|
||||
qDebug() << modelPath;
|
||||
g_runner_array[i]->load(modelPath);
|
||||
}
|
||||
}
|
||||
|
||||
// 清理全局图像队列和结果队列
|
||||
void cleanupGlobalQueues() {
|
||||
for(int i = 0; i < 2; ++i)
|
||||
{
|
||||
if(g_img_Queue[i])
|
||||
{
|
||||
g_img_Queue[i]->stop();
|
||||
delete g_img_Queue[i];
|
||||
g_img_Queue[i] = nullptr;
|
||||
}
|
||||
|
||||
if(g_result_Queue[i])
|
||||
{
|
||||
g_result_Queue[i]->stop();
|
||||
delete g_result_Queue[i];
|
||||
g_result_Queue[i] = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 清理线程控制变量和识别线程
|
||||
void cleanupGlobalThreads() {
|
||||
for(int i = 0; i < 2; ++i)
|
||||
{
|
||||
if(g_recognitionRunning[i])
|
||||
{
|
||||
delete g_recognitionRunning[i];
|
||||
g_recognitionRunning[i] = nullptr;
|
||||
}
|
||||
|
||||
if(g_recognitionThread[i])
|
||||
{
|
||||
if(g_recognitionThread[i]->joinable())
|
||||
{
|
||||
g_recognitionThread[i]->join();
|
||||
}
|
||||
delete g_recognitionThread[i];
|
||||
g_recognitionThread[i] = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 清理全局ONNXRunner实例数组
|
||||
void cleanupGlobalONNXRunner() {
|
||||
for(int i = 0; i < 2; ++i)
|
||||
{
|
||||
if(g_runner_array[i])
|
||||
{
|
||||
delete g_runner_array[i];
|
||||
g_runner_array[i] = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 在程序初始化时调用
|
||||
struct GlobalsInitializer {
|
||||
GlobalsInitializer() {
|
||||
initializeGlobalQueues();
|
||||
initializeGlobalThreads();
|
||||
initializeGlobalONNXRunner(); // 添加此行
|
||||
}
|
||||
|
||||
~GlobalsInitializer() {
|
||||
cleanupGlobalThreads();
|
||||
cleanupGlobalQueues();
|
||||
cleanupGlobalONNXRunner(); // 添加此行
|
||||
}
|
||||
} globalsInitializerInstance; // 全局实例,确保在程序结束时清理
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
81
globals.h
81
globals.h
@ -8,6 +8,18 @@
|
||||
#include <QSemaphore>
|
||||
#include <QDir>
|
||||
#include <QCoreApplication>
|
||||
#include <queue>
|
||||
#include <mutex>
|
||||
#include <condition_variable>
|
||||
#include <optional>
|
||||
#include <thread>
|
||||
#include <atomic>
|
||||
#include "onnxrunner.h"
|
||||
|
||||
// 计数喷阀次数
|
||||
extern long long g_valveActionCount;
|
||||
extern std::atomic<bool> g_camera_error;
|
||||
extern std::atomic<bool> g_lower_machine_connected;
|
||||
|
||||
// 图片显示0
|
||||
extern QMutex gDispPicMutex0;
|
||||
@ -17,14 +29,23 @@ extern MIL_ID gDispCurrentPicId0;
|
||||
extern QMutex gDispPicMutex1;
|
||||
extern MIL_ID gDispCurrentPicId1;
|
||||
|
||||
// 掩膜互斥锁和ID
|
||||
extern QMutex gMaskMutex0;
|
||||
extern MIL_ID gMask0;
|
||||
|
||||
extern QMutex gMaskMutex1;
|
||||
extern MIL_ID gMask1;
|
||||
|
||||
// 检测准备信号量
|
||||
extern QSemaphore detection_ready;
|
||||
|
||||
extern bool g_dl_enable[2];
|
||||
extern bool g_traditional_enable[2];
|
||||
|
||||
extern int sizeThreshold; // 转化为喷阀的每块要求像素个数
|
||||
extern int expansionRaidus;
|
||||
|
||||
// 获取保存目录和配置目录函数
|
||||
QString getSaveDirectory();
|
||||
QString getConfigDirectory();
|
||||
|
||||
@ -35,13 +56,28 @@ struct ImageData
|
||||
cv::Mat image;
|
||||
};
|
||||
|
||||
// 添加 DetectionResult 结构体
|
||||
struct DetectionResult {
|
||||
QMutex mutex; // 保护数据的互斥锁
|
||||
std::vector<std::vector<uint8_t>> dl_mask; // 深度学习掩膜
|
||||
std::vector<std::vector<uint8_t>> traditional_mask; // 传统算法掩膜
|
||||
};
|
||||
|
||||
extern DetectionResult g_detection_result[2];
|
||||
|
||||
// 线程安全队列模板类
|
||||
// 线程安全队列模板类,最大长度为1避免队列数据或者结果的积压
|
||||
template <typename T>
|
||||
class ThreadSafeQueue {
|
||||
public:
|
||||
// 添加元素到队列
|
||||
// 添加元素到队列,如果队列已满(长度为1),则移除旧元素
|
||||
void enqueue(const T& item)
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(mutex_);
|
||||
if (queue_.size() >= 1)
|
||||
{
|
||||
queue_.pop(); // 移除旧的元素
|
||||
}
|
||||
queue_.push(item);
|
||||
cond_var_.notify_one();
|
||||
}
|
||||
@ -61,6 +97,20 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
// 查看队列中的第一个元素而不移除
|
||||
bool front(T& item)
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(mutex_);
|
||||
while (queue_.empty() && !stop_)
|
||||
{
|
||||
cond_var_.wait(lock);
|
||||
}
|
||||
if (queue_.empty())
|
||||
return false;
|
||||
item = queue_.front(); // 直接复制,不移除
|
||||
return true;
|
||||
}
|
||||
|
||||
// 停止队列,唤醒所有等待的线程
|
||||
void stop()
|
||||
{
|
||||
@ -69,6 +119,13 @@ public:
|
||||
cond_var_.notify_all();
|
||||
}
|
||||
|
||||
// 检查队列是否为空
|
||||
bool empty()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
return queue_.empty();
|
||||
}
|
||||
|
||||
private:
|
||||
std::queue<T> queue_;
|
||||
std::mutex mutex_;
|
||||
@ -76,7 +133,27 @@ private:
|
||||
bool stop_ = false;
|
||||
};
|
||||
|
||||
|
||||
// 定义全局存储队列
|
||||
extern ThreadSafeQueue<ImageData> g_storageQueue;
|
||||
|
||||
// 定义全局图像队列和结果队列
|
||||
extern ThreadSafeQueue<ImageData>* g_img_Queue[2];
|
||||
extern ThreadSafeQueue<ImageData>* g_result_Queue[2];
|
||||
|
||||
// 定义全局识别线程
|
||||
extern std::thread* g_recognitionThread[2];
|
||||
|
||||
// 定义线程控制变量
|
||||
extern std::atomic<bool>* g_recognitionRunning[2];
|
||||
|
||||
// 定义全局ONNXRunner实例数组
|
||||
extern ONNXRunner* g_runner_array[2];
|
||||
|
||||
extern std::map<std::string, int> params;
|
||||
extern std::vector<std::string> colors;
|
||||
|
||||
|
||||
|
||||
#define MIN_AREA 30
|
||||
|
||||
#endif // GLOBALS_H
|
||||
|
||||
@ -282,3 +282,5 @@ void VectorToImg(const std::vector<std::vector<uint8_t> > &array, const std::str
|
||||
// 将图像保存为文件,传入的image_path指定保存路径和文件名
|
||||
imwrite(image_path, image);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user