/*********************************************************** * File generated by the HALCON-Compiler hcomp version 20.11 * Usage: Interface to C++ * * Software by: MVTec Software GmbH, www.mvtec.com ***********************************************************/ #ifndef HCPP_HDEFORMABLESURFACEMODEL #define HCPP_HDEFORMABLESURFACEMODEL namespace HalconCpp { // Represents an instance of a deformable surface model. class LIntExport HDeformableSurfaceModel : public HHandle { public: // Create an uninitialized instance HDeformableSurfaceModel():HHandle() {} // Copy constructor HDeformableSurfaceModel(const HDeformableSurfaceModel& source) : HHandle(source) {} // Copy constructor HDeformableSurfaceModel(const HHandle& handle); // Create HDeformableSurfaceModel from handle, taking ownership explicit HDeformableSurfaceModel(Hlong handle); bool operator==(const HHandle& obj) const { return HHandleBase::operator==(obj); } bool operator!=(const HHandle& obj) const { return HHandleBase::operator!=(obj); } protected: // Verify matching semantic type ('deformable_surface_model')! virtual void AssertType(Hphandle handle) const; public: // Deep copy of all data represented by this object instance HDeformableSurfaceModel Clone() const; /***************************************************************************** * Operator-based class constructors *****************************************************************************/ // read_deformable_surface_model: Read a deformable surface model from a file. explicit HDeformableSurfaceModel(const HString& FileName); // read_deformable_surface_model: Read a deformable surface model from a file. explicit HDeformableSurfaceModel(const char* FileName); #ifdef _WIN32 // read_deformable_surface_model: Read a deformable surface model from a file. explicit HDeformableSurfaceModel(const wchar_t* FileName); #endif // create_deformable_surface_model: Create the data structure needed to perform deformable surface-based matching. explicit HDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HTuple& GenParamName, const HTuple& GenParamValue); // create_deformable_surface_model: Create the data structure needed to perform deformable surface-based matching. explicit HDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HString& GenParamName, const HString& GenParamValue); // create_deformable_surface_model: Create the data structure needed to perform deformable surface-based matching. explicit HDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const char* GenParamName, const char* GenParamValue); #ifdef _WIN32 // create_deformable_surface_model: Create the data structure needed to perform deformable surface-based matching. explicit HDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const wchar_t* GenParamName, const wchar_t* GenParamValue); #endif /*************************************************************************** * Operators * ***************************************************************************/ // Free the memory of a deformable surface model. static void ClearDeformableSurfaceModel(const HDeformableSurfaceModelArray& DeformableSurfaceModel); // Free the memory of a deformable surface model. void ClearDeformableSurfaceModel() const; // Deserialize a deformable surface model. void DeserializeDeformableSurfaceModel(const HSerializedItem& SerializedItemHandle); // Serialize a deformable surface_model. HSerializedItem SerializeDeformableSurfaceModel() const; // Read a deformable surface model from a file. void ReadDeformableSurfaceModel(const HString& FileName); // Read a deformable surface model from a file. void ReadDeformableSurfaceModel(const char* FileName); #ifdef _WIN32 // Read a deformable surface model from a file. void ReadDeformableSurfaceModel(const wchar_t* FileName); #endif // Write a deformable surface model to a file. void WriteDeformableSurfaceModel(const HString& FileName) const; // Write a deformable surface model to a file. void WriteDeformableSurfaceModel(const char* FileName) const; #ifdef _WIN32 // Write a deformable surface model to a file. void WriteDeformableSurfaceModel(const wchar_t* FileName) const; #endif // Refine the position and deformation of a deformable surface model in a 3D scene. HTuple RefineDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HObjectModel3D& InitialDeformationObjectModel3D, const HTuple& GenParamName, const HTuple& GenParamValue, HDeformableSurfaceMatchingResultArray* DeformableSurfaceMatchingResult) const; // Refine the position and deformation of a deformable surface model in a 3D scene. double RefineDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HObjectModel3D& InitialDeformationObjectModel3D, const HString& GenParamName, const HString& GenParamValue, HDeformableSurfaceMatchingResult* DeformableSurfaceMatchingResult) const; // Refine the position and deformation of a deformable surface model in a 3D scene. double RefineDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HObjectModel3D& InitialDeformationObjectModel3D, const char* GenParamName, const char* GenParamValue, HDeformableSurfaceMatchingResult* DeformableSurfaceMatchingResult) const; #ifdef _WIN32 // Refine the position and deformation of a deformable surface model in a 3D scene. double RefineDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HObjectModel3D& InitialDeformationObjectModel3D, const wchar_t* GenParamName, const wchar_t* GenParamValue, HDeformableSurfaceMatchingResult* DeformableSurfaceMatchingResult) const; #endif // Find the best match of a deformable surface model in a 3D scene. HTuple FindDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HTuple& MinScore, const HTuple& GenParamName, const HTuple& GenParamValue, HDeformableSurfaceMatchingResultArray* DeformableSurfaceMatchingResult) const; // Find the best match of a deformable surface model in a 3D scene. double FindDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, double MinScore, const HTuple& GenParamName, const HTuple& GenParamValue, HDeformableSurfaceMatchingResult* DeformableSurfaceMatchingResult) const; // Return the parameters and properties of a deformable surface model. HTuple GetDeformableSurfaceModelParam(const HTuple& GenParamName) const; // Return the parameters and properties of a deformable surface model. HTuple GetDeformableSurfaceModelParam(const HString& GenParamName) const; // Return the parameters and properties of a deformable surface model. HTuple GetDeformableSurfaceModelParam(const char* GenParamName) const; #ifdef _WIN32 // Return the parameters and properties of a deformable surface model. HTuple GetDeformableSurfaceModelParam(const wchar_t* GenParamName) const; #endif // Add a reference point to a deformable surface model. HTuple AddDeformableSurfaceModelReferencePoint(const HTuple& ReferencePointX, const HTuple& ReferencePointY, const HTuple& ReferencePointZ) const; // Add a reference point to a deformable surface model. Hlong AddDeformableSurfaceModelReferencePoint(double ReferencePointX, double ReferencePointY, double ReferencePointZ) const; // Add a sample deformation to a deformable surface model void AddDeformableSurfaceModelSample(const HObjectModel3DArray& ObjectModel3D) const; // Add a sample deformation to a deformable surface model void AddDeformableSurfaceModelSample(const HObjectModel3D& ObjectModel3D) const; // Create the data structure needed to perform deformable surface-based matching. void CreateDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HTuple& GenParamName, const HTuple& GenParamValue); // Create the data structure needed to perform deformable surface-based matching. void CreateDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const HString& GenParamName, const HString& GenParamValue); // Create the data structure needed to perform deformable surface-based matching. void CreateDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const char* GenParamName, const char* GenParamValue); #ifdef _WIN32 // Create the data structure needed to perform deformable surface-based matching. void CreateDeformableSurfaceModel(const HObjectModel3D& ObjectModel3D, double RelSamplingDistance, const wchar_t* GenParamName, const wchar_t* GenParamValue); #endif }; // forward declarations and types for internal array implementation template class HSmartPtr; template class HHandleBaseArrayRef; typedef HHandleBaseArrayRef HDeformableSurfaceModelArrayRef; typedef HSmartPtr< HDeformableSurfaceModelArrayRef > HDeformableSurfaceModelArrayPtr; // Represents multiple tool instances class LIntExport HDeformableSurfaceModelArray : public HHandleBaseArray { public: // Create empty array HDeformableSurfaceModelArray(); // Create array from native array of tool instances HDeformableSurfaceModelArray(HDeformableSurfaceModel* classes, Hlong length); // Copy constructor HDeformableSurfaceModelArray(const HDeformableSurfaceModelArray &tool_array); // Destructor virtual ~HDeformableSurfaceModelArray(); // Assignment operator HDeformableSurfaceModelArray &operator=(const HDeformableSurfaceModelArray &tool_array); // Clears array and all tool instances virtual void Clear(); // Get array of native tool instances const HDeformableSurfaceModel* Tools() const; // Get number of tools virtual Hlong Length() const; // Create tool array from tuple of handles virtual void SetFromTuple(const HTuple& handles); // Get tuple of handles for tool array virtual HTuple ConvertToTuple() const; protected: // Smart pointer to internal data container HDeformableSurfaceModelArrayPtr *mArrayPtr; }; } #endif