Initial snark14m import
[snark14.git] / src / snark / bbldlst.cpp
1 /*      
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/bbldlst.cpp $
5  $LastChangedRevision: 85 $
6  $Date: 2014-07-02 16:07:08 -0400 (Wed, 02 Jul 2014) $
7  $Author: agulati $
8  ***********************************************************
9
10  THIS SUBROUTINE COMPUTES THE MAXIMAL SIZE OF THE LIST AND WEIGHT
11  ARRAYS NEEDED BY BRAY AND BWRAY.  IT ALLOCATES
12  THE MAXIMUM OF THESE VALUES FOR THE LIST AND WEIGHT ARRAYS.
13  */
14
15 #include <cstdlib>     
16 #include <cstdio>
17
18 #include "blkdta.h"
19 #include "geom.h"
20 #include "blob.h"
21 #include "uiod.h"
22
23 void Blob_class::bbldlst(INTEGER** lbase, REAL** wbase)
24 {
25         INTEGER npts;
26
27         if (GeoPar.strip)
28         {
29                 npts = (INTEGER) (Blob.diag * (2 * GeoPar.pinc / Blob.delta + 1));
30                 // use similar reasoning for the line case for pinc/2 instead of blob.support
31         }
32
33         if (GeoPar.line)
34         {
35                 npts = (INTEGER) (Blob.diag * (4 * Blob.support / Blob.delta + 1));
36         }
37         *lbase = new INTEGER[npts];
38         *wbase = new REAL[npts];
39 }
40