ColorHistogram.qo.h

Go to the documentation of this file.
00001 //# Copyright (C) 2005
00002 //# Associated Universities, Inc. Washington DC, USA.
00003 //#
00004 //# This library is free software; you can redistribute it and/or modify it
00005 //# under the terms of the GNU Library General Public License as published by
00006 //# the Free Software Foundation; either version 2 of the License, or (at your
00007 //# option) any later version.
00008 //#
00009 //# This library is distributed in the hope that it will be useful, but WITHOUT
00010 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00011 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00012 //# License for more details.
00013 //#
00014 //# You should have received a copy of the GNU Library General Public License
00015 //# along with this library; if not, write to the Free Software Foundation,
00016 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00017 //#
00018 //# Correspondence concerning AIPS++ should be addressed as follows:
00019 //#        Internet email: aips2-request@nrao.edu.
00020 //#        Postal address: AIPS++ Project Office
00021 //#                        National Radio Astronomy Observatory
00022 //#                        520 Edgemont Road
00023 //#                        Charlottesville, VA 22903-2475 USA
00024 //#
00025 
00026 #ifndef COLORHISTOGRAM_QO_H
00027 #define COLORHISTOGRAM_QO_H
00028 
00029 #include <QtGui/QMainWindow>
00030 #include <casa/aipstype.h>
00031 #include <casa/Arrays/Vector.h>
00032 #include <display/QtViewer/ColorHistogram.ui.h>
00033 
00034 namespace casa {
00035 
00036         class BinPlotWidget;
00037         class QtDisplayData;
00038         class ColorHistogramScale;
00039         class WCPowerScaleHandler;
00040         class ColorTransferWidget;
00041 
00047         class ColorHistogram : public QMainWindow {
00048                 Q_OBJECT
00049 
00050         public:
00051                 ColorHistogram(QWidget *parent = 0);
00052                 void setDisplayData( QtDisplayData* img );
00053                 ~ColorHistogram();
00054 
00055         private slots:
00056                 void resetIntensityRange();
00057                 void acceptRange();
00058                 void cancelRange();
00059                 void colorsChanged();
00060                 void invertColorMap( int invert );
00061                 void powerCyclesChangedSlider(int value );
00062                 void powerCyclesChangedLineEdit( const QString& str );
00063                 void histogramColorModeChanged( bool useColors );
00064                 void logScaleChanged ( int logScaleAmount );
00065 
00066         private:
00067                 void updateColorMap( bool invertChanged = false);
00068                 void resetColorLookups();
00069                 void resetPowerCycles( float powerCycles);
00070                 Vector<uInt> computeScaledIntensities(const std::vector<float>& intensities );
00071                 ColorHistogram( const ColorHistogram& other );
00072                 ColorHistogram operator=( const ColorHistogram& other );
00073 
00074                 QtDisplayData* displayData;
00075                 Ui::ColorHistogramClass ui;
00076                 BinPlotWidget* histogram;
00077                 WCPowerScaleHandler* powerScaler;
00078                 ColorHistogramScale* colorScale;
00079                 ColorTransferWidget* colorTransferWidget;
00080                 double minIntensity;
00081                 double maxIntensity;
00082                 int logScale;
00083                 const int COLOR_MAX;
00084                 const int SLIDER_MIN;
00085                 const int SLIDER_MAX;
00086                 int SCALE_LIMIT;
00087         };
00088 
00089 }
00090 #endif // COLORHISTOGRAM_QO_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1