iRoCS Toolbox  1.1.0
DataChannelSpecs.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 DATACHANNELSPECS_HH
26 #define DATACHANNELSPECS_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 
38 class QPushButton;
39 
41 {
42 
43  Q_OBJECT
44 
45 public:
46 
49 
51 
52  static DataChannelSpecs *load();
53 
54  blitz::TinyVector<float,3> color() const;
55  void setColor(blitz::TinyVector<float,3> const &color);
56 
57  float gamma() const;
58  void setGamma(float gamma);
59 
60  float displayMin() const;
61  float displayMax() const;
62 
63  float gammaLUT(size_t index) const;
64 
65  bool showExposureProblems() const;
66  void setShowExposureProblems(bool exposure);
67 
68  atb::Array<float,3> const *data() const;
70  float valueAt(blitz::TinyVector<double,3> const &positionUm) const;
71  std::string stringValueAt(
72  blitz::TinyVector<double,3> const &positionUm) const;
73 
75 
76 public slots:
77 
78  void normalize();
79  void setDisplayRange(float displayMin, float displayMax);
80  void setDisplayMin(float displayMin);
81  void setDisplayMax(float displayMax);
82  void setTransformation(
83  blitz::TinyMatrix<double,4,4> const &transformation);
84 
85 /*======================================================================*/
92 /*======================================================================*/
93  void revalidate();
94 
95 private slots:
96 
97  void updateIcon();
98  void updateGammaLUT();
99 
100 private:
101 
102  atb::Array<float,3> *p_data;
103 
104  std::vector<float> _gammaLUT;
105 
106  ColorControlElement *p_colorControl;
107  DoubleControlElement *p_gammaControl;
108  QPushButton *p_normalizeButton;
109  DoubleRangeControlElement *p_displayRangeControl;
110  BoolControlElement *p_showExposureProblemsControl;
111 
112 };
113 
114 #endif
Array class derived from blitz++ Arrays for handling microscopic datasets with associated element siz...
DataChannelSpecs(atb::Array< float, 3 > *data, MultiChannelModel *model=NULL)
void setGamma(float gamma)
float gamma() const
std::string stringValueAt(blitz::TinyVector< double, 3 > const &positionUm) const
bool showExposureProblems() const
void setTransformation(blitz::TinyMatrix< double, 4, 4 > const &transformation)
virtual blitz::TinyMatrix< double, 4, 4 > const & transformation() const
ChannelSpecs::ChannelType channelType() const
float gammaLUT(size_t index) const
float displayMin() const
static DataChannelSpecs * load()
void setShowExposureProblems(bool exposure)
ChannelSpecsRenderer * addRenderer(ViewWidget *view)
void setDisplayRange(float displayMin, float displayMax)
MultiChannelModel * model() const
void revalidate()
Reset the channel shape, element size, transformation and bounding box from the underlying data...
void setDisplayMax(float displayMax)
void setDisplayMin(float displayMin)
blitz::TinyVector< float, 3 > color() const
float valueAt(blitz::TinyVector< double, 3 > const &positionUm) const
float displayMax() const
void setColor(blitz::TinyVector< float, 3 > const &color)
atb::Array< float, 3 > const * data() const