aimsalgo 6.0.0
Neuroimaging image processing
clusterArg.h
Go to the documentation of this file.
1/* This software and supporting documentation are distributed by
2 * Institut Federatif de Recherche 49
3 * CEA/NeuroSpin, Batiment 145,
4 * 91191 Gif-sur-Yvette cedex
5 * France
6 *
7 * This software is governed by the CeCILL-B license under
8 * French law and abiding by the rules of distribution of free software.
9 * You can use, modify and/or redistribute the software under the
10 * terms of the CeCILL-B license as circulated by CEA, CNRS
11 * and INRIA at the following URL "http://www.cecill.info".
12 *
13 * As a counterpart to the access to the source code and rights to copy,
14 * modify and redistribute granted by the license, users are provided only
15 * with a limited warranty and the software's author, the holder of the
16 * economic rights, and the successive licensors have only limited
17 * liability.
18 *
19 * In this respect, the user's attention is drawn to the risks associated
20 * with loading, using, modifying and/or developing or reproducing the
21 * software by the user in light of its specific status of free software,
22 * that may mean that it is complicated to manipulate, and that also
23 * therefore means that it is reserved for developers and experienced
24 * professionals having in-depth computer knowledge. Users are therefore
25 * encouraged to load and test the software's suitability as regards their
26 * requirements in conditions enabling the security of their systems and/or
27 * data to be ensured and, more generally, to use and operate it in the
28 * same conditions as regards security.
29 *
30 * The fact that you are presently reading this means that you have had
31 * knowledge of the CeCILL-B license and that you accept its terms.
32 */
33
34
35#ifndef AIMS_ROI_CLUSTERARG_H
36#define AIMS_ROI_CLUSTERARG_H
37
38#include <cartodata/volume/volume.h>
39#include <aims/connectivity/connectivity.h>
40#include <float.h>
41
42class Graph;
43
44namespace aims
45{
46
48 {
49 public:
50 ClusterArgMaker( const std::string & outfilename, Connectivity::Type conn
52 int minsz = 0, const std::string & mtxfile = "",
53 bool mkmesh = true, float maxclear = 5.,
54 float maxerr = 0.1, uint minfac = 50, bool bin = false,
55 float low = -FLT_MAX, float up = FLT_MAX );
57
58 void setFilename( const std::string & n ) { _fileout = n; }
59 std::string filename() const { return( _fileout ); }
60 void setConnectivity( Connectivity::Type conn ) { _connectivity = conn; }
61 Connectivity::Type connectivity() const { return( _connectivity ); }
62 void setMinClusterSize( int sz ) { _minsize = sz; }
63 int minClusterSize() const { return( _minsize ); }
64 void setTransformationFilename( const std::string & mtxfile )
65 { _matrix = mtxfile; }
66 std::string transformationFilename() const { return( _matrix); }
67 void setMeshFlag( bool x ) { _domesh = x; }
68 bool meshFlag() const { return( _domesh ); }
69 void setDecimationMaxClearance( float x ) { _deciMaxClearance = x; }
70 float decimationMaxClearance() const { return( _deciMaxClearance ); }
71 void setDecimationMaxError( float x ) { _deciMaxError = x; }
72 float decimationMaxError() const { return( _deciMaxError ); }
73 void setMinFacetNumber( uint x ) { _minFacetNumber = x; }
74 uint minFacetNumber() const { return( _minFacetNumber ); }
75 void setBinarize( bool x ) { _binarize = x; }
76 bool binarize() const { return( _binarize ); }
77 void setLowThreshold( float x ) { _lowth = x; }
78 float lowThreshold() const { return( _lowth ); }
79 void setUpperThershold( float x ) { _upth = x; }
80 float upperThreshold() const { return( _upth ); }
81
82 template<typename T> void make(
83 Graph & gr, const carto::rc_ptr<carto::Volume<T> > & data );
84
85 private:
86 std::string _fileout;
87 Connectivity::Type _connectivity;
88 int _minsize;
89 std::string _matrix;
90 bool _domesh;
91 float _deciMaxClearance;
92 float _deciMaxError;
93 uint _minFacetNumber;
94 bool _binarize;
95 float _lowth;
96 float _upth;
97 };
98
99}
100
101
102#endif
std::string filename() const
Definition clusterArg.h:59
void setConnectivity(Connectivity::Type conn)
Definition clusterArg.h:60
void setUpperThershold(float x)
Definition clusterArg.h:79
float decimationMaxClearance() const
Definition clusterArg.h:70
std::string transformationFilename() const
Definition clusterArg.h:66
bool meshFlag() const
Definition clusterArg.h:68
void setFilename(const std::string &n)
Definition clusterArg.h:58
void setTransformationFilename(const std::string &mtxfile)
Definition clusterArg.h:64
int minClusterSize() const
Definition clusterArg.h:63
void setMeshFlag(bool x)
Definition clusterArg.h:67
Connectivity::Type connectivity() const
Definition clusterArg.h:61
void setDecimationMaxClearance(float x)
Definition clusterArg.h:69
void setBinarize(bool x)
Definition clusterArg.h:75
void setDecimationMaxError(float x)
Definition clusterArg.h:71
ClusterArgMaker(const std::string &outfilename, Connectivity::Type conn=Connectivity::CONNECTIVITY_18_XYZ, int minsz=0, const std::string &mtxfile="", bool mkmesh=true, float maxclear=5., float maxerr=0.1, uint minfac=50, bool bin=false, float low=-FLT_MAX, float up=FLT_MAX)
float lowThreshold() const
Definition clusterArg.h:78
float decimationMaxError() const
Definition clusterArg.h:72
void setMinFacetNumber(uint x)
Definition clusterArg.h:73
bool binarize() const
Definition clusterArg.h:76
void setLowThreshold(float x)
Definition clusterArg.h:77
void make(Graph &gr, const carto::rc_ptr< carto::Volume< T > > &data)
uint minFacetNumber() const
Definition clusterArg.h:74
float upperThreshold() const
Definition clusterArg.h:80
void setMinClusterSize(int sz)
Definition clusterArg.h:62
unsigned int uint