SlicerMainWindow.qo.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef SLICER_MAINWINDOW_QO_H
00027 #define SLICER_MAINWINDOW_QO_H
00028
00029 #include <QtGui/QMainWindow>
00030 #include <display/Slicer/SlicerMainWindow.ui.h>
00031 #include <display/Slicer/SlicePlot.qo.h>
00032
00033 class QCursor;
00034
00035 namespace casa {
00036
00037 class SliceZoomer;
00038 class SliceColorPreferences;
00039 class SlicePlotPreferences;
00040 class StatisticsRegion;
00041
00042 class SlicerMainWindow : public QMainWindow {
00043
00044 Q_OBJECT
00045
00046 public:
00047 SlicerMainWindow(QWidget *parent = 0);
00048 void updateChannel( int channel );
00049 void updatePolyLine( int regionId, viewer::region::RegionChanges regionChanges,
00050 const QList<double> & worldX, const QList<double> & worldY,
00051 const QList<int> &pixelX, const QList<int> & pixelY );
00052 void addPolyLine( int regionId, viewer::region::RegionChanges regionChanges,
00053 const QList<double> & worldX, const QList<double> & worldY,
00054 const QList<int> &pixelX, const QList<int> & pixelY, const QString& colorName );
00055 void setImage( SHARED_PTR<ImageInterface<float> > img );
00056 bool setRegionSelected( int regionId, bool selected );
00057 void setCurveColor( int id, const QString& color );
00058 void updatePositionInformation( int id, const QVector<String>& info );
00059 ~SlicerMainWindow();
00060
00061 signals:
00062 void markerPositionChanged(int regionId,int segmentIndex,float percentage);
00063 void markerVisibilityChanged(int regionId,bool showMarker);
00064
00065 private slots:
00066 void clearCurves();
00067 void autoCountChanged( bool selected );
00068 void sampleCountChanged();
00069 void accumulateChanged( bool accumulate );
00070 void interpolationMethodChanged( const QString& method );
00071 void showPlotPreferences();
00072 void resetPlotPreferences();
00073 void exportSlice();
00074 void showColorDialog();
00075 void resetColors();
00076 void zoomIn();
00077 void zoomNeutral();
00078 void zoomOut();
00079 bool checkZoom();
00080 void markPositionChanged(int regionId,int segmentIndex,float percentage);
00081 void markVisibilityChanged(int regionId,bool showMarker);
00082
00083 private:
00084 void initializeZooming();
00085 SlicerMainWindow( const SlicerMainWindow& mainWindow );
00086 SlicerMainWindow& operator=( const SlicerMainWindow& other);
00087
00088 int populateSampleCount() const;
00089
00090
00091 bool toImageFormat( const QString& fileName, const QString& format );
00092 bool toASCII( const QString& fileName );
00093
00094
00095 void updateStatisticsLayout();
00096
00097 SliceColorPreferences* colorPreferences;
00098 SlicePlotPreferences* plotPreferences;
00099 SliceZoomer* plotZoomer;
00100
00101 SlicePlot slicePlot;
00102
00103 QStringList methodList;
00104 QStringList xAxisList;
00105
00106 Ui::SlicerMainWindowClass ui;
00107
00108 };
00109 }
00110
00111 #endif // SLICERMAINWINDOW_QO_H