Artec 3D Scanning SDK  2.0
AopIO.h
Go to the documentation of this file.
1 /********************************************************************
2 *
3 * Project Artec 3D Scanning SDK
4 *
5 * Purpose: AAOP file format support
6 *
7 * Copyright: Artec Group
8 *
9 ********************************************************************/
10 
11 #ifndef __ArtecBaseSDK_AOPIO_H_
12 #define __ArtecBaseSDK_AOPIO_H_
13 
15 #include <artec/sdk/base/Errors.h>
16 
17 namespace artec { namespace sdk { namespace base
18 {
19 
20 class IMesh;
21 class IRangeImageCylindric;
22 
23 namespace io {
24 
25 extern "C" {
26 
27 /// Save range image to AOP file
28 /// @param path File path where to save mesh
29 /// @param ri Range image to save
31  saveAopImageToFile(const wchar_t* path, const IRangeImageCylindric* ri);
32 
33 /// Save surface in AOP format by converting it to the image
34 /// @param path File path where to save mesh
35 /// @param surface Surface to save
36 /// @param width,height Dimensions of range image texture in pixels
37 /// @param interpolateHoles If it is true, then holes will be interpolated linearly on cylinder
38 /// @param cutEdges Cut top and bottom of the cylinder if the percentage of populated cells in range image
39 /// is less than the edgeQualityFactor
40 /// @param edgeQualityFactor The required percentage of populated cells on edges (in [0..100]).
41 /// @note Surface must be in the origin and aligned along the OY axis, so that OY is inside the surface
43  saveAopMeshToFile(const wchar_t* path, const IMesh* surface, int width, int height,
44  bool interpolateHoles, bool cutEdges = false, int edgeQualityFactor = 80);
45 }
46 
47 /// Export to AOP format (American Academy of Orthotists & Prosthetists)
48 class Aop
49 {
50 public:
51 
52  /// Save range image to AOP format
53  /// @param path File path where to save mesh
54  /// @param ri Range image to save
55  static ErrorCode save(const wchar_t* path, const IRangeImageCylindric* ri)
56  {
57  return saveAopImageToFile(path, ri);
58  }
59 
60  /// Save surface in AOP format converting it to image
61  /// @param path File path where to save mesh
62  /// @param surface Surface to save
63  /// @param width,height Dimensions of the range image texture (in pixels)
64  /// @param interpolateHoles If it is true, then holes will be interpolated linearly on cylinder
65  /// @param cutEdges Cut top and bottom of the cylinder if the percentage of populated cells in range image
66  /// is less than the edgeQualityFactor
67  /// @param edgeQualityFactor The required percentage of populated cells on edges (in [0..100]).
68  /// @note Surface must be in the origin and aligned along the OY axis, so that OY is inside the surface
69  static ErrorCode
70  save(const wchar_t* path, const IMesh* surface, int width, int height,
71  bool interpolateHoles, bool cutEdges = false, int edgeQualityFactor = 80)
72  {
73  return saveAopMeshToFile(path, surface, width, height, interpolateHoles, cutEdges, edgeQualityFactor);
74  }
75 };
76 
77 } } } } // namespace artec::sdk::base::io
78 
79 #endif//__ArtecBaseSDK_AOPIO_H_
Indexed triangle mesh.
Definition: IMesh.h:32
ErrorCode ABASESDK_LINK_SPEC saveAopMeshToFile(const wchar_t *path, const IMesh *surface, int width, int height, bool interpolateHoles, bool cutEdges=false, int edgeQualityFactor=80)
Save surface in AOP format by converting it to the image.
static ErrorCode save(const wchar_t *path, const IRangeImageCylindric *ri)
Save range image to AOP format.
Definition: AopIO.h:55
ErrorCode ABASESDK_LINK_SPEC saveAopImageToFile(const wchar_t *path, const IRangeImageCylindric *ri)
Save range image to AOP file.
Export to AOP format (American Academy of Orthotists & Prosthetists)
Definition: AopIO.h:48
static ErrorCode save(const wchar_t *path, const IMesh *surface, int width, int height, bool interpolateHoles, bool cutEdges=false, int edgeQualityFactor=80)
Save surface in AOP format converting it to image.
Definition: AopIO.h:70
#define ABASESDK_LINK_SPEC
Interface for range image settings (for AOP format in cylindrical coordinates)