Viewer
display a stack of images
|
00001 /* 00002 * This work is licensed under a Creative Commons 00003 * Attribution-Noncommercial-Share Alike 3.0 United States License. 00004 * 00005 * http://creativecommons.org/licenses/by-nc-sa/3.0/us/ 00006 * 00007 * You are free: 00008 * 00009 * to Share - to copy, distribute, display, and perform the work 00010 * to Remix - to make derivative works 00011 * 00012 * Under the following conditions: 00013 * 00014 * Attribution. You must attribute the work in the manner specified by the 00015 * author or licensor (but not in any way that suggests that they endorse you 00016 * or your use of the work). 00017 * 00018 * Noncommercial. You may not use this work for commercial purposes. 00019 * 00020 * Share Alike. If you alter, transform, or build upon this work, you may 00021 * distribute the resulting work only under the same or similar license to 00022 * this one. 00023 * 00024 * For any reuse or distribution, you must make clear to others the license 00025 * terms of this work. The best way to do this is by including this header. 00026 * 00027 * Any of the above conditions can be waived if you get permission from the 00028 * copyright holder. 00029 * 00030 * Apart from the remix rights granted under this license, nothing in this 00031 * license impairs or restricts the author's moral rights. 00032 */ 00033 00034 00066 #ifndef VIEWER_H 00067 #define VIEWER_H 00068 00069 #include <config.h> 00070 00071 #include <qwidget.h> 00072 #include <qspinbox.h> 00073 #include <qslider.h> 00074 #include <qscrollview.h> 00075 #include <qmutex.h> 00076 #include <qlineedit.h> 00077 #include <qaction.h> 00078 #include <qpopupmenu.h> 00079 #include <qmenubar.h> 00080 #include <qsplitter.h> 00081 #include <qlayout.h> 00082 #include <qfiledialog.h> 00083 #include <qdir.h> 00084 #include <qapplication.h> 00085 00086 #include <jwsc/image/image.h> 00087 #include <jwsc/imgblock/imgblock.h> 00088 00089 #include "gl_image_panel.h" 00090 00100 class Viewer : public QWidget 00101 { 00102 Q_OBJECT 00103 00104 public: 00105 00109 Viewer(QWidget* parent = 0, const char* name = 0); 00110 00111 protected slots: 00112 00113 void set_xz_view(bool on); 00114 void set_yz_view(bool on); 00115 00116 void file_close(); 00117 00118 void file_open(); 00119 00120 void new_viewer(); 00121 00122 void update_gl_xy_scroll_view(int x, int y); 00123 00124 void update_gl_xz_scroll_view(int x, int y); 00125 00126 void update_gl_yz_scroll_view(int x, int y); 00127 00128 void update_xy_line_edit(int x, int y, int z, const jwsc::Pixel_f* px); 00129 00130 void update_xz_line_edit(int x, int y, int z, const jwsc::Pixel_f* px); 00131 00132 void update_yz_line_edit(int x, int y, int z, const jwsc::Pixel_f* px); 00133 00134 void update_xy_fname_line_edit(int i); 00135 00136 protected: 00137 00138 QSlider* x_axis_slider; 00139 00140 QSpinBox* x_axis_spin_box; 00141 00142 QSlider* y_axis_slider; 00143 00144 QSpinBox* y_axis_spin_box; 00145 00146 QSlider* xz_z_axis_slider; 00147 QSlider* yz_z_axis_slider; 00148 00149 QSpinBox* xz_z_axis_spin_box; 00150 QSpinBox* yz_z_axis_spin_box; 00151 00152 char** fnames; 00153 00154 jwsc::Imgblock_f* img_blk; 00155 00156 GLImagePanelXY* xy_view; 00157 00158 GLImagePanelXZ* xz_view; 00159 00160 GLImagePanelYZ* yz_view; 00161 00162 QScrollView* gl_xy_scroll_view; 00163 00164 QScrollView* gl_xz_scroll_view; 00165 00166 QScrollView* gl_yz_scroll_view; 00167 00168 int updating_gl_scroll_view; 00169 00170 QMutex* mutex; 00171 00172 QLineEdit* xy_line_edit; 00173 00174 QLineEdit* xz_line_edit; 00175 00176 QLineEdit* yz_line_edit; 00177 00178 QLineEdit* xy_fname_line_edit; 00179 00180 bool show_xz_view; 00181 bool show_yz_view; 00182 }; 00183 00184 #endif