本文整理汇总了C++中ModelObject::SetDebugLevel方法的典型用法代码示例。如果您正苦于以下问题:C++ ModelObject::SetDebugLevel方法的具体用法?C++ ModelObject::SetDebugLevel怎么用?C++ ModelObject::SetDebugLevel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModelObject
的用法示例。
在下文中一共展示了ModelObject::SetDebugLevel方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
// Reminder: nColumns = n_pixels_per_row
// Reminder: nRows = n_pixels_per_column
printf("Reference image read: naxis1 [# rows] = %d, naxis2 [# columns] = %d\n",
nRows, nColumns);
}
else {
nColumns = options.nColumns;
nRows = options.nRows;
}
nPixels_tot = nColumns * nRows;
/* Read in PSF image, if supplied */
if (options.psfImagePresent) {
printf("Reading PSF image (\"%s\") ...\n", options.psfFileName.c_str());
psfPixels = ReadImageAsVector(options.psfFileName, &nColumns_psf, &nRows_psf);
if (psfPixels == NULL) {
fprintf(stderr, "\n*** ERROR: Unable to read PSF image file \"%s\"!\n\n",
options.psfFileName.c_str());
exit(-1);
}
nPixels_psf = nColumns_psf * nRows_psf;
printf("naxis1 [# pixels/row] = %d, naxis2 [# pixels/col] = %d; nPixels_tot = %d\n",
nColumns_psf, nRows_psf, nPixels_psf);
}
else
printf("* No PSF image supplied -- no image convolution will be done!\n");
if (! options.subsamplingFlag)
printf("* Pixel subsampling has been turned OFF.\n");
/* Set up the model object */
theModel = new ModelObject();
theModel->SetDebugLevel(options.debugLevel);
/* Add functions to the model object; also tells model object where function
sets start */
status = AddFunctions(theModel, functionList, functionBlockIndices, options.subsamplingFlag);
if (status < 0) {
fprintf(stderr, "*** ERROR: Failure in AddFunctions!\n\n");
exit(-1);
}
// Add PSF image vector, if present (needs to be added prior to image data, so that
// ModelObject can figure out proper internal model-image size
if (options.psfImagePresent) {
status = theModel->AddPSFVector(nPixels_psf, nColumns_psf, nRows_psf, psfPixels);
if (status < 0) {
fprintf(stderr, "*** ERROR: Failure in ModelObject::AddPSFVector!\n\n");
exit(-1);
}
}
/* Define the size of the requested model image */
theModel->SetupModelImage(nColumns, nRows);
theModel->PrintDescription();
// Set up parameter vector(s), now that we know how many total parameters
// there will be
nParamsTot = theModel->GetNParams();
printf("%d total parameters\n", nParamsTot);
if (nParamsTot != (int)parameterList.size()) {
fprintf(stderr, "*** ERROR: number of input parameters (%d) does not equal",
(int)parameterList.size());