iRoCS Toolbox  1.1.0
RGBChannelSpecs.hh
Go to the documentation of this file.
1 /**************************************************************************
2  *
3  * This file belongs to the iRoCS Toolbox.
4  *
5  * Copyright (C) 2015 Thorsten Falk
6  *
7  * Image Analysis Lab, University of Freiburg, Germany
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software Foundation,
21  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22  *
23  **************************************************************************/
24 
25 #ifndef RGBCHANNELSPECS_HH
26 #define RGBCHANNELSPECS_HH
27 
28 #ifdef HAVE_CONFIG_H
29 #include <config.hh>
30 #endif
31 
32 #include "ChannelSpecs.hh"
33 
34 #include <libArrayToolbox/Array.hh>
35 
37 {
38 
39  Q_OBJECT
40 
41 public:
42 
43  RGBChannelSpecs(atb::Array<blitz::TinyVector<float,3>,3> *data,
44  MultiChannelModel *model = NULL);
46 
48 
49  static RGBChannelSpecs *load();
50 
51  float gamma() const;
52  void setGamma(float gamma);
53 
54  bool normalize() const;
55  void setNormalize(bool normalize);
56  float minValue() const;
57  float maxValue() const;
58  float gammaLUT(size_t index) const;
59 
60  bool showExposureProblems() const;
61  void setShowExposureProblems(bool exposure);
62 
65  float valueAt(blitz::TinyVector<double,3> const &positionUm) const;
66  std::string stringValueAt(
67  blitz::TinyVector<double,3> const &positionUm) const;
68 
70 
71 public slots:
72 
73  void setTransformation(
74  blitz::TinyMatrix<double,4,4> const &transformation);
75 
76 /*======================================================================*/
83 /*======================================================================*/
84  void revalidate();
85 
86 private slots:
87 
88  void updateNorm(bool normalize);
89  void updateGammaLUT();
90 
91 private:
92 
94 
95  float _minValue, _maxValue;
96  std::vector<float> _gammaLUT;
97 
98  DoubleControlElement *p_gammaControl;
99  BoolControlElement *p_normalizeControl;
100  BoolControlElement *p_showExposureProblemsControl;
101 
102 };
103 
104 #endif
float valueAt(blitz::TinyVector< double, 3 > const &positionUm) const
Array class derived from blitz++ Arrays for handling microscopic datasets with associated element siz...
RGBChannelSpecs(atb::Array< blitz::TinyVector< float, 3 >, 3 > *data, MultiChannelModel *model=NULL)
The Array class is an extension to the blitz++ Array class providing additional parameters element si...
Definition: Array.hh:85
bool showExposureProblems() const
atb::Array< blitz::TinyVector< float, 3 >, 3 > const * data() const
bool normalize() const
void setTransformation(blitz::TinyMatrix< double, 4, 4 > const &transformation)
virtual blitz::TinyMatrix< double, 4, 4 > const & transformation() const
float gamma() const
static RGBChannelSpecs * load()
void revalidate()
Reset the channel shape, element size, transformation and bounding box from the underlying data...
void setShowExposureProblems(bool exposure)
float gammaLUT(size_t index) const
ChannelSpecsRenderer * addRenderer(ViewWidget *view)
ChannelSpecs::ChannelType channelType() const
std::string stringValueAt(blitz::TinyVector< double, 3 > const &positionUm) const
void setGamma(float gamma)
float maxValue() const
float minValue() const
MultiChannelModel * model() const
void setNormalize(bool normalize)