iRoCS Toolbox  1.1.0
ComputeCellFeaturesWorker.hh
Go to the documentation of this file.
1 /**************************************************************************
2  *
3  * Copyright (C) 2015 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 #ifndef COMPUTECELLFEATURESWORKER_HH
24 #define COMPUTECELLFEATURESWORKER_HH
25 
26 #ifdef HAVE_CONFIG_H
27 #include <config.hh>
28 #endif
29 
30 #include <libArrayToolbox/Array.hh>
32 
34 
35 namespace iRoCS
36 {
37 
38 /***************************************
39  *
40  * @param label
41  * @param center
42  * @param RD one row of RD, 26 columns
43  * @param elSize
44  *
45  * rd(x) = -1, means this direction radius can not be well measured.
46  */
47  void extractRD(
48  atb::Array<int,3> const &L, int label,
49  blitz::TinyVector<double,3> const &center,
50  blitz::TinyMatrix<double,3,3> const &axes,
51  blitz::TinyVector<double,26> &rd);
52 
53 /*======================================================================*/
66 /*======================================================================*/
68  atb::Array<int,3> const &L,
69  blitz::Array<std::vector< blitz::TinyVector<atb::BlitzIndexT,3> >,1>
70  &voxelSets, int backgroundLabel, ProgressReporter *pr = NULL);
71 
72 /*======================================================================*/
91 /*======================================================================*/
92  double computeConvexity(
93  atb::Array<int,3> const &L,
94  std::vector< blitz::TinyVector<atb::BlitzIndexT,3> > const &voxelSet,
95  int nRandomPairs = 100000);
96 
97 /*======================================================================*/
151 /*======================================================================*/
152  void computeCellFeatures(
153  atb::Array<int,3> const &L, ShellCoordinateTransform const &sct,
154  double volumeThresholdUm, std::string const &outFileName,
155  std::string const &featureGroup, int backgroundLabel = -1,
156  bool connectedComponentLabeling = false, ProgressReporter *pr = NULL);
157 
158 }
159 
160 #endif
Array class derived from blitz++ Arrays for handling microscopic datasets with associated element siz...
void computeCellFeatures(atb::Array< int, 3 > const &L, ShellCoordinateTransform const &sct, double volumeThresholdUm, std::string const &outFileName, std::string const &featureGroup, int backgroundLabel=-1, bool connectedComponentLabeling=false, ProgressReporter *pr=NULL)
Compute cell shape features for the given segmentation masks aligned to the given iRoCS shell coordin...
void computeVoxelSetsPerLabel(atb::Array< int, 3 > const &L, blitz::Array< std::vector< blitz::TinyVector< atb::BlitzIndexT, 3 > >, 1 > &voxelSets, int backgroundLabel, ProgressReporter *pr=NULL)
For each label compute the vector of voxel positions with that label in L.
double computeConvexity(atb::Array< int, 3 > const &L, std::vector< blitz::TinyVector< atb::BlitzIndexT, 3 > > const &voxelSet, int nRandomPairs=100000)
Compute a convexity measure for a segment based on sample points.
void extractRD(atb::Array< int, 3 > const &L, int label, blitz::TinyVector< double, 3 > const &center, blitz::TinyMatrix< double, 3, 3 > const &axes, blitz::TinyVector< double, 26 > &rd)