iRoCS Toolbox  1.1.0
lrootShapeAnalysis.hh
Go to the documentation of this file.
1 /**************************************************************************
2  *
3  * Copyright (C) 2015 Kun Liu, Thorsten Falk
4  *
5  * Image Analysis Lab, University of Freiburg, Germany
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software Foundation,
19  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  *
21  **************************************************************************/
22 
23 /*
24  * lrootShapeAnalysis.h
25  *
26  * Created on: Nov 4, 2010
27  * Author: liu
28  */
29 
30 #ifndef LROOTANALYSIS_H_
31 #define LROOTANALYSIS_H_
32 
33 #ifdef HAVE_CONFIG_H
34 #include <config.hh>
35 #endif
36 
37 #include <blitz/array.h>
38 
39 /*======================================================================*/
51 /*======================================================================*/
52 void volume(
53  blitz::Array<int,3> const &label, blitz::Array<double,1> &volume,
54  int maxLabel = -1);
55 
56 
57 /*======================================================================*/
75 /*======================================================================*/
76 void centerAndVolume(
77  blitz::Array<int,3> const &label,
78  blitz::Array<blitz::TinyVector<double,3>,1> &center,
79  blitz::Array<double,1> &volume, int maxLabel,
80  blitz::TinyVector<double,3> const &elSize);
81 
82 /*======================================================================*/
96 /*======================================================================*/
97 void eraseMarkers(
98  blitz::Array<int,3> const &L, blitz::Array<bool,3> &marker,
99  blitz::Array<bool,1> const &flagTooSmall);
100 
101 void labelOnBorder(
102  blitz::Array<int,3> const &L, blitz::Array<unsigned char,1> &validFlag);
103 
104 #endif
void centerAndVolume(blitz::Array< int, 3 > const &label, blitz::Array< blitz::TinyVector< double, 3 >, 1 > &center, blitz::Array< double, 1 > &volume, int maxLabel, blitz::TinyVector< double, 3 > const &elSize)
Compute the volume in um^3 and center of gravity per intensity in the given integer volume...
void volume(blitz::Array< int, 3 > const &label, blitz::Array< double, 1 > &volume, int maxLabel=-1)
Compute the number of voxels per intensity in the given integer volume.
void eraseMarkers(blitz::Array< int, 3 > const &L, blitz::Array< bool, 3 > &marker, blitz::Array< bool, 1 > const &flagTooSmall)
Set the marker flag for each voxel, that is part of a segment that is not marked as too small in the ...
void labelOnBorder(blitz::Array< int, 3 > const &L, blitz::Array< unsigned char, 1 > &validFlag)