lastransform.cpp
Go to the documentation of this file.
1 /*
2 ===============================================================================
3 
4  FILE: lastransform.cpp
5 
6  CONTENTS:
7 
8  see corresponding header file
9 
10  PROGRAMMERS:
11 
12  martin.isenburg@gmail.com
13 
14  COPYRIGHT:
15 
16  (c) 2007-2011, Martin Isenburg, LASSO - tools to catch reality
17 
18  This is free software; you can redistribute and/or modify it under the
19  terms of the GNU Lesser General Licence as published by the Free Software
20  Foundation. See the COPYING file for more information.
21 
22  This software is distributed WITHOUT ANY WARRANTY and without even the
23  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 
25  CHANGE HISTORY:
26 
27  see corresponding header file
28 
29 ===============================================================================
30 */
31 #include "lastransform.hpp"
32 
33 #include <stdio.h>
34 #include <stdlib.h>
35 #include <string.h>
36 #include <math.h>
37 
39 {
40 public:
41  inline const char* name() const { return "translate_x"; };
42  inline void transform(LASpoint* point) const {
43  point->set_x(point->get_x() + offset);
44  };
45  LASoperationTranslateX(F64 offset) { this->offset = offset; };
46 private:
47  F64 offset;
48 };
49 
51 {
52 public:
53  inline const char* name() const { return "translate_y"; };
54  inline void transform(LASpoint* point) const {
55  point->set_y(point->get_y() + offset);
56  };
57  LASoperationTranslateY(F64 offset) { this->offset = offset; };
58 private:
59  F64 offset;
60 };
61 
63 {
64 public:
65  inline const char* name() const { return "translate_z"; };
66  inline void transform(LASpoint* point) const {
67  point->set_z(point->get_z() + offset);
68  };
69  LASoperationTranslateZ(F64 offset) { this->offset = offset; };
70 private:
71  F64 offset;
72 };
73 
75 {
76 public:
77  inline const char* name() const { return "translate_xyz"; };
78  inline void transform(LASpoint* point) const {
79  point->set_x(point->get_x() + offset[0]);
80  point->set_y(point->get_y() + offset[1]);
81  point->set_z(point->get_z() + offset[2]);
82  };
83  LASoperationTranslateXYZ(F64 x_offset, F64 y_offset, F64 z_offset) { this->offset[0] = x_offset; this->offset[1] = y_offset; this->offset[2] = z_offset; };
84 private:
85  F64 offset[3];
86 };
87 
89 {
90 public:
91  inline const char* name() const { return "scale_x"; };
92  inline void transform(LASpoint* point) const {
93  point->set_x(point->get_x() * scale);
94  };
95  LASoperationScaleX(F64 scale) { this->scale = scale; };
96 private:
97  F64 scale;
98 };
99 
101 {
102 public:
103  inline const char* name() const { return "scale_y"; };
104  inline void transform(LASpoint* point) const {
105  point->set_y(point->get_y() * scale);
106  };
107  LASoperationScaleY(F64 scale) { this->scale = scale; };
108 private:
109  F64 scale;
110 };
111 
113 {
114 public:
115  inline const char* name() const { return "scale_z"; };
116  inline void transform(LASpoint* point) const {
117  point->set_z(point->get_z() * scale);
118  };
119  LASoperationScaleZ(F64 scale) { this->scale = scale; };
120 private:
121  F64 scale;
122 };
123 
125 {
126 public:
127  inline const char* name() const { return "scale_xyz"; };
128  inline void transform(LASpoint* point) const {
129  point->set_x(point->get_x() * scale[0]);
130  point->set_y(point->get_y() * scale[1]);
131  point->set_z(point->get_z() * scale[2]);
132  };
133  LASoperationScaleXYZ(F64 x_scale, F64 y_scale, F64 z_scale) { this->scale[0] = x_scale; this->scale[1] = y_scale; this->scale[2] = z_scale; };
134 private:
135  F64 scale[3];
136 };
137 
139 {
140 public:
141  inline const char* name() const { return "translate_then_scale_x"; };
142  inline void transform(LASpoint* point) const {
143  point->set_x((point->get_x()+offset)*scale);
144  };
145  LASoperationTranslateThenScaleX(F64 offset, F64 scale_factor) { this->offset = offset; };
146 private:
147  F64 offset;
149 };
150 
152 {
153 public:
154  inline const char* name() const { return "translate_then_scale_y"; };
155  inline void transform(LASpoint* point) const {
156  point->set_y((point->get_y()+offset)*scale);
157  };
158  LASoperationTranslateThenScaleY(F64 offset, F64 scale) { this->offset = offset; this->scale = scale; };
159 private:
160  F64 offset;
162 };
163 
165 {
166 public:
167  inline const char* name() const { return "translate_then_scale_z"; };
168  inline void transform(LASpoint* point) const {
169  point->set_z((point->get_z()+offset)*scale);
170  };
171  LASoperationTranslateThenScaleZ(F64 offset, F64 scale) { this->offset = offset; this->scale = scale; };
172 private:
173  F64 offset;
175 };
176 
178 {
179 public:
180  inline const char* name() const { return "rotate_xy"; };
181  inline void transform(LASpoint* point) const {
182  F64 x = point->get_x() - x_offset;
183  F64 y = point->get_y() - y_offset;
184  point->set_x(cos_angle*x - sin_angle*y + x_offset);
185  point->set_y(cos_angle*y + sin_angle*x + y_offset);
186  };
187  LASoperationRotateXY(F64 angle, F64 x_offset, F64 y_offset) { this->x_offset = x_offset; this->y_offset = y_offset; cos_angle = cos(3.141592653589793238462643383279502884197169/180*angle); sin_angle = sin(3.141592653589793238462643383279502884197169/180*angle); };
188 private:
191 };
192 
194 {
195 public:
196  inline const char* name() const { return "clamp_z"; };
197  inline void transform(LASpoint* point) const {
198  F64 z = point->get_z();
199  if (z < min) point->set_z(min);
200  else if (z > max) point->set_z(max);
201  };
202  LASoperationClampZ(F64 min, F64 max) { this->min = min; this->max = max; };
203 private:
205 };
206 
208 {
209 public:
210  inline const char* name() const { return "clamp_z_min"; };
211  inline void transform(LASpoint* point) const {
212  F64 z = point->get_z();
213  if (z < min) point->set_z(min);
214  };
215  LASoperationClampZmin(F64 min) { this->min = min; };
216 private:
217  F64 min;
218 };
219 
221 {
222 public:
223  inline const char* name() const { return "clamp_z_max"; };
224  inline void transform(LASpoint* point) const {
225  F64 z = point->get_z();
226  if (z > max) point->set_z(max);
227  };
228  LASoperationClampZmax(F64 max) { this->max = max; };
229 private:
230  F64 max;
231 };
232 
234 {
235 public:
236  inline const char* name() const { return "translate_raw_x"; };
237  inline void transform(LASpoint* point) const {
238  point->x += offset;
239  };
241 private:
242  I32 offset;
243 };
244 
246 {
247 public:
248  inline const char* name() const { return "translate_raw_y"; };
249  inline void transform(LASpoint* point) const {
250  point->y += offset;
251  };
253 private:
254  I32 offset;
255 };
256 
258 {
259 public:
260  inline const char* name() const { return "translate_raw_z"; };
261  inline void transform(LASpoint* point) const {
262  point->z += offset;
263  };
265 private:
266  I32 offset;
267 };
268 
270 {
271 public:
272  inline const char* name() const { return "translate_raw_xyz"; };
273  inline void transform(LASpoint* point) const {
274  point->x += offset[0];
275  point->y += offset[1];
276  point->z += offset[2];
277  };
278  LASoperationTranslateRawXYZ(I32 x_offset, I32 y_offset, I32 z_offset) { this->offset[0] = x_offset; this->offset[1] = y_offset; this->offset[2] = z_offset; };
279 private:
280  I32 offset[3];
281 };
282 
284 {
285 public:
286  inline const char* name() const { return "clamp_raw_z"; };
287  inline void transform(LASpoint* point) const {
288  if (point->z < min) point->z = min;
289  else if (point->z > max) point->z = max;
290  };
291  LASoperationClampRawZ(I32 min, I32 max) { this->min = min; this->max = max; };
292 private:
294 };
295 
297 {
298 public:
299  inline const char* name() const { return "scale_intensity"; };
300  inline void transform(LASpoint* point) const {
301  F32 intensity = scale*point->intensity;
302  point->intensity = U16_CLAMP((I32)intensity);
303  };
305 private:
306  F32 scale;
307 };
308 
310 {
311 public:
312  inline const char* name() const { return "translate_intensity"; };
313  inline void transform(LASpoint* point) const {
314  F32 intensity = offset+point->intensity;
315  point->intensity = U16_CLAMP((I32)intensity);
316  };
318 private:
319  F32 offset;
320 };
321 
323 {
324 public:
325  inline const char* name() const { return "translate_then_scale_intensity"; };
326  inline void transform(LASpoint* point) const {
327  F32 intensity = (offset+point->intensity)*scale;
328  point->intensity = U16_CLAMP((I32)intensity);
329  };
331 private:
332  F32 offset;
334 };
335 
337 {
338 public:
339  inline const char* name() const { return "scale_scan_angle"; };
340  inline void transform(LASpoint* point) const {
341  F32 scan_angle_rank = scale*point->scan_angle_rank;
342  point->scan_angle_rank = I8_CLAMP(I32_QUANTIZE(scan_angle_rank));
343  };
345 private:
346  F32 scale;
347 };
348 
350 {
351 public:
352  inline const char* name() const { return "translate_scan_angle"; };
353  inline void transform(LASpoint* point) const {
354  F32 scan_angle_rank = offset+point->scan_angle_rank;
355  point->scan_angle_rank = I8_CLAMP(I32_QUANTIZE(scan_angle_rank));
356  };
358 private:
359  F32 offset;
360 };
361 
363 {
364 public:
365  inline const char* name() const { return "translate_then_scale_scan_angle"; };
366  inline void transform(LASpoint* point) const {
367  F32 scan_angle_rank = (offset+point->scan_angle_rank)*scale;
368  point->scan_angle_rank = I8_CLAMP(I32_QUANTIZE(scan_angle_rank));
369  };
371 private:
372  F32 offset;
374 };
375 
377 {
378 public:
379  inline const char* name() const { return "change_classification_from_to"; };
380  inline void transform(LASpoint* point) const { if ((point->classification & 31) == class_from) point->classification = (point->classification & 224) | class_to; };
382 private:
383  U8 class_from;
385 };
386 
388 {
389 public:
390  inline const char* name() const { return "change_point_source_from_to"; };
391  inline void transform(LASpoint* point) const { if (point->point_source_ID == psid_from) point->point_source_ID = psid_to; };
392  LASoperationChangePointSourceFromTo(U16 psid_from, U16 psid_to) { this->psid_from = psid_from; this->psid_to = psid_to; };
393 private:
394  U16 psid_from;
396 };
397 
399 {
400 public:
401  inline const char* name() const { return "repair_zero_returns"; };
402  inline void transform(LASpoint* point) const { if (point->number_of_returns_of_given_pulse == 0) point->number_of_returns_of_given_pulse = 1; if (point->return_number == 0) point->return_number = 1; };
403 };
404 
406 {
407 public:
408  inline const char* name() const { return "change_return_number_from_to"; };
409  inline void transform(LASpoint* point) const { if (point->return_number == return_number_from) point->return_number = return_number_to; };
411 private:
414 };
415 
417 {
418 public:
419  inline const char* name() const { return "change_number_of_returns_from_to"; };
422 private:
425 };
426 
428 {
429 public:
430  inline const char* name() const { return "translate_gps_time"; };
431  inline void transform(LASpoint* point) const { point->gps_time += offset; };
433 private:
434  F64 offset;
435 };
436 
438 {
439 public:
440  inline const char* name() const { return "scale_rgb_down"; };
441  inline void transform(LASpoint* point) const { point->rgb[0] = point->rgb[0]/256; point->rgb[1] = point->rgb[1]/256; point->rgb[2] = point->rgb[2]/256; };
442 };
443 
445 {
446 public:
447  inline const char* name() const { return "scale_rgb_up"; };
448  inline void transform(LASpoint* point) const { point->rgb[0] = point->rgb[0]*256; point->rgb[1] = point->rgb[1]*256; point->rgb[2] = point->rgb[2]*256; };
449 };
450 
452 {
453 public:
454  inline const char* name() const { return "switch_x_y"; };
455  inline void transform(LASpoint* point) const { I32 temp = point->x; point->x = point->y; point->y = temp; };
456 };
457 
459 {
460 public:
461  inline const char* name() const { return "switch_x_z"; };
462  inline void transform(LASpoint* point) const { I32 temp = point->x; point->x = point->z; point->z = temp; };
463 };
464 
466 {
467 public:
468  inline const char* name() const { return "switch_y_z"; };
469  inline void transform(LASpoint* point) const { I32 temp = point->y; point->y = point->z; point->z = temp; };
470 };
471 
473 {
474 public:
475  inline const char* name() const { return "flip_waveform_direction"; };
476  inline void transform(LASpoint* point) const { point->wavepacket.flipDirection(); };
477 };
478 
480 {
481  U32 i;
482  for (i = 0; i < num_operations; i++)
483  {
484  delete operations[i];
485  }
486  if (operations) delete [] operations;
488  alloc_operations = 0;
489  num_operations = 0;
490  operations = 0;
491 }
492 
494 {
495  fprintf(stderr,"Transform coordinates.\n");
496  fprintf(stderr," -translate_x -2.5\n");
497  fprintf(stderr," -scale_z 0.3048\n");
498  fprintf(stderr," -rotate_xy 15.0 620000 4100000 (angle + origin)\n");
499  fprintf(stderr," -translate_xyz 0.5 0.5 0\n");
500  fprintf(stderr," -translate_then_scale_y -0.5 1.001\n");
501  fprintf(stderr," -clamp_z_min 70.5\n");
502  fprintf(stderr," -clamp_z 70.5 72.5\n");
503  fprintf(stderr,"Transform raw xyz integers.\n");
504  fprintf(stderr," -translate_raw_z 20\n");
505  fprintf(stderr," -translate_raw_xyz 1 1 0\n");
506  fprintf(stderr," -clamp_raw_z 500 800\n");
507  fprintf(stderr,"Transform intensity.\n");
508  fprintf(stderr," -scale_intensity 2.5\n");
509  fprintf(stderr," -translate_intensity 50\n");
510  fprintf(stderr," -translate_then_scale_intensity 0.5 3.1\n");
511  fprintf(stderr,"Transform scan_angle.\n");
512  fprintf(stderr," -scale_scan_angle 1.944445\n");
513  fprintf(stderr," -translate_scan_angle -5\n");
514  fprintf(stderr," -translate_then_scale_scan_angle -0.5 2.1\n");
515  fprintf(stderr,"Change the return number or return count of points.\n");
516  fprintf(stderr," -repair_zero_returns\n");
517  fprintf(stderr," -change_return_number_from_to 2 1\n");
518  fprintf(stderr," -change_number_of_returns_from_to 0 2\n");
519  fprintf(stderr,"Change classification by replacing one with another.\n");
520  fprintf(stderr," -change_classification_from_to 2 4\n");
521  fprintf(stderr,"Change point source ID by replacing one with another.\n");
522  fprintf(stderr," -change_point_source_from_to 1023 1024\n");
523  fprintf(stderr,"Transform gps_time.\n");
524  fprintf(stderr," -translate_gps_time 40.50\n");
525  fprintf(stderr,"Transform RGB colors.\n");
526  fprintf(stderr," -scale_rgb_down (by 256)\n");
527  fprintf(stderr," -scale_rgb_up (by 256)\n");
528 }
529 
531 {
532  int i;
533 
534  for (i = 1; i < argc; i++)
535  {
536  if (argv[i][0] == '\0')
537  {
538  continue;
539  }
540  else if (strcmp(argv[i],"-h") == 0 || strcmp(argv[i],"-help") == 0)
541  {
542  usage();
543  return TRUE;
544  }
545  else if (strcmp(argv[i],"-translate_x") == 0)
546  {
547  if ((i+1) >= argc)
548  {
549  fprintf(stderr,"ERROR: '%s' needs 1 argument: offset\n", argv[i]);
550  return FALSE;
551  }
553  add_operation(new LASoperationTranslateX((F64)atof(argv[i+1])));
554  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
555  }
556  else if (strcmp(argv[i],"-translate_y") == 0)
557  {
558  if ((i+1) >= argc)
559  {
560  fprintf(stderr,"ERROR: '%s' needs 1 argument: offset\n", argv[i]);
561  return FALSE;
562  }
564  add_operation(new LASoperationTranslateY((F64)atof(argv[i+1])));
565  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
566  }
567  else if (strcmp(argv[i],"-translate_z") == 0)
568  {
569  if ((i+1) >= argc)
570  {
571  fprintf(stderr,"ERROR: '%s' needs 1 argument: offset\n", argv[i]);
572  return FALSE;
573  }
575  add_operation(new LASoperationTranslateZ((F64)atof(argv[i+1])));
576  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
577  }
578  else if (strcmp(argv[i],"-translate_xyz") == 0)
579  {
580  if ((i+3) >= argc)
581  {
582  fprintf(stderr,"ERROR: '%s' needs 3 arguments: offset_x offset_y offset_z\n", argv[i]);
583  return FALSE;
584  }
586  add_operation(new LASoperationTranslateXYZ((F64)atof(argv[i+1]), (F64)atof(argv[i+2]), (F64)atof(argv[i+3])));
587  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; *argv[i+3]='\0'; i+=3;
588  }
589  else if (strcmp(argv[i],"-scale_x") == 0)
590  {
591  if ((i+1) >= argc)
592  {
593  fprintf(stderr,"ERROR: '%s' needs 1 argument: scale\n", argv[i]);
594  return FALSE;
595  }
597  add_operation(new LASoperationScaleX((F64)atof(argv[i+1])));
598  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
599  }
600  else if (strcmp(argv[i],"-scale_y") == 0)
601  {
602  if ((i+1) >= argc)
603  {
604  fprintf(stderr,"ERROR: '%s' needs 1 argument: scale\n", argv[i]);
605  return FALSE;
606  }
608  add_operation(new LASoperationScaleY((F64)atof(argv[i+1])));
609  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
610  }
611  else if (strcmp(argv[i],"-scale_z") == 0)
612  {
613  if ((i+1) >= argc)
614  {
615  fprintf(stderr,"ERROR: '%s' needs 1 argument: scale\n", argv[i]);
616  return FALSE;
617  }
619  add_operation(new LASoperationScaleZ((F64)atof(argv[i+1])));
620  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
621  }
622  else if (strcmp(argv[i],"-scale_xyz") == 0)
623  {
624  if ((i+3) >= argc)
625  {
626  fprintf(stderr,"ERROR: '%s' needs 3 arguments: scale_x scale_y scale_z\n", argv[i]);
627  return FALSE;
628  }
630  add_operation(new LASoperationScaleXYZ((F64)atof(argv[i+1]), (F64)atof(argv[i+2]), (F64)atof(argv[i+3])));
631  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; *argv[i+3]='\0'; i+=3;
632  }
633  else if (strcmp(argv[i],"-translate_then_scale_x") == 0)
634  {
635  if ((i+2) >= argc)
636  {
637  fprintf(stderr,"ERROR: '%s' needs 2 arguments: offset scale\n", argv[i]);
638  return FALSE;
639  }
641  add_operation(new LASoperationTranslateThenScaleX((F64)atof(argv[i+1]), (F64)atof(argv[i+2])));
642  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; i+=2;
643  }
644  else if (strcmp(argv[i],"-translate_then_scale_y") == 0)
645  {
646  if ((i+2) >= argc)
647  {
648  fprintf(stderr,"ERROR: '%s' needs 2 arguments: offset scale\n", argv[i]);
649  return FALSE;
650  }
652  add_operation(new LASoperationTranslateThenScaleY((F64)atof(argv[i+1]), (F64)atof(argv[i+2])));
653  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; i+=2;
654  }
655  else if (strcmp(argv[i],"-translate_then_scale_z") == 0)
656  {
657  if ((i+2) >= argc)
658  {
659  fprintf(stderr,"ERROR: '%s' needs 2 arguments: offset scale\n", argv[i]);
660  return FALSE;
661  }
663  add_operation(new LASoperationTranslateThenScaleZ((F64)atof(argv[i+1]), (F64)atof(argv[i+2])));
664  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; i+=2;
665  }
666  else if (strcmp(argv[i],"-rotate_xy") == 0)
667  {
668  if ((i+3) >= argc)
669  {
670  fprintf(stderr,"ERROR: '%s' needs 3 arguments: angle, x, y\n", argv[i]);
671  return FALSE;
672  }
674  add_operation(new LASoperationRotateXY((F64)atof(argv[i+1]), (F64)atof(argv[i+2]), (F64)atof(argv[i+3])));
675  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; *argv[i+3]='\0'; i+=3;
676  }
677  else if (strcmp(argv[i],"-clamp_z") == 0)
678  {
679  if ((i+2) >= argc)
680  {
681  fprintf(stderr,"ERROR: '%s' needs 2 arguments: min, max\n", argv[i]);
682  return FALSE;
683  }
685  add_operation(new LASoperationClampZ((I32)atoi(argv[i+1]), (I32)atoi(argv[i+2])));
686  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; i+=2;
687  }
688  else if (strcmp(argv[i],"-clamp_z_min") == 0)
689  {
690  if ((i+1) >= argc)
691  {
692  fprintf(stderr,"ERROR: '%s' needs 1 argument: min\n", argv[i]);
693  return FALSE;
694  }
696  add_operation(new LASoperationClampZmin((I32)atoi(argv[i+1])));
697  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
698  }
699  else if (strcmp(argv[i],"-clamp_z_max") == 0)
700  {
701  if ((i+1) >= argc)
702  {
703  fprintf(stderr,"ERROR: '%s' needs 1 argument: max\n", argv[i]);
704  return FALSE;
705  }
707  add_operation(new LASoperationClampZmax((I32)atoi(argv[i+1])));
708  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
709  }
710  else if (strcmp(argv[i],"-translate_raw_x") == 0)
711  {
712  if ((i+1) >= argc)
713  {
714  fprintf(stderr,"ERROR: '%s' needs 1 argument: offset\n", argv[i]);
715  return FALSE;
716  }
719  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
720  }
721  else if (strcmp(argv[i],"-translate_raw_y") == 0)
722  {
723  if ((i+1) >= argc)
724  {
725  fprintf(stderr,"ERROR: '%s' needs 1 argument: offset\n", argv[i]);
726  return FALSE;
727  }
730  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
731  }
732  else if (strcmp(argv[i],"-translate_raw_z") == 0)
733  {
734  if ((i+1) >= argc)
735  {
736  fprintf(stderr,"ERROR: '%s' needs 1 argument: offset\n", argv[i]);
737  return FALSE;
738  }
741  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
742  }
743  else if (strcmp(argv[i],"-translate_raw_xyz") == 0)
744  {
745  if ((i+3) >= argc)
746  {
747  fprintf(stderr,"ERROR: '%s' needs 3 arguments: offset_x offset_y offset_z\n", argv[i]);
748  return FALSE;
749  }
751  add_operation(new LASoperationTranslateRawXYZ((I32)atoi(argv[i+1]), (I32)atoi(argv[i+2]), (I32)atoi(argv[i+3])));
752  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; *argv[i+3]='\0'; i+=3;
753  }
754  else if (strcmp(argv[i],"-clamp_raw_z") == 0)
755  {
756  if ((i+2) >= argc)
757  {
758  fprintf(stderr,"ERROR: '%s' needs 2 arguments: min, max\n", argv[i]);
759  return FALSE;
760  }
762  add_operation(new LASoperationClampRawZ((I32)atoi(argv[i+1]), (I32)atoi(argv[i+2])));
763  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; i+=2;
764  }
765  else if (strcmp(argv[i],"-scale_intensity") == 0)
766  {
767  if ((i+1) >= argc)
768  {
769  fprintf(stderr,"ERROR: '%s' needs 1 argument: scale\n", argv[i]);
770  return FALSE;
771  }
773  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
774  }
775  else if (strcmp(argv[i],"-translate_intensity") == 0)
776  {
777  if ((i+1) >= argc)
778  {
779  fprintf(stderr,"ERROR: '%s' needs 1 argument: offset\n", argv[i]);
780  return FALSE;
781  }
783  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
784  }
785  else if (strcmp(argv[i],"-translate_then_scale_intensity") == 0)
786  {
787  if ((i+2) >= argc)
788  {
789  fprintf(stderr,"ERROR: '%s' needs 2 arguments: offset scale\n", argv[i]);
790  return FALSE;
791  }
792  add_operation(new LASoperationTranslateThenScaleIntensity((F32)atof(argv[i+1]), (F32)atof(argv[i+2])));
793  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; i+=2;
794  }
795  else if (strcmp(argv[i],"-scale_scan_angle") == 0)
796  {
797  if ((i+1) >= argc)
798  {
799  fprintf(stderr,"ERROR: '%s' needs 1 argument: scale\n", argv[i]);
800  return FALSE;
801  }
803  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
804  }
805  else if (strcmp(argv[i],"-translate_scan_angle") == 0)
806  {
807  if ((i+1) >= argc)
808  {
809  fprintf(stderr,"ERROR: '%s' needs 1 argument: offset\n", argv[i]);
810  return FALSE;
811  }
813  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
814  }
815  else if (strcmp(argv[i],"-translate_then_scale_scan_angle") == 0)
816  {
817  if ((i+2) >= argc)
818  {
819  fprintf(stderr,"ERROR: '%s' needs 2 arguments: offset scale\n", argv[i]);
820  return FALSE;
821  }
822  add_operation(new LASoperationTranslateThenScaleScanAngle((F32)atof(argv[i+1]), (F32)atof(argv[i+2])));
823  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; i+=2;
824  }
825  else if (strcmp(argv[i],"-change_classification_from_to") == 0)
826  {
827  if ((i+2) >= argc)
828  {
829  fprintf(stderr,"ERROR: '%s' needs 2 arguments: from_class to_class\n", argv[i]);
830  return FALSE;
831  }
832  add_operation(new LASoperationChangeClassificationFromTo((U8)atoi(argv[i+1]), (U8)atoi(argv[i+2])));
833  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; i+=2;
834  }
835  else if (strcmp(argv[i],"-change_point_source_from_to") == 0)
836  {
837  if ((i+2) >= argc)
838  {
839  fprintf(stderr,"ERROR: '%s' needs 2 arguments: from_psid to_psid\n", argv[i]);
840  return FALSE;
841  }
842  add_operation(new LASoperationChangePointSourceFromTo((U16)atoi(argv[i+1]), (U16)atoi(argv[i+2])));
843  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; i+=2;
844  }
845  else if (strcmp(argv[i],"-repair_zero_returns") == 0)
846  {
848  *argv[i]='\0';
849  }
850  else if (strcmp(argv[i],"-change_return_number_from_to") == 0)
851  {
852  if ((i+2) >= argc)
853  {
854  fprintf(stderr,"ERROR: '%s' needs 2 arguments: from_return_number to_return_number\n", argv[i]);
855  return FALSE;
856  }
857  add_operation(new LASoperationChangeReturnNumberFromTo((U8)atoi(argv[i+1]), (U8)atoi(argv[i+2])));
858  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; i+=2;
859  }
860  else if (strcmp(argv[i],"-change_number_of_returns_from_to") == 0)
861  {
862  if ((i+2) >= argc)
863  {
864  fprintf(stderr,"ERROR: '%s' needs 2 arguments: from_number_of_returns to_number_of_returns\n", argv[i]);
865  return FALSE;
866  }
867  add_operation(new LASoperationChangeNumberOfReturnsFromTo((U8)atoi(argv[i+1]), (U8)atoi(argv[i+2])));
868  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; i+=2;
869  }
870  else if (strcmp(argv[i],"-translate_gps_time") == 0)
871  {
872  if ((i+1) >= argc)
873  {
874  fprintf(stderr,"ERROR: '%s' needs 1 argument: offset\n", argv[i]);
875  return FALSE;
876  }
878  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
879  }
880  else if (strcmp(argv[i],"-scale_rgb_down") == 0 || strcmp(argv[i],"-scale_rbg_down") == 0)
881  {
883  *argv[i]='\0';
884  }
885  else if (strcmp(argv[i],"-scale_rgb_up") == 0 || strcmp(argv[i],"-scale_rbg_up") == 0)
886  {
888  *argv[i]='\0';
889  }
890  else if (strcmp(argv[i],"-switch_x_y") == 0)
891  {
893  *argv[i]='\0';
894  }
895  else if (strcmp(argv[i],"-switch_x_z") == 0)
896  {
898  *argv[i]='\0';
899  }
900  else if (strcmp(argv[i],"-switch_y_z") == 0)
901  {
903  *argv[i]='\0';
904  }
905  else if (strcmp(argv[i],"-flip_waveform_direction") == 0)
906  {
908  *argv[i]='\0';
909  }
910  }
911  return TRUE;
912 }
913 
915 {
916  U32 i;
917  for (i = 0; i < num_operations; i++) operations[i]->transform(point);
918 }
919 
921 {
923  alloc_operations = 0;
924  num_operations = 0;
925  operations = 0;
926 }
927 
929 {
930  if (operations) clean();
931 }
932 
933 void LAStransform::add_operation(LASoperation* transform_operation)
934 {
936  {
937  U32 i;
938  alloc_operations += 16;
939  LASoperation** temp_operations = new LASoperation*[alloc_operations];
940  if (operations)
941  {
942  for (i = 0; i < num_operations; i++)
943  {
944  temp_operations[i] = operations[i];
945  }
946  delete [] operations;
947  }
948  operations = temp_operations;
949  }
950  operations[num_operations] = transform_operation;
951  num_operations++;
952 }
LASoperationScaleXYZ
Definition: lastransform.cpp:124
LASoperationTranslateScanAngle::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:353
LASoperationTranslateScanAngle::offset
F32 offset
Definition: lastransform.cpp:357
lastransform.hpp
LASpoint::set_x
void set_x(const F64 x)
Definition: lasdefinitions.hpp:815
LAStransform::change_coordinates
bool change_coordinates
Definition: lastransform.hpp:50
LAStransform::alloc_operations
U32 alloc_operations
Definition: lastransform.hpp:66
LASoperationScaleZ
Definition: lastransform.cpp:112
LASoperationTranslateX::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:42
LASoperationScaleRGBup::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:448
LASpoint::gps_time
F64 gps_time
Definition: lasdefinitions.hpp:497
LASoperationTranslateThenScaleY::name
const char * name() const
Definition: lastransform.cpp:154
LASoperationTranslateIntensity::name
const char * name() const
Definition: lastransform.cpp:312
LASoperationTranslateZ::LASoperationTranslateZ
LASoperationTranslateZ(F64 offset)
Definition: lastransform.cpp:69
LASpoint::scan_angle_rank
I8 scan_angle_rank
Definition: lasdefinitions.hpp:487
LASoperationFlipWaveformDirection
Definition: lastransform.cpp:472
LASoperationTranslateThenScaleY
Definition: lastransform.cpp:151
LAStransform::add_operation
void add_operation(LASoperation *operation)
Definition: lastransform.cpp:933
LASoperationSwitchXY
Definition: lastransform.cpp:451
LASoperationClampZmax::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:224
LASoperationTranslateThenScaleZ::name
const char * name() const
Definition: lastransform.cpp:167
LASoperationChangeNumberOfReturnsFromTo::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:420
LASoperationTranslateXYZ::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:78
LASoperationTranslateThenScaleScanAngle::offset
F32 offset
Definition: lastransform.cpp:370
LAStransform::~LAStransform
~LAStransform()
Definition: lastransform.cpp:928
LASoperationTranslateRawXYZ::name
const char * name() const
Definition: lastransform.cpp:272
LASoperationTranslateThenScaleX::LASoperationTranslateThenScaleX
LASoperationTranslateThenScaleX(F64 offset, F64 scale_factor)
Definition: lastransform.cpp:145
LASpoint
Definition: lasdefinitions.hpp:472
LASpoint::point_source_ID
U16 point_source_ID
Definition: lasdefinitions.hpp:489
LASoperationScaleScanAngle::LASoperationScaleScanAngle
LASoperationScaleScanAngle(F32 scale)
Definition: lastransform.cpp:344
LASpoint::set_y
void set_y(const F64 y)
Definition: lasdefinitions.hpp:816
LASoperationClampZ::max
F64 max
Definition: lastransform.cpp:204
LASoperationRotateXY::cos_angle
F64 cos_angle
Definition: lastransform.cpp:190
LASoperationScaleIntensity::LASoperationScaleIntensity
LASoperationScaleIntensity(F32 scale)
Definition: lastransform.cpp:304
LASoperationScaleY::name
const char * name() const
Definition: lastransform.cpp:103
LASoperationChangeReturnNumberFromTo::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:409
LASoperationClampZmin::name
const char * name() const
Definition: lastransform.cpp:210
LASoperationTranslateX::LASoperationTranslateX
LASoperationTranslateX(F64 offset)
Definition: lastransform.cpp:45
LASoperationTranslateZ
Definition: lastransform.cpp:62
LASoperationChangePointSourceFromTo::LASoperationChangePointSourceFromTo
LASoperationChangePointSourceFromTo(U16 psid_from, U16 psid_to)
Definition: lastransform.cpp:392
F64
double F64
Definition: mydefs.hpp:52
LASoperationClampRawZ::max
I32 max
Definition: lastransform.cpp:293
LASoperationTranslateThenScaleScanAngle::scale
F32 scale
Definition: lastransform.cpp:373
LASoperationTranslateGpsTime::name
const char * name() const
Definition: lastransform.cpp:430
LASoperationRotateXY
Definition: lastransform.cpp:177
LASoperationTranslateIntensity
Definition: lastransform.cpp:309
I32
int I32
Definition: mydefs.hpp:35
LASoperationScaleX::name
const char * name() const
Definition: lastransform.cpp:91
LASoperationClampRawZ::LASoperationClampRawZ
LASoperationClampRawZ(I32 min, I32 max)
Definition: lastransform.cpp:291
LASoperationChangeClassificationFromTo
Definition: lastransform.cpp:376
LAStransform::usage
void usage() const
Definition: lastransform.cpp:493
LASoperationChangePointSourceFromTo::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:391
LASoperationFlipWaveformDirection::name
const char * name() const
Definition: lastransform.cpp:475
LASoperationChangeReturnNumberFromTo::return_number_to
U8 return_number_to
Definition: lastransform.cpp:413
LASpoint::wavepacket
LASwavepacket wavepacket
Definition: lasdefinitions.hpp:499
LASoperationTranslateRawZ::offset
I32 offset
Definition: lastransform.cpp:264
TRUE
#define TRUE
Definition: mydefs.hpp:137
LASoperationTranslateIntensity::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:313
LASoperationSwitchXZ::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:462
LASoperationTranslateRawXYZ::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:273
LASoperationTranslateXYZ::LASoperationTranslateXYZ
LASoperationTranslateXYZ(F64 x_offset, F64 y_offset, F64 z_offset)
Definition: lastransform.cpp:83
LASoperationScaleX::LASoperationScaleX
LASoperationScaleX(F64 scale)
Definition: lastransform.cpp:95
LASoperationTranslateRawX::offset
I32 offset
Definition: lastransform.cpp:240
LASoperationScaleXYZ::name
const char * name() const
Definition: lastransform.cpp:127
LASoperationScaleX::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:92
LASoperationTranslateThenScaleZ
Definition: lastransform.cpp:164
LASoperationRotateXY::y_offset
F64 y_offset
Definition: lastransform.cpp:189
LASoperationChangeNumberOfReturnsFromTo::number_of_returns_from
U8 number_of_returns_from
Definition: lastransform.cpp:421
LASoperationScaleRGBdown::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:441
LASoperationChangePointSourceFromTo::psid_from
U16 psid_from
Definition: lastransform.cpp:392
LASoperationTranslateThenScaleIntensity::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:326
LASoperationClampZmin::min
F64 min
Definition: lastransform.cpp:215
LASoperationScaleRGBdown
Definition: lastransform.cpp:437
LASoperationTranslateThenScaleScanAngle::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:366
LASoperationTranslateIntensity::LASoperationTranslateIntensity
LASoperationTranslateIntensity(F32 offset)
Definition: lastransform.cpp:317
LASoperationTranslateThenScaleScanAngle::name
const char * name() const
Definition: lastransform.cpp:365
LASoperationScaleIntensity::name
const char * name() const
Definition: lastransform.cpp:299
LASwavepacket::flipDirection
void flipDirection()
Definition: lasdefinitions.hpp:84
LASoperationTranslateIntensity::offset
F32 offset
Definition: lastransform.cpp:317
LASoperationTranslateZ::offset
F64 offset
Definition: lastransform.cpp:69
LASoperationChangeClassificationFromTo::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:380
LASoperationChangeClassificationFromTo::name
const char * name() const
Definition: lastransform.cpp:379
LASpoint::y
I32 y
Definition: lasdefinitions.hpp:479
LASoperationClampZ
Definition: lastransform.cpp:193
LASpoint::classification
U8 classification
Definition: lasdefinitions.hpp:486
LASpoint::rgb
U16 rgb[4]
Definition: lasdefinitions.hpp:498
LASpoint::set_z
void set_z(const F64 z)
Definition: lasdefinitions.hpp:817
LASoperationTranslateY::LASoperationTranslateY
LASoperationTranslateY(F64 offset)
Definition: lastransform.cpp:57
LASoperationTranslateXYZ::offset
F64 offset[3]
Definition: lastransform.cpp:83
LASoperationTranslateGpsTime::offset
F64 offset
Definition: lastransform.cpp:432
LASoperationChangeClassificationFromTo::class_from
U8 class_from
Definition: lastransform.cpp:381
LASoperationTranslateThenScaleY::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:155
LASoperationScaleY::scale
F64 scale
Definition: lastransform.cpp:107
LASoperationTranslateThenScaleIntensity::offset
F32 offset
Definition: lastransform.cpp:330
LASoperationTranslateZ::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:66
LASpoint::return_number
U8 return_number
Definition: lasdefinitions.hpp:482
LASoperationRotateXY::LASoperationRotateXY
LASoperationRotateXY(F64 angle, F64 x_offset, F64 y_offset)
Definition: lastransform.cpp:187
LASoperationTranslateX::offset
F64 offset
Definition: lastransform.cpp:45
LASoperationTranslateGpsTime
Definition: lastransform.cpp:427
LASoperationChangePointSourceFromTo
Definition: lastransform.cpp:387
LASoperationTranslateGpsTime::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:431
I32_QUANTIZE
#define I32_QUANTIZE(n)
Definition: mydefs.hpp:111
LASoperationTranslateRawX::LASoperationTranslateRawX
LASoperationTranslateRawX(I32 offset)
Definition: lastransform.cpp:240
LASoperationTranslateRawZ
Definition: lastransform.cpp:257
LASoperationChangeClassificationFromTo::LASoperationChangeClassificationFromTo
LASoperationChangeClassificationFromTo(U8 class_from, U8 class_to)
Definition: lastransform.cpp:381
LASoperationTranslateZ::name
const char * name() const
Definition: lastransform.cpp:65
LASoperationTranslateThenScaleX::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:142
LASoperationRotateXY::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:181
LASoperationScaleX
Definition: lastransform.cpp:88
LASoperationTranslateThenScaleY::offset
F64 offset
Definition: lastransform.cpp:158
LASoperationTranslateRawX::name
const char * name() const
Definition: lastransform.cpp:236
LASoperationScaleScanAngle::name
const char * name() const
Definition: lastransform.cpp:339
LASoperationScaleRGBdown::name
const char * name() const
Definition: lastransform.cpp:440
LASoperationClampZmin
Definition: lastransform.cpp:207
LASoperationClampZ::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:197
LASoperationSwitchYZ
Definition: lastransform.cpp:465
LASpoint::get_y
F64 get_y() const
Definition: lasdefinitions.hpp:812
LASoperationClampZ::name
const char * name() const
Definition: lastransform.cpp:196
LASoperationClampRawZ
Definition: lastransform.cpp:283
LASoperationTranslateRawY::offset
I32 offset
Definition: lastransform.cpp:252
LASoperationChangeNumberOfReturnsFromTo::number_of_returns_to
U8 number_of_returns_to
Definition: lastransform.cpp:424
LASoperationChangeClassificationFromTo::class_to
U8 class_to
Definition: lastransform.cpp:384
LASoperationChangeNumberOfReturnsFromTo
Definition: lastransform.cpp:416
LASoperationClampRawZ::name
const char * name() const
Definition: lastransform.cpp:286
LASoperationChangePointSourceFromTo::name
const char * name() const
Definition: lastransform.cpp:390
LAStransform::parse
BOOL parse(int argc, char *argv[])
Definition: lastransform.cpp:530
LASoperationScaleXYZ::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:128
LASoperationScaleScanAngle::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:340
U16
unsigned short U16
Definition: mydefs.hpp:40
LAStransform::LAStransform
LAStransform()
Definition: lastransform.cpp:920
LASoperationTranslateRawY::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:249
LASoperationTranslateThenScaleIntensity::LASoperationTranslateThenScaleIntensity
LASoperationTranslateThenScaleIntensity(F32 offset, F32 scale)
Definition: lastransform.cpp:330
LASoperationRotateXY::x_offset
F64 x_offset
Definition: lastransform.cpp:187
LASoperationTranslateXYZ::name
const char * name() const
Definition: lastransform.cpp:77
LASoperationChangeReturnNumberFromTo::LASoperationChangeReturnNumberFromTo
LASoperationChangeReturnNumberFromTo(U8 return_number_from, U8 return_number_to)
Definition: lastransform.cpp:410
LASoperationTranslateScanAngle::LASoperationTranslateScanAngle
LASoperationTranslateScanAngle(F32 offset)
Definition: lastransform.cpp:357
LASoperationTranslateY::name
const char * name() const
Definition: lastransform.cpp:53
LASoperationTranslateThenScaleIntensity
Definition: lastransform.cpp:322
LASoperationChangeNumberOfReturnsFromTo::name
const char * name() const
Definition: lastransform.cpp:419
LASoperationScaleIntensity
Definition: lastransform.cpp:296
LASoperationRepairZeroReturns::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:402
LASoperationScaleZ::scale
F64 scale
Definition: lastransform.cpp:119
LASoperationTranslateRawY::LASoperationTranslateRawY
LASoperationTranslateRawY(I32 offset)
Definition: lastransform.cpp:252
LASoperationTranslateThenScaleScanAngle
Definition: lastransform.cpp:362
LAStransform::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:914
LASoperationScaleIntensity::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:300
LASoperationTranslateRawXYZ
Definition: lastransform.cpp:269
LASoperationScaleXYZ::scale
F64 scale[3]
Definition: lastransform.cpp:133
LASoperationClampRawZ::min
I32 min
Definition: lastransform.cpp:291
LASoperationClampRawZ::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:287
LASoperationScaleScanAngle::scale
F32 scale
Definition: lastransform.cpp:344
U8
unsigned char U8
Definition: mydefs.hpp:41
BOOL
int BOOL
Definition: mydefs.hpp:57
LASoperationTranslateThenScaleX::offset
F64 offset
Definition: lastransform.cpp:145
LASpoint::z
I32 z
Definition: lasdefinitions.hpp:480
LASoperationTranslateThenScaleZ::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:168
LASoperationClampZmin::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:211
argc
int argc
Definition: tests_high_five_parallel.cpp:27
I8_CLAMP
#define I8_CLAMP(n)
Definition: mydefs.hpp:96
LASoperationClampZmax
Definition: lastransform.cpp:220
LASoperationTranslateScanAngle::name
const char * name() const
Definition: lastransform.cpp:352
LASoperationTranslateRawXYZ::offset
I32 offset[3]
Definition: lastransform.cpp:278
FALSE
#define FALSE
Definition: mydefs.hpp:133
LASoperationTranslateRawY
Definition: lastransform.cpp:245
LASoperationTranslateThenScaleZ::scale
F64 scale
Definition: lastransform.cpp:174
F32
float F32
Definition: mydefs.hpp:51
LASoperationScaleScanAngle
Definition: lastransform.cpp:336
LASoperationChangeReturnNumberFromTo::name
const char * name() const
Definition: lastransform.cpp:408
LASoperationSwitchXY::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:455
LASoperationTranslateThenScaleZ::LASoperationTranslateThenScaleZ
LASoperationTranslateThenScaleZ(F64 offset, F64 scale)
Definition: lastransform.cpp:171
LASoperationTranslateRawX::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:237
LASoperationScaleZ::LASoperationScaleZ
LASoperationScaleZ(F64 scale)
Definition: lastransform.cpp:119
LASoperationRotateXY::name
const char * name() const
Definition: lastransform.cpp:180
LASoperationClampZmax::name
const char * name() const
Definition: lastransform.cpp:223
LASoperationFlipWaveformDirection::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:476
LASoperationTranslateY::offset
F64 offset
Definition: lastransform.cpp:57
LASoperationTranslateThenScaleX::scale
F64 scale
Definition: lastransform.cpp:148
LASoperationClampZmin::LASoperationClampZmin
LASoperationClampZmin(F64 min)
Definition: lastransform.cpp:215
LASoperationTranslateThenScaleScanAngle::LASoperationTranslateThenScaleScanAngle
LASoperationTranslateThenScaleScanAngle(F32 offset, F32 scale)
Definition: lastransform.cpp:370
LASoperationTranslateX
Definition: lastransform.cpp:38
LASoperationTranslateThenScaleY::scale
F64 scale
Definition: lastransform.cpp:161
LASoperationSwitchXZ::name
const char * name() const
Definition: lastransform.cpp:461
LASpoint::number_of_returns_of_given_pulse
U8 number_of_returns_of_given_pulse
Definition: lasdefinitions.hpp:483
LASoperationScaleY::LASoperationScaleY
LASoperationScaleY(F64 scale)
Definition: lastransform.cpp:107
LAStransform::clean
void clean()
Definition: lastransform.cpp:479
LASoperationTranslateRawXYZ::LASoperationTranslateRawXYZ
LASoperationTranslateRawXYZ(I32 x_offset, I32 y_offset, I32 z_offset)
Definition: lastransform.cpp:278
LASoperation
Definition: lastransform.hpp:38
LASoperationClampZmax::max
F64 max
Definition: lastransform.cpp:228
LASoperationScaleZ::name
const char * name() const
Definition: lastransform.cpp:115
LASoperationTranslateThenScaleX::name
const char * name() const
Definition: lastransform.cpp:141
LASoperationScaleRGBup::name
const char * name() const
Definition: lastransform.cpp:447
U32
unsigned int U32
Definition: mydefs.hpp:39
LASoperationTranslateX::name
const char * name() const
Definition: lastransform.cpp:41
LAStransform::num_operations
U32 num_operations
Definition: lastransform.hpp:65
U16_CLAMP
#define U16_CLAMP(n)
Definition: mydefs.hpp:100
LASoperationScaleY
Definition: lastransform.cpp:100
LASpoint::x
I32 x
Definition: lasdefinitions.hpp:478
LASoperationChangeNumberOfReturnsFromTo::LASoperationChangeNumberOfReturnsFromTo
LASoperationChangeNumberOfReturnsFromTo(U8 number_of_returns_from, U8 number_of_returns_to)
Definition: lastransform.cpp:421
LASoperationChangeReturnNumberFromTo::return_number_from
U8 return_number_from
Definition: lastransform.cpp:410
LASpoint::get_z
F64 get_z() const
Definition: lasdefinitions.hpp:813
LASoperationTranslateThenScaleY::LASoperationTranslateThenScaleY
LASoperationTranslateThenScaleY(F64 offset, F64 scale)
Definition: lastransform.cpp:158
LASoperationTranslateThenScaleX
Definition: lastransform.cpp:138
LASoperationSwitchXZ
Definition: lastransform.cpp:458
LAStransform::operations
LASoperation ** operations
Definition: lastransform.hpp:67
LASoperationRepairZeroReturns
Definition: lastransform.cpp:398
LASpoint::get_x
F64 get_x() const
Definition: lasdefinitions.hpp:811
LASoperationSwitchYZ::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:469
LASoperationSwitchYZ::name
const char * name() const
Definition: lastransform.cpp:468
LASoperationTranslateRawX
Definition: lastransform.cpp:233
LASoperationTranslateRawZ::name
const char * name() const
Definition: lastransform.cpp:260
LASoperationChangeReturnNumberFromTo
Definition: lastransform.cpp:405
LASoperationTranslateThenScaleIntensity::name
const char * name() const
Definition: lastransform.cpp:325
LASoperationTranslateScanAngle
Definition: lastransform.cpp:349
LASoperationClampZmax::LASoperationClampZmax
LASoperationClampZmax(F64 max)
Definition: lastransform.cpp:228
LASoperationTranslateRawZ::LASoperationTranslateRawZ
LASoperationTranslateRawZ(I32 offset)
Definition: lastransform.cpp:264
argv
char ** argv
Definition: tests_high_five_parallel.cpp:28
LASoperationRotateXY::sin_angle
F64 sin_angle
Definition: lastransform.cpp:190
LASoperationTranslateThenScaleZ::offset
F64 offset
Definition: lastransform.cpp:171
LASoperationScaleX::scale
F64 scale
Definition: lastransform.cpp:95
LASoperationChangePointSourceFromTo::psid_to
U16 psid_to
Definition: lastransform.cpp:395
LASoperationClampZ::min
F64 min
Definition: lastransform.cpp:202
LASoperationScaleY::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:104
LASoperationTranslateThenScaleIntensity::scale
F32 scale
Definition: lastransform.cpp:333
LASoperationTranslateRawZ::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:261
LASoperationClampZ::LASoperationClampZ
LASoperationClampZ(F64 min, F64 max)
Definition: lastransform.cpp:202
LASoperationTranslateGpsTime::LASoperationTranslateGpsTime
LASoperationTranslateGpsTime(F64 offset)
Definition: lastransform.cpp:432
LASoperationTranslateY
Definition: lastransform.cpp:50
LASoperationTranslateRawY::name
const char * name() const
Definition: lastransform.cpp:248
LASoperationScaleIntensity::scale
F32 scale
Definition: lastransform.cpp:304
LASoperationScaleXYZ::LASoperationScaleXYZ
LASoperationScaleXYZ(F64 x_scale, F64 y_scale, F64 z_scale)
Definition: lastransform.cpp:133
LASoperationRepairZeroReturns::name
const char * name() const
Definition: lastransform.cpp:401
LASoperationScaleRGBup
Definition: lastransform.cpp:444
LASoperationTranslateY::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:54
LASoperationSwitchXY::name
const char * name() const
Definition: lastransform.cpp:454
LASoperationTranslateXYZ
Definition: lastransform.cpp:74
LASpoint::intensity
U16 intensity
Definition: lasdefinitions.hpp:481
LASoperationScaleZ::transform
void transform(LASpoint *point) const
Definition: lastransform.cpp:116


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:23