2 ***********************************************************
3 $SNARK_Header: S N A R K 1 4 - A PICTURE RECONSTRUCTION PROGRAM $
4 $HeadURL: svn://dig.cs.gc.cuny.edu/snark/trunk/src/snark/basis.cpp $
5 $LastChangedRevision: 85 $
6 $Date: 2014-07-02 16:07:08 -0400 (Wed, 02 Jul 2014) $
8 ***********************************************************
10 basis() establishes the basis function. The basis can be either "blob" or "voronoi". If blob basis, then one should also specify the support of the blob "blob.support", shape of the blob "Blob.shape", and the grid resolution "Blob.delta"
34 static const INTEGER blob = CHAR2INT('b', 'l', 'o', 'b');
35 static const INTEGER pixel = CHAR2INT('p', 'i', 'x', 'e');
37 // modified calls to getwrd() to use the 4-parameter version. Lajos, Dec 13, 2004
38 static const INTEGER basis_codes[2] =
39 { CHAR2INT('b', 'l', 'o', 'b'), CHAR2INT('p', 'i', 'x', 'e') };
41 Blob.pix_basis = TRUE;
46 word = InFile.getwrd(FALSE, &eol, basis_codes, 2);
55 Blob.pix_basis = FALSE;
57 Blob.delta = 2.0 * Consts.isqrt3 * GeoPar.pixsiz;
58 //Blob.delta = 4.0 * Consts.isqrt3 * GeoPar.pixsiz;
59 Blob.shape = 11.2828631556;
60 Blob.support = 1.7865601396 * Blob.delta;
61 //Blob.support = 2 * 1.7865601396 * Blob.delta;
62 aux = InFile.getnum(FALSE, &eol);
66 Blob.shape = InFile.getnum(FALSE, &eol);
70 "\n **** shape of a blob cannot be negative");
71 fprintf(output, "\n **** program aborted\n");
75 //delta = getnum(NULL, &eol);
76 Blob.delta = InFile.getnum(FALSE, &eol);
77 if ((Blob.delta <= Consts.zero)
78 || (Blob.support <= Consts.zero))
81 "\n **** delta and support must be greater than ZERO");
82 fprintf(output, "\n **** program aborted\n");
93 else if (word == pixel)
95 Blob.pix_basis = TRUE;
101 fprintf(output, "\n **** unknown basis %s", int2str(word));
102 fprintf(output, "\n **** program aborted\n");
106 // ECHO OPTION SELECTED
110 fprintf(output, "\n pixel basis");
116 "\n blob basis with parameters: support = %10.4f shape = %10.4f delta = %10.4f",
117 Blob.support, Blob.shape, Blob.delta);