~ubuntu-branches/ubuntu/trusty/3depict/trusty

« back to all changes in this revision

Viewing changes to src/filter.cpp

  • Committer: Package Import Robot
  • Author(s): D Haley
  • Date: 2011-12-18 19:33:32 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20111218193332-1motgr3vg9xeh41b
Tags: 0.0.9-1
* Update to upstream 0.0.9 
* Close powerpc bug fixed by 0.0.8-1 (Closes: #655682) 
* Close mgl font parsing bug fixed by mathgl upstream (Closes: #623431)
* Fix unclean source package (Closes: #643039)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 *      filter.h - modular data filter implementation 
3
 
 *      Copyright (C) 2010, D Haley 
 
3
 *      Copyright (C) 2011, D Haley 
4
4
 
5
5
 *      This program is free software: you can redistribute it and/or modify
6
6
 *      it under the terms of the GNU General Public License as published by
52
52
                                NTRANS("Range"),
53
53
                                NTRANS("Voxel")};
54
54
 
 
55
//Internal names for each filter
55
56
const char *FILTER_NAMES[] = { "posload",
56
57
                                "iondownsample",
57
58
                                "rangefile",
65
66
                                "spatialanalysis",
66
67
                                "clusteranalysis",
67
68
                                "voxelise",
68
 
                                "ioninfo"
 
69
                                "ioninfo",
 
70
                                "annotation"
69
71
                                };
70
72
 
71
73
void updateFilterPropertyGrid(wxPropertyGrid *g, const Filter *f)
175
177
        return true;
176
178
}
177
179
 
178
 
size_t numElements(const vector<const FilterStreamData *> &v, int mask)
 
180
size_t numElements(const vector<const FilterStreamData *> &v, unsigned int mask)
179
181
{
180
182
        size_t nE=0;
181
183
        for(unsigned int ui=0;ui<v.size();ui++)
182
184
        {
183
185
                if((v[ui]->getStreamType() & mask))
184
 
                        nE+=v[ui]->GetNumBasicObjects();
 
186
                        nE+=v[ui]->getNumBasicObjects();
185
187
        }
186
188
 
187
189
        return nE;
201
203
 
202
204
unsigned int getIonstreamIonID(const IonStreamData *d, const RangeFile *r)
203
205
{
204
 
        if(!d->data.size())
 
206
        if(d->data.empty())
205
207
                return (unsigned int)-1;
206
208
 
207
209
        unsigned int tentativeRange;
317
319
        clear();
318
320
}
319
321
 
 
322
PlotStreamData::PlotStreamData()
 
323
{
 
324
        streamType=STREAM_TYPE_PLOT;
 
325
        plotType=PLOT_TRACE_LINES;
 
326
        errDat.mode=PLOT_ERROR_NONE;
 
327
        r=1.0,g=0.0,b=0.0,a=1.0;
 
328
        logarithmic=false;
 
329
        index=(unsigned int)-1;
 
330
 
 
331
        hardMinX=hardMinY=-std::numeric_limits<float>::max();
 
332
        hardMaxX=hardMaxY=std::numeric_limits<float>::max();
 
333
}
 
334
 
320
335
Filter::Filter()
321
336
{
322
337
        cacheOK=false;
405
420
}
406
421
 
407
422
 
 
423