ccCommandLineCommands.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620
  1. #ifndef COMMAND_LINE_COMMANDS_HEADER
  2. #define COMMAND_LINE_COMMANDS_HEADER
  3. #include <QStringList>
  4. #include "ccCommandLineInterface.h"
  5. struct CommandChangeOutputFormat : public ccCommandLineInterface::Command
  6. {
  7. CommandChangeOutputFormat(const QString& name, const QString& keyword);
  8. QString getFileFormatFilter(ccCommandLineInterface& cmd, QString& defaultExt);
  9. };
  10. struct CommandChangeCloudOutputFormat : public CommandChangeOutputFormat
  11. {
  12. CommandChangeCloudOutputFormat();
  13. bool process(ccCommandLineInterface& cmd) override;
  14. };
  15. struct CommandChangeMeshOutputFormat : public CommandChangeOutputFormat
  16. {
  17. CommandChangeMeshOutputFormat();
  18. bool process(ccCommandLineInterface& cmd) override;
  19. };
  20. struct CommandChangeHierarchyOutputFormat : public CommandChangeOutputFormat
  21. {
  22. CommandChangeHierarchyOutputFormat();
  23. bool process(ccCommandLineInterface& cmd) override;
  24. };
  25. struct CommandLoad : public ccCommandLineInterface::Command
  26. {
  27. CommandLoad();
  28. bool process(ccCommandLineInterface& cmd) override;
  29. };
  30. struct CommandLoadCommandFile : public ccCommandLineInterface::Command
  31. {
  32. CommandLoadCommandFile();
  33. bool process(ccCommandLineInterface& cmd) override;
  34. };
  35. struct CommandClearNormals : public ccCommandLineInterface::Command
  36. {
  37. CommandClearNormals();
  38. bool process(ccCommandLineInterface& cmd) override;
  39. };
  40. struct CommandOctreeNormal : public ccCommandLineInterface::Command
  41. {
  42. CommandOctreeNormal();
  43. bool process(ccCommandLineInterface& cmd) override;
  44. };
  45. struct CommandInvertNormal : public ccCommandLineInterface::Command
  46. {
  47. CommandInvertNormal();
  48. bool process(ccCommandLineInterface& cmd) override;
  49. };
  50. struct CommandConvertNormalsToDipAndDipDir : public ccCommandLineInterface::Command
  51. {
  52. CommandConvertNormalsToDipAndDipDir();
  53. bool process(ccCommandLineInterface& cmd) override;
  54. };
  55. struct CommandConvertNormalsToSFs : public ccCommandLineInterface::Command
  56. {
  57. CommandConvertNormalsToSFs();
  58. bool process(ccCommandLineInterface& cmd) override;
  59. };
  60. struct CommandConvertNormalsToHSV : public ccCommandLineInterface::Command
  61. {
  62. CommandConvertNormalsToHSV();
  63. bool process(ccCommandLineInterface& cmd) override;
  64. };
  65. struct CommandSubsample : public ccCommandLineInterface::Command
  66. {
  67. CommandSubsample();
  68. bool process(ccCommandLineInterface& cmd) override;
  69. };
  70. struct CommandExtractCCs : public ccCommandLineInterface::Command
  71. {
  72. CommandExtractCCs();
  73. bool process(ccCommandLineInterface& cmd) override;
  74. };
  75. struct CommandCurvature : public ccCommandLineInterface::Command
  76. {
  77. CommandCurvature();
  78. bool process(ccCommandLineInterface& cmd) override;
  79. };
  80. struct CommandApproxDensity : public ccCommandLineInterface::Command
  81. {
  82. CommandApproxDensity();
  83. bool process(ccCommandLineInterface& cmd) override;
  84. };
  85. struct CommandDensity : public ccCommandLineInterface::Command
  86. {
  87. CommandDensity();
  88. bool process(ccCommandLineInterface& cmd) override;
  89. };
  90. struct CommandSFGradient : public ccCommandLineInterface::Command
  91. {
  92. CommandSFGradient();
  93. bool process(ccCommandLineInterface& cmd) override;
  94. };
  95. struct CommandRoughness : public ccCommandLineInterface::Command
  96. {
  97. CommandRoughness();
  98. bool process(ccCommandLineInterface& cmd) override;
  99. };
  100. struct CommandApplyTransformation : public ccCommandLineInterface::Command
  101. {
  102. CommandApplyTransformation();
  103. bool process(ccCommandLineInterface& cmd) override;
  104. };
  105. struct CommandDropGlobalShift : public ccCommandLineInterface::Command
  106. {
  107. CommandDropGlobalShift();
  108. bool process(ccCommandLineInterface& cmd) override;
  109. };
  110. struct CommandSFColorScale : public ccCommandLineInterface::Command
  111. {
  112. CommandSFColorScale();
  113. bool process(ccCommandLineInterface& cmd) override;
  114. };
  115. struct CommandSFConvertToRGB : public ccCommandLineInterface::Command
  116. {
  117. CommandSFConvertToRGB();
  118. bool process(ccCommandLineInterface& cmd) override;
  119. };
  120. struct CommandRGBConvertToSF : public ccCommandLineInterface::Command
  121. {
  122. CommandRGBConvertToSF();
  123. bool process(ccCommandLineInterface& cmd) override;
  124. };
  125. struct CommandFilterBySFValue : public ccCommandLineInterface::Command
  126. {
  127. CommandFilterBySFValue();
  128. bool process(ccCommandLineInterface& cmd) override;
  129. };
  130. struct CommandComputeMeshVolume : public ccCommandLineInterface::Command
  131. {
  132. CommandComputeMeshVolume();
  133. bool process(ccCommandLineInterface& cmd) override;
  134. };
  135. struct CommandMergeMeshes : public ccCommandLineInterface::Command
  136. {
  137. CommandMergeMeshes();
  138. bool process(ccCommandLineInterface& cmd) override;
  139. };
  140. struct CommandMergeClouds : public ccCommandLineInterface::Command
  141. {
  142. CommandMergeClouds();
  143. bool process(ccCommandLineInterface& cmd) override;
  144. };
  145. struct CommandSetActiveSF : public ccCommandLineInterface::Command
  146. {
  147. CommandSetActiveSF();
  148. bool process(ccCommandLineInterface& cmd) override;
  149. };
  150. struct CommandSetGlobalShift : public ccCommandLineInterface::Command
  151. {
  152. CommandSetGlobalShift();
  153. bool process(ccCommandLineInterface& cmd) override;
  154. };
  155. struct CommandRemoveAllSFs : public ccCommandLineInterface::Command
  156. {
  157. CommandRemoveAllSFs();
  158. bool process(ccCommandLineInterface& cmd) override;
  159. };
  160. struct CommandRemoveSF : public ccCommandLineInterface::Command
  161. {
  162. CommandRemoveSF();
  163. bool process(ccCommandLineInterface& cmd) override;
  164. bool removeSF(int sfIndex, ccPointCloud& pc);
  165. };
  166. struct CommandRemoveRGB : public ccCommandLineInterface::Command
  167. {
  168. CommandRemoveRGB();
  169. bool process(ccCommandLineInterface& cmd) override;
  170. };
  171. struct CommandRemoveNormals : public ccCommandLineInterface::Command
  172. {
  173. CommandRemoveNormals();
  174. bool process(ccCommandLineInterface& cmd) override;
  175. };
  176. struct CommandRemoveScanGrids : public ccCommandLineInterface::Command
  177. {
  178. CommandRemoveScanGrids();
  179. bool process(ccCommandLineInterface& cmd) override;
  180. };
  181. struct CommandRemoveSensors : public ccCommandLineInterface::Command
  182. {
  183. CommandRemoveSensors();
  184. bool process(ccCommandLineInterface& cmd) override;
  185. };
  186. struct CommandMatchBBCenters : public ccCommandLineInterface::Command
  187. {
  188. CommandMatchBBCenters();
  189. bool process(ccCommandLineInterface& cmd) override;
  190. };
  191. struct CommandMatchBestFitPlane : public ccCommandLineInterface::Command
  192. {
  193. CommandMatchBestFitPlane();
  194. bool process(ccCommandLineInterface& cmd) override;
  195. };
  196. struct CommandOrientNormalsMST : public ccCommandLineInterface::Command
  197. {
  198. CommandOrientNormalsMST();
  199. bool process(ccCommandLineInterface& cmd) override;
  200. };
  201. struct CommandSORFilter : public ccCommandLineInterface::Command
  202. {
  203. CommandSORFilter();
  204. bool process(ccCommandLineInterface& cmd) override;
  205. };
  206. struct CommandNoiseFilter : public ccCommandLineInterface::Command
  207. {
  208. CommandNoiseFilter();
  209. bool process(ccCommandLineInterface& cmd) override;
  210. };
  211. struct CommandRemoveDuplicatePoints : public ccCommandLineInterface::Command
  212. {
  213. CommandRemoveDuplicatePoints();
  214. bool process(ccCommandLineInterface& cmd) override;
  215. };
  216. struct CommandExtractVertices : public ccCommandLineInterface::Command
  217. {
  218. CommandExtractVertices();
  219. bool process(ccCommandLineInterface& cmd) override;
  220. };
  221. struct CommandFlipTriangles : public ccCommandLineInterface::Command
  222. {
  223. CommandFlipTriangles();
  224. bool process(ccCommandLineInterface& cmd) override;
  225. };
  226. struct CommandSampleMesh : public ccCommandLineInterface::Command
  227. {
  228. CommandSampleMesh();
  229. bool process(ccCommandLineInterface& cmd) override;
  230. };
  231. struct CommandCompressFWF : public ccCommandLineInterface::Command
  232. {
  233. CommandCompressFWF();
  234. bool process(ccCommandLineInterface& cmd) override;
  235. };
  236. struct CommandCrop : public ccCommandLineInterface::Command
  237. {
  238. CommandCrop();
  239. bool process(ccCommandLineInterface& cmd) override;
  240. };
  241. struct CommandCoordToSF : public ccCommandLineInterface::Command
  242. {
  243. CommandCoordToSF();
  244. bool process(ccCommandLineInterface& cmd) override;
  245. };
  246. struct CommandSFToCoord : public ccCommandLineInterface::Command
  247. {
  248. CommandSFToCoord();
  249. bool process(ccCommandLineInterface& cmd) override;
  250. };
  251. struct CommandCrop2D : public ccCommandLineInterface::Command
  252. {
  253. CommandCrop2D();
  254. bool process(ccCommandLineInterface& cmd) override;
  255. };
  256. struct CommandColorBanding : public ccCommandLineInterface::Command
  257. {
  258. CommandColorBanding();
  259. bool process(ccCommandLineInterface& cmd) override;
  260. };
  261. struct CommandColorLevels : public ccCommandLineInterface::Command
  262. {
  263. CommandColorLevels();
  264. bool process(ccCommandLineInterface& cmd) override;
  265. };
  266. struct CommandDist : public ccCommandLineInterface::Command
  267. {
  268. CommandDist(bool cloud2meshDist, const QString& name, const QString& keyword);
  269. bool process(ccCommandLineInterface& cmd) override;
  270. bool m_cloud2meshDist;
  271. };
  272. struct CommandC2MDist : public CommandDist
  273. {
  274. CommandC2MDist();
  275. };
  276. struct CommandC2CDist : public CommandDist
  277. {
  278. CommandC2CDist();
  279. };
  280. struct CommandCPS : public ccCommandLineInterface::Command
  281. {
  282. CommandCPS();
  283. bool process(ccCommandLineInterface& cmd) override;
  284. };
  285. struct CommandStatTest : public ccCommandLineInterface::Command
  286. {
  287. CommandStatTest();
  288. bool process(ccCommandLineInterface& cmd) override;
  289. };
  290. struct CommandDelaunayTri : public ccCommandLineInterface::Command
  291. {
  292. CommandDelaunayTri();
  293. bool process(ccCommandLineInterface& cmd) override;
  294. };
  295. struct CommandSFArithmetic : public ccCommandLineInterface::Command
  296. {
  297. CommandSFArithmetic();
  298. bool process(ccCommandLineInterface& cmd) override;
  299. };
  300. struct CommandSFOperation : public ccCommandLineInterface::Command
  301. {
  302. CommandSFOperation();
  303. bool process(ccCommandLineInterface& cmd) override;
  304. };
  305. struct CommandSFOperationSF : public ccCommandLineInterface::Command
  306. {
  307. CommandSFOperationSF();
  308. bool process(ccCommandLineInterface& cmd) override;
  309. };
  310. struct CommandSFInterpolation : public ccCommandLineInterface::Command
  311. {
  312. CommandSFInterpolation();
  313. bool process(ccCommandLineInterface& cmd) override;
  314. };
  315. struct CommandColorInterpolation : public ccCommandLineInterface::Command
  316. {
  317. CommandColorInterpolation();
  318. bool process(ccCommandLineInterface& cmd) override;
  319. };
  320. struct CommandFilter : public ccCommandLineInterface::Command
  321. {
  322. CommandFilter();
  323. bool process(ccCommandLineInterface& cmd) override;
  324. };
  325. struct CommandRenameEntities : public ccCommandLineInterface::Command
  326. {
  327. CommandRenameEntities();
  328. bool process(ccCommandLineInterface& cmd) override;
  329. };
  330. struct CommandSFRename : public ccCommandLineInterface::Command
  331. {
  332. CommandSFRename();
  333. bool process(ccCommandLineInterface& cmd) override;
  334. };
  335. struct CommandSFAddConst : public ccCommandLineInterface::Command
  336. {
  337. CommandSFAddConst();
  338. bool process(ccCommandLineInterface& cmd) override;
  339. };
  340. struct CommandSFAddId : public ccCommandLineInterface::Command
  341. {
  342. CommandSFAddId();
  343. bool process(ccCommandLineInterface& cmd) override;
  344. };
  345. struct CommandICP : public ccCommandLineInterface::Command
  346. {
  347. CommandICP();
  348. bool process(ccCommandLineInterface& cmd) override;
  349. };
  350. struct CommandChangePLYExportFormat : public ccCommandLineInterface::Command
  351. {
  352. CommandChangePLYExportFormat();
  353. bool process(ccCommandLineInterface& cmd) override;
  354. };
  355. struct CommandForceNormalsComputation : public ccCommandLineInterface::Command
  356. {
  357. CommandForceNormalsComputation();
  358. bool process(ccCommandLineInterface& cmd) override;
  359. };
  360. struct CommandSave : public ccCommandLineInterface::Command
  361. {
  362. CommandSave(const QString& name, const QString& keyword);
  363. static bool ParseFileNames(ccCommandLineInterface& cmd, QStringList& fileNames);
  364. static void SetFileDesc(CLEntityDesc& desc, const QString& fileName);
  365. };
  366. struct CommandSaveClouds : public CommandSave
  367. {
  368. CommandSaveClouds();
  369. bool process(ccCommandLineInterface& cmd) override;
  370. };
  371. struct CommandSaveMeshes : public CommandSave
  372. {
  373. CommandSaveMeshes();
  374. bool process(ccCommandLineInterface& cmd) override;
  375. };
  376. struct CommandAutoSave : public ccCommandLineInterface::Command
  377. {
  378. CommandAutoSave();
  379. bool process(ccCommandLineInterface& cmd) override;
  380. };
  381. struct CommandLogFile : public ccCommandLineInterface::Command
  382. {
  383. CommandLogFile();
  384. bool process(ccCommandLineInterface& cmd) override;
  385. };
  386. struct CommandSelectEntities : public ccCommandLineInterface::Command
  387. {
  388. CommandSelectEntities();
  389. bool process(ccCommandLineInterface& cmd) override;
  390. };
  391. struct CommandClear : public ccCommandLineInterface::Command
  392. {
  393. CommandClear();
  394. bool process(ccCommandLineInterface& cmd) override;
  395. };
  396. struct CommandClearClouds : public ccCommandLineInterface::Command
  397. {
  398. CommandClearClouds();
  399. bool process(ccCommandLineInterface& cmd) override;
  400. };
  401. struct CommandPopClouds : public ccCommandLineInterface::Command
  402. {
  403. CommandPopClouds();
  404. bool process(ccCommandLineInterface& cmd) override;
  405. };
  406. struct CommandClearMeshes : public ccCommandLineInterface::Command
  407. {
  408. CommandClearMeshes();
  409. bool process(ccCommandLineInterface& cmd) override;
  410. };
  411. struct CommandPopMeshes : public ccCommandLineInterface::Command
  412. {
  413. CommandPopMeshes();
  414. bool process(ccCommandLineInterface& cmd) override;
  415. };
  416. struct CommandSetNoTimestamp : public ccCommandLineInterface::Command
  417. {
  418. CommandSetNoTimestamp();
  419. bool process(ccCommandLineInterface& cmd) override;
  420. };
  421. struct CommandMoment : public ccCommandLineInterface::Command
  422. {
  423. CommandMoment();
  424. bool process(ccCommandLineInterface& cmd) override;
  425. };
  426. struct CommandFeature : public ccCommandLineInterface::Command
  427. {
  428. CommandFeature();
  429. bool process(ccCommandLineInterface& cmd) override;
  430. };
  431. struct CommandDebugCmdLine : public ccCommandLineInterface::Command
  432. {
  433. CommandDebugCmdLine();
  434. bool process(ccCommandLineInterface& cmd) override;
  435. };
  436. struct CommandSetVerbosity : public ccCommandLineInterface::Command
  437. {
  438. CommandSetVerbosity();
  439. bool process(ccCommandLineInterface& cmd) override;
  440. };
  441. #endif //COMMAND_LINE_COMMANDS_HEADER