• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

  • sources
  • kde-4.12
  • kdeedu
  • kstars
  • kstars
  • fitsviewer
fitshistogram.h
Go to the documentation of this file.
1 /***************************************************************************
2  fitshistogram.h - FITS Historgram
3  ---------------
4  begin : Thu Mar 4th 2004
5  copyright : (C) 2004 by Jasem Mutlaq
6  email : mutlaqja@ikarustech.com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef FITSHISTOGRAM
19 #define FITSHISTOGRAM
20 
21 #include "ui_fitshistogramui.h"
22 #include "fitscommon.h"
23 
24 #include <QUndoCommand>
25 #include <QPixmap>
26 #include <QMouseEvent>
27 #include <QPaintEvent>
28 #include <QDialog>
29 #include <QVarLengthArray>
30 
31 #define CIRCLE_DIM 16
32 
33 const int INITIAL_MAXIMUM_WIDTH = 500;
34 
35 class FITSTab;
36 class QPixmap;
37 
38 
39 class histogramUI : public QDialog, public Ui::FITSHistogramUI
40 {
41  Q_OBJECT
42 
43 public:
44  histogramUI(QDialog *parent=0);
45 
46 };
47 
48 class FITSHistogram : public QDialog
49 {
50  Q_OBJECT
51 
52  friend class histDrawArea;
53 
54 public:
55  FITSHistogram(QWidget *parent);
56  ~FITSHistogram();
57 
58  void constructHistogram(int hist_width, int hist_height);
59  void updateHistogram();
60  int findMax(int hist_width);
61  void applyFilter(FITSScale ftype);
62  double getBinWidth() { return binWidth; }
63  double getJMIndex() { return JMIndex; }
64  int getMeanStdDev() { return mean_p_std;}
65  QVarLengthArray<int, INITIAL_MAXIMUM_WIDTH> getCumulativeFreq() { return cumulativeFreq; }
66  QVarLengthArray<int, INITIAL_MAXIMUM_WIDTH> getHistogram() { return histArray; }
67 
68  FITSScale type;
69  int napply;
70  double histFactor;
71  double binWidth;
72  double fits_min, fits_max;
73  FITSTab *tab;
74 
75 private:
76 
77  histogramUI *ui;
78  int histogram_height, histogram_width;
79  QVarLengthArray<int, INITIAL_MAXIMUM_WIDTH> histArray;
80  QVarLengthArray<int, INITIAL_MAXIMUM_WIDTH> cumulativeFreq;
81  double JMIndex;
82  int mean;
83  int mean_p_std;
84 
85 public slots:
86  void applyScale();
87  void updateBoxes(int lowerLimit, int upperLimit);
88  void updateIntenFreq(int x);
89  void minSliderUpdated(int value);
90  void maxSliderUpdated(int value);
91 
92  void updateLowerLimit();
93  void updateUpperLimit();
94 
95 
96 };
97 
98 class FITSHistogramCommand : public QUndoCommand
99 {
100 public:
101  FITSHistogramCommand(QWidget * parent, FITSHistogram *inHisto, FITSScale newType, int lmin, int lmax);
102  virtual ~FITSHistogramCommand();
103 
104  virtual void redo();
105  virtual void undo();
106  virtual QString text() const;
107 
108 
109 private:
110  FITSHistogram *histogram;
111  FITSScale type;
112  int min, max;
113  float *buffer;
114  FITSTab *tab;
115 };
116 
117 
118 #endif
FITSHistogramCommand::undo
virtual void undo()
Definition: fitshistogram.cpp:371
histogramUI
Definition: fitshistogram.h:39
FITSHistogram::getHistogram
QVarLengthArray< int, INITIAL_MAXIMUM_WIDTH > getHistogram()
Definition: fitshistogram.h:66
QDialog
FITSHistogram::applyScale
void applyScale()
Definition: fitshistogram.cpp:187
FITSHistogram::getJMIndex
double getJMIndex()
Definition: fitshistogram.h:63
QWidget
FITSHistogram::constructHistogram
void constructHistogram(int hist_width, int hist_height)
Definition: fitshistogram.cpp:81
FITSHistogram::getBinWidth
double getBinWidth()
Definition: fitshistogram.h:62
FITSHistogram::napply
int napply
Definition: fitshistogram.h:69
FITSHistogram::~FITSHistogram
~FITSHistogram()
Definition: fitshistogram.cpp:76
FITSHistogram::updateIntenFreq
void updateIntenFreq(int x)
Definition: fitshistogram.cpp:254
FITSHistogram::type
FITSScale type
Definition: fitshistogram.h:68
FITSHistogram::updateHistogram
void updateHistogram()
Definition: fitshistogram.cpp:300
FITSHistogram::findMax
int findMax(int hist_width)
Definition: fitshistogram.cpp:290
FITSHistogramCommand
Definition: fitshistogram.h:98
FITSHistogramCommand::~FITSHistogramCommand
virtual ~FITSHistogramCommand()
Definition: fitshistogram.cpp:317
FITSHistogram::fits_min
double fits_min
Definition: fitshistogram.h:72
FITSScale
FITSScale
Definition: fitscommon.h:22
fitscommon.h
FITSHistogram::fits_max
double fits_max
Definition: fitshistogram.h:72
FITSHistogram::binWidth
double binWidth
Definition: fitshistogram.h:71
FITSHistogramCommand::text
virtual QString text() const
Definition: fitshistogram.cpp:393
histogramUI::histogramUI
histogramUI(QDialog *parent=0)
Definition: fitshistogram.cpp:48
FITSHistogram::histFactor
double histFactor
Definition: fitshistogram.h:70
INITIAL_MAXIMUM_WIDTH
const int INITIAL_MAXIMUM_WIDTH
Definition: fitshistogram.h:33
FITSHistogramCommand::FITSHistogramCommand
FITSHistogramCommand(QWidget *parent, FITSHistogram *inHisto, FITSScale newType, int lmin, int lmax)
Definition: fitshistogram.cpp:306
FITSHistogram::maxSliderUpdated
void maxSliderUpdated(int value)
Definition: fitshistogram.cpp:243
FITSHistogram::updateLowerLimit
void updateLowerLimit()
Definition: fitshistogram.cpp:264
FITSHistogram::FITSHistogram
FITSHistogram(QWidget *parent)
Definition: fitshistogram.cpp:55
FITSHistogram
Definition: fitshistogram.h:48
FITSHistogram::minSliderUpdated
void minSliderUpdated(int value)
Definition: fitshistogram.cpp:232
FITSHistogram::updateBoxes
void updateBoxes(int lowerLimit, int upperLimit)
Definition: fitshistogram.cpp:170
FITSHistogramCommand::redo
virtual void redo()
Definition: fitshistogram.cpp:323
FITSTab
Definition: fitstab.h:31
FITSHistogram::tab
FITSTab * tab
Definition: fitshistogram.h:73
FITSHistogram::updateUpperLimit
void updateUpperLimit()
Definition: fitshistogram.cpp:277
QUndoCommand
FITSHistogram::getMeanStdDev
int getMeanStdDev()
Definition: fitshistogram.h:64
histDrawArea
Definition: fitshistogramdraw.h:24
FITSHistogram::getCumulativeFreq
QVarLengthArray< int, INITIAL_MAXIMUM_WIDTH > getCumulativeFreq()
Definition: fitshistogram.h:65
FITSHistogram::applyFilter
void applyFilter(FITSScale ftype)
Definition: fitshistogram.cpp:215
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

Skip menu "kstars"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal