本文整理汇总了C++中LASreadOpener::set_scale_intensity方法的典型用法代码示例。如果您正苦于以下问题:C++ LASreadOpener::set_scale_intensity方法的具体用法?C++ LASreadOpener::set_scale_intensity怎么用?C++ LASreadOpener::set_scale_intensity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LASreadOpener
的用法示例。
在下文中一共展示了LASreadOpener::set_scale_intensity方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char *argv[])
{
int i;
#ifdef COMPILE_WITH_GUI
bool gui = false;
#endif
#ifdef COMPILE_WITH_MULTI_CORE
I32 cores = 1;
#endif
bool verbose = false;
bool projection_was_set = false;
bool quiet = false;
int file_creation_day = -1;
int file_creation_year = -1;
int set_version_major = -1;
int set_version_minor = -1;
int set_classification = -1;
char* set_system_identifier = 0;
char* set_generating_software = 0;
bool set_ogc_wkt = false;
double start_time = 0.0;
LASreadOpener lasreadopener;
GeoProjectionConverter geoprojectionconverter;
LASwriteOpener laswriteopener;
if (argc == 1)
{
#ifdef COMPILE_WITH_GUI
return txt2las_gui(argc, argv, 0);
#else
char file_name[256];
fprintf(stderr,"%s is better run in the command line\n", argv[0]);
fprintf(stderr,"enter input file: "); fgets(file_name, 256, stdin);
file_name[strlen(file_name)-1] = '\0';
lasreadopener.set_file_name(file_name);
fprintf(stderr,"enter output file: "); fgets(file_name, 256, stdin);
file_name[strlen(file_name)-1] = '\0';
laswriteopener.set_file_name(file_name);
#endif
}
else
{
// need to get those before lastransform->parse() routine gets them
for (i = 1; i < argc; i++)
{
if (argv[i][0] == '–') argv[i][0] = '-';
if (strcmp(argv[i],"-scale_intensity") == 0)
{
if ((i+1) >= argc)
{
fprintf(stderr,"ERROR: '%s' needs 1 argument: factor\n", argv[i]);
usage(true);
}
lasreadopener.set_scale_intensity((F32)atof(argv[i+1]));
*argv[i]='\0'; *argv[i+1]='\0'; i+=1;
}
else if (strcmp(argv[i],"-translate_intensity") == 0)
{
if ((i+1) >= argc)
{
fprintf(stderr,"ERROR: '%s' needs 1 argument: offset\n", argv[i]);
usage(true);
}
lasreadopener.set_translate_intensity((F32)atof(argv[i+1]));
*argv[i]='\0'; *argv[i+1]='\0'; i+=1;
}
else if (strcmp(argv[i],"-translate_then_scale_intensity") == 0)
{
if ((i+2) >= argc)
{
fprintf(stderr,"ERROR: '%s' needs 2 arguments: offset factor\n", argv[i]);
usage(true);
}
lasreadopener.set_translate_intensity((F32)atof(argv[i+1]));
lasreadopener.set_scale_intensity((F32)atof(argv[i+2]));
*argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; i+=2;
}
else if (strcmp(argv[i],"-scale_scan_angle") == 0)
{
if ((i+1) >= argc)
{
fprintf(stderr,"ERROR: '%s' needs 1 argument: factor\n", argv[i]);
usage(true);
}
lasreadopener.set_scale_scan_angle((F32)atof(argv[i+1]));
*argv[i]='\0'; *argv[i+1]='\0'; i+=1;
}
}
if (!lasreadopener.parse(argc, argv)) byebye(true);
if (!geoprojectionconverter.parse(argc, argv)) byebye(true);
if (!laswriteopener.parse(argc, argv)) byebye(true);
}
for (i = 1; i < argc; i++)
{
if (argv[i][0] == '\0')
{
continue;
}
//.........这里部分代码省略.........