rasdaman complete source
rviewDModes.hh
Go to the documentation of this file.
1 /*
2 * This file is part of rasdaman community.
3 *
4 * Rasdaman community is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * Rasdaman community is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
18 rasdaman GmbH.
19 *
20 * For more information please see <http://www.rasdaman.org>
21 * or contact Peter Baumann via <baumann@rasdaman.com>.
22 /
23 
43 #ifndef _RVIEW_DMODES_H_
44 #define _RVIEW_DMODES_H_
45 
46 #include "rasodmg/ref.hh"
47 #include "rasodmg/marray.hh"
48 #include "rasodmg/gmarray.hh"
49 
50 #include "labelManager.hh"
51 #include "rviewUtils.hh"
52 #include "rviewDisplay.hh"
53 #include "rviewColMap.hh"
54 
55 #ifdef __VISUALC__
56 struct vertex;
57 struct vertex_fp;
58 struct graph_env;
59 struct tex_desc;
60 struct voxel_desc;
61 struct mesh_desc;
62 struct mdd_desc;
63 #else
64 typedef struct vertex;
65 typedef struct vertex_fp;
66 typedef struct graph_env;
67 typedef struct tex_desc;
68 typedef struct voxel_desc;
69 typedef struct mesh_desc;
70 typedef struct mdd_desc;
71 #endif
72 
73 class rviewImage;
74 class rviewRenderImage;
75 
76 
77 // Possible display formats
78 enum rviewImageMode
79 {
80  rim_none,
81  rim_surf,
82  rim_voxel
83 };
84 
85 
86 // Flags for light direction
87 #define RVIEW_LIGHTDIR_LEFT 1
88 #define RVIEW_LIGHTDIR_RIGHT 2
89 #define RVIEW_LIGHTDIR_DOWN 4
90 #define RVIEW_LIGHTDIR_UP 8
91 #define RVIEW_LIGHTDIR_FRONT 16
92 #define RVIEW_LIGHTDIR_BACK 32
93 
94 typedef struct rview_image_setup
95 {
96  unsigned long zpro, clipz;
97  double pixelThresholdLow, pixelThresholdHigh, weightThreshold;
98  int weightQuantisation;
99  bool useRgbBrightness;
100  bool useLights;
101  double lightsAmbient;
102  double lightsGain;
103  double lightsAngle;
104  double lightsScintAngle;
105  int lightsDir;
106  int lightsDist;
107  int kernelSize, kernelType;
108  bool useVoxCol;
109  double voxColour;
110  int gridSize;
111  double scaleHeight;
112 } rview_image_setup;
113 
114 
115 /*
116  * Image setup window for customizing the renderer.
117  */
119 {
120 public:
121 
123  ~rviewImageSetup(void);
124 
125  void unlinkParent(void);
126 
127  void OnSize(int w, int h);
128 
129  void label(void);
130  int process(wxObject &obj, wxEvent &evt);
131 
132  void updateSettings(const rview_image_setup &ris);
133  void readNewSetup(void);
134 
135  virtual const char *getFrameName(void) const;
136  virtual rviewFrameType getFrameType(void) const;
137 
138  static int parseLightDirection(const char *dir);
139 
140  // constants
141  // Borders used in setup window
142  static const int imgset_border;
143  // Height of text widgets in setup window
144  static const int imgset_theight;
145  // Height of checkboxes in setup window
146  static const int imgset_chkheight;
147  // Height of group boxes in setup window
148  static const int imgset_renheight;
149  static const int imgset_voxheight;
150  static const int imgset_hgtheight;
151  // Dimensions of buttons in setup window
152  static const int imgset_bwidth;
153  static const int imgset_bheight;
154  // Dimensions of checkboxes in setup window
155  static const int imgset_chowidth;
156  static const int imgset_choheight;
157  // Setup window dimensions
158  static const int imgset_width;
159  static const int imgset_height;
160 
161 
162 protected:
163 
165  wxPanel *panel;
179 
180  static const char *normalKernelSizes[];
182 };
183 
184 
185 
186 /*
187  * Renderer playback control window
188  */
190 {
191 public:
192 
193  rendererControl(float drx, float dry, float drz, int mode, rviewRenderImage *parentWin);
194  ~rendererControl(void);
195 
196  void unlinkParent(void);
197  void setActiveMode(int mode);
198 
199  void OnSize(int w, int h);
200 
201  void label(void);
202  int process(wxObject &obj, wxEvent &evt);
203 
204  virtual const char *getFrameName(void) const;
205  virtual rviewFrameType getFrameType(void) const;
206 
207  // constants
208  // Borders used in renderer control window
209  static const int rctrl_border;
210  // Button dimensions
211  static const int rctrl_bwidth;
212  static const int rctrl_bheight;
213  // Reset button dimensions
214  static const int rctrl_rwidth;
215  static const int rctrl_rheight;
216  // Slider height
217  static const int rctrl_sheight;
218  // Window dimensions
219  static const int rctrl_width;
220  static const int rctrl_height;
221 
222 
223 protected:
224 
225  void updateParameters(void);
226 
227  wxPanel *panel;
232  int active;
233 };
234 
235 
236 /*
237  * Renderer current view window (rotation, offset, scale)
238  */
240 {
241 public:
242 
243  rendererCurrentView(const vertex_fp &angles, long off, double scale, rviewRenderImage *parentWin);
244  ~rendererCurrentView(void);
245 
246  void unlinkParent(void);
247 
248  void OnSize(int w, int h);
249 
250  void label(void);
251  int process(wxObject &obj, wxEvent &evt);
252 
253  virtual const char *getFrameName(void) const;
254  virtual rviewFrameType getFrameType(void) const;
255 
256  void updateView(const vertex_fp &angles, long off, double scale);
257 
258  // constants
259  // Borders used in renderer view window
260  static const int rcview_border;
261  // Button dimensions
262  static const int rcview_bwidth;
263  static const int rcview_bheight;
264  // Text widget height
265  static const int rcview_theight;
266  // Window dimensions
267  static const int rcview_width;
268  static const int rcview_height;
269 
270 
271 protected:
272 
273  void updateParameters(void);
274 
275  wxPanel *panel;
281 };
282 
283 
284 
285 class wxPixmap;
286 
287 /*
288  * Container class for wxPixmap.
289  */
290 class pixmapCanvas: public wxCanvas
291 {
292 public:
293 
294  pixmapCanvas(rviewImage *parent, int x, int y, int w, int h, long style=0);
295  ~pixmapCanvas(void);
296 
297  void setPixmap(wxPixmap *pmap);
298  void updateDisplay(bool borders=FALSE);
299 
300  void OnPaint(void);
301  void OnEvent(wxMouseEvent &mevt);
302 
303  void SetAspectRatio(double ratio); // 0 for none
304  void ToggleDragBox(bool clearMode);
305  void SetDragBox(int x0, int y0, int x1, int y1);
306  bool HasDragBox(void) const;
307  bool GetDragBox(int &x0, int &y0, int &x1, int &y1) const;
308  void UpdateDragBox(int x1, int y1);
309  void AdjustDragBox(int x1, int y1);
310 
311 
312 protected:
313 
314  void paintCore(int x, int y);
315  void adjustBoxToRatio(void);
316 
318  wxDC *myDC;
319  wxBrush brush;
320  wxBrush border;
321  wxBrush textBack;
322  wxPen bpen;
323  wxPen fpen;
324  wxFont *font;
327  int offX, offY;
329  double aspectRatio;
330  wxRect textBBox;
331 };
332 
333 
334 // Flags used when settings are updated
335 #define RVIEW_IFLAG_VOXEL 1
336 #define RVIEW_IFLAG_LIGHT 2
337 #define RVIEW_IFLAG_HEIGHT 4
338 
339 /*
340  * Abstract base class for all windows containing an image + controls
341  */
343 {
344 public:
345 
346  rviewImage(mdd_frame *mf, int es, unsigned int flags=0);
347  virtual ~rviewImage(void);
348 
349  virtual int openViewer(void);
350 
351  virtual void label(void);
352  virtual int process(wxObject &obj, wxEvent &evt);
353  virtual void processMouseEvent(wxMouseEvent &mevt);
354  virtual int userEvent(const user_event &ue);
355  virtual void prepareToDie(void);
356  virtual int newProjection(void)=0;
357  virtual int requestQuit(int level);
358 
359  virtual void OnSize(int w, int h);
360  virtual void OnMenuCommand(int id);
361  virtual bool OnClose(void); // overload from rviewFrame
362 
363  virtual const char *getFrameName(void) const;
364  virtual rviewFrameType getFrameType(void) const;
365 
366  // Default flags for wxPixmap class (dithering etc)
367  static int getPixmapFlags(void);
368 
369  // constants
370  // Slider dimensions
371  static const int image_swidth;
372  static const int image_sheight;
373  // Playback buttons dimensions
374  static const int image_pbwidth;
375  static const int image_pbheight;
376  // Minimum size of image
377  static const int image_minwidth;
378  static const int image_minheight;
379  // Checkbox dimensions
380  static const int image_chkwidth;
381  static const int image_chkheight;
382  // Bounding box checkbox dimensions
383  static const int image_bbwidth;
384  static const int image_bbheight;
385  // Text field dimensions
386  static const int image_twidth;
387  static const int image_theight;
388  // Button dimensions
389  static const int image_bwidth;
390  static const int image_bheight;
391  // Offsets of drag box in canvas
392  static const int image_dragtoff;
393  static const int image_dragtspace;
394  // Distance from the border at which to autoscroll
395  static const int image_draghotzone;
396  // Extra space reserved on control panel
397  static const int image_ctrly;
398  static const int image_totaly;
399 
400 
401 protected:
402 
403  void updatePixmap(char *oldData, char *newData);
404  void configureCspace(bool state);
405  void setCspaceProjMode(bool pmode);
406  void resizeImage(void);
408  int freeDimsFromProjection(int &dim1, int &dim2, r_Point *map);
409  void ensureViewCspace(void);
410  void deleteViewCspace(void);
411  virtual void projectObjectHook(void);
412  virtual void configureMode(void);
413  virtual char *initMode(void)=0;
414  virtual bool cspaceRangeHook(bool suggest);
415  virtual char *movieNewFrame(void);
416  virtual void rotateObject(wxMouseEvent &mevt);
417  virtual int fileMenuInitHook(wxMenu *menu);
418  virtual int configMenuInitHook(wxMenu *menu);
419  // Query viewer capabilities
420  virtual bool modeNeedsCspace(rviewBaseType bt) const;
421  virtual bool canRotateObject(void) const;
422  virtual bool moviePossible(void) const;
423  virtual bool showScaleSlider(void) const;
424  // view management
425  virtual int saveView(FILE *fp);
426  virtual int readView(const char *key, const char *value);
427  virtual void loadViewFinished(void);
428 
434  char *imgData;
435  double scaleValue;
437  float mousex, mousey;
438  int mousebut;
439  unsigned int freeDims;
440  // For intensity to RGB translations (ushort)
445  // base type allows cspace mapping?
447  // image fully initialized?
450  // shared by flat and height field which don't have a shared derivation path
454  // colourspace parameters for view loading
456 
457  // view parameters
458  static const char *view_ScrollPos;
459  static const char *view_UseCspace;
460  static const char *view_CspaceFull;
461  static const char *view_CspaceProj;
462  static const char *view_CspaceMeans;
463  static const char *view_CspaceSigmas;
464  static const char *view_CspaceType;
465  static const char *view_CspaceRange;
466  static const char *view_ScaleValue;
467 };
468 
469 
470 /*
471  * Base class for flat images, i.e. 2D orthogonal projections
472  */
474 {
475 public:
476 
477  rviewFlatBaseImage(mdd_frame *mf, int es, unsigned int flags=0);
478  virtual ~rviewFlatBaseImage(void);
479 
480  virtual int newProjection(void);
481  virtual int openViewer(void);
482 
483  virtual const char *getFrameName(void) const;
484  virtual rviewFrameType getFrameType(void) const;
485 
486 
487 protected:
488 
489  virtual char *initMode(void);
490  char *projectImage(void);
491 };
492 
493 
494 /*
495  * Standard flat images
496  */
498 {
499 public:
500 
501  rviewFlatImage(mdd_frame *mf, unsigned int flags=0);
502  ~rviewFlatImage(void);
503 
504  void OnSize(int w, int h);
505 
506  virtual int openViewer(void);
507  virtual void label(void);
508  virtual int process(wxObject &obj, wxEvent &evt);
509 
510  virtual const char *getFrameName(void) const;
511  virtual rviewFrameType getFrameType(void) const;
512  virtual int getViewerType(void) const;
513 
514 
515 protected:
516 
517  virtual char *initMode(void);
518  virtual bool moviePossible(void) const;
519  virtual char *movieNewFrame(void);
520 };
521 
522 
523 /*
524  * Abstract base class for all rendered images (voxel, height field, whatever...)
525  */
527 {
528 public:
529 
530  rviewRenderImage(mdd_frame *mf, int es, unsigned int flags=0);
531  virtual ~rviewRenderImage(void);
532 
533  virtual void label(void);
534  virtual int process(wxObject &obj, wxEvent &evt);
535  virtual int newProjection(void);
536  virtual void prepareToDie(void);
537  virtual int requestQuit(int level);
538  virtual int userEvent(const user_event &ue);
539  virtual void OnSize(int w, int h);
540  virtual void OnMenuCommand(int id);
541  virtual bool OnClose(void);
542 
543  virtual const char *getFrameName(void) const;
544  virtual rviewFrameType getFrameType(void) const;
545 
546  void closeEditor(bool newSetup);
547  void updateSettings(int setFlags);
548 
549  void closeRendererControls(void);
550  void setAutoRotation(float rx, float ry, float rz);
551  void setCurrentView(const vertex_fp &angles, long off, double scale);
552 
553 
554 protected:
555 
556  virtual char *initMode(void);
557  virtual char *setupEnvironment(int w, int h)=0;
558  virtual void rotateObject(wxMouseEvent &mevt);
559  virtual bool doUpdate(int updateFlags)=0;
560  virtual void redrawSettingsChanged(void);
561  virtual void fillBuffer(void)=0;
562  virtual void fillBackgroundCore(rviewBaseType bt, double minVal);
563  virtual int configMenuInitHook(wxMenu *menu);
564  virtual int viewMenuInitHook(wxMenu *menu);
565  virtual bool canRotateObject(void) const;
566  virtual void updateCurrentView(void);
567 
568  int setupEnvBase(int w, int h, r_Ref<r_GMarray> &mdd, colourspaceMapper **csm, r_Minterval *csdom);
569  char *setupGraphEnv(void);
570  void fillBufferBackground(bool doCspace, bool &cspaceOK, r_Ref<r_GMarray>& obj, colourspaceMapper **csm, r_Minterval *csdom, rviewBaseType bt, bool fullRange, double *useMinVal=NULL);
571  void translateBufferToCspace(rviewBaseType bt, double *useMinVal=NULL, double *useMaxVal=NULL);
572  static void rotateCube(int axis, float angle, vertex_fp *matrix);
573  void rotateCube(int axis, float angle);
574  void getLightPos(vertex_fp *lpos);
575 
576  virtual int saveView(FILE *fp);
577  virtual int readView(const char *key, const char *value);
578  virtual void loadViewFinished(void);
579 
580  // convert rotation matrix to angles and back
581  void matrixToAngles(vertex_fp &angles) const;
582  void anglesToMatrix(const vertex_fp &angles);
583 
588  union
589  {
590  unsigned long l;
591  float f;
592  double d;
593  } voxColour;
594  long zoff;
595  double cubeScale;
596  // Rotation angle increments for renderer playback
597  float drx, dry, drz;
598  // Setup options
603 
604  // view keywords
605  static const char *view_ZProject;
606  static const char *view_ZClip;
607  static const char *view_PixThreshLow;
608  static const char *view_PixThreshHigh;
609  static const char *view_WeightThresh;
610  static const char *view_WeightQuant;
611  static const char *view_UseRGBBright;
612  static const char *view_UseLighting;
613  static const char *view_LightAmbient;
614  static const char *view_LightGain;
615  static const char *view_LightAngle;
616  static const char *view_LightScint;
617  static const char *view_LightDir;
618  static const char *view_LightDist;
619  static const char *view_KernelSize;
620  static const char *view_KernelType;
621  static const char *view_UseVoxColour;
622  static const char *view_VoxColour;
623  static const char *view_GridSize;
624  static const char *view_ScaleHeight;
625  static const char *view_Rotation;
626  static const char *view_ZOffset;
627 };
628 
629 
630 /*
631  * Class for visualizations of volumetric images (3D texture mapper &
632  * voxel renderer).
633  */
635 {
636 public:
637 
638  rviewVolumeImage(mdd_frame *mf, unsigned int flags=0);
639  virtual ~rviewVolumeImage(void);
640 
641  virtual void label(void);
642  virtual int process(wxObject &obj, wxEvent &evt);
643  virtual void OnSize(int w, int h);
644  virtual void OnMenuCommand(int id);
645  virtual int openViewer(void);
646 
647  virtual const char *getFrameName(void) const;
648  virtual rviewFrameType getFrameType(void) const;
649  virtual int getViewerType(void) const;
650 
651 
652 protected:
653 
654  virtual char *initMode(void);
655  virtual char *setupEnvironment(int w, int h);
656  virtual bool doUpdate(int updateFlags);
657  virtual void fillBuffer(void);
658 
659  virtual int saveView(FILE *fp);
660  virtual int readView(const char *key, const char *value);
661  virtual void loadViewFinished(void);
662 
665  int lastMode;
670 
671  static const char *view_VolumeMode;
672  static const char *view_UseBBox;
673 };
674 
675 
676 /*
677  * Class for visualizing data as heightfields.
678  */
680 {
681 public:
682 
683  rviewHeightImage(mdd_frame *mf, unsigned int flags=0);
684  virtual ~rviewHeightImage(void);
685 
686  virtual void label(void);
687  virtual int process(wxObject &obj, wxEvent &evt);
688  virtual int newProjection(void);
689  virtual void prepareToDie(void);
690  virtual int requestQuit(int level);
691  virtual int openViewer(void);
692 
693  virtual const char *getFrameName(void) const;
694  virtual rviewFrameType getFrameType(void) const;
695  virtual int getViewerType(void) const;
696 
697 
698 protected:
699 
700  int depthForHeightfield(void) const;
701  virtual char *initMode(void);
702  virtual char *setupEnvironment(int w, int h);
703  virtual char *movieNewFrame(void);
704  virtual bool doUpdate(int updateFlags);
705  virtual void redrawSettingsChanged(void);
706  virtual void fillBackgroundCore(rviewBaseType bt, double minVal);
707  virtual void fillBuffer(void);
708  virtual bool cspaceRangeHook(bool suggest);
709  virtual bool moviePossible(void) const;
710  virtual bool modeNeedsCspace(rviewBaseType bt) const;
711 
714  // for colourspace mapping of heightfields.
716 };
717 
718 
719 
720 /*
721  * An image scaled by the DBMS
722  */
723 class r_Fast_Base_Scale;
724 
726 {
727 public:
728 
729  rviewScaledImage(collection_desc *cd, r_Fast_Base_Scale *scaler, unsigned int flags=0);
730  ~rviewScaledImage(void);
731 
732  virtual void processMouseEvent(wxMouseEvent &mevt);
733  virtual void label(void);
734  virtual int process(wxObject &obj, wxEvent &evt);
735  virtual int openViewer(void);
736  virtual void OnSize(int w, int h);
737  virtual int newProjection(void);
738 
739  virtual const char *getFrameName(void) const;
740  virtual rviewFrameType getFrameType(void) const;
741  virtual int getViewerType(void) const;
742  virtual const r_Minterval &getVirtualDomain(void) const;
743 
744 
745 protected:
746 
747  virtual char *initMode(void);
748  virtual void projectObjectHook(void);
749 
750  char *projectImage(void);
751  bool showScaleSlider(void) const;
752  void scaleViewBy(double scale);
753  void newView(bool loadImage=TRUE);
754  void projectionStringForView(void);
755  double getLastScale(void) const;
756 
757  // view management
758  virtual int saveView(FILE *fp);
759  virtual int readView(const char *key, const char *value);
760  virtual void loadViewFinished(void);
761  void ensureLoadedView(void);
762 
768 
769  bool boxState;
770 
771  typedef struct
772  {
773  double scale;
774  r_Point low, high;
775  int dim1, dim2;
776  } view_desc_t;
777 
778  bool compareViews(const view_desc_t &v1, const view_desc_t &v2);
779 
780  // The current view
783  bool dontLoad;
784  double initialScale;
786 
788 
789  r_Fast_Base_Scale *scaleObject;
790 
792 
793  static const double scaleStep;
794 
795  // view parameters
796  static const char *view_CurrentBox;
797  static const char *view_BoxScale;
798 };
799 
800 
801 // Structure for static conversion of MDD -> pixmap
802 typedef struct rviewFlatProjEnv
803 {
804  // initialized by caller
807  int dim1, dim2;
809  double scale;
810  bool doCspace;
813  // initialized by prepareFlatProjection()
814  int width, height;
815  int pitch, pad, depth;
817 
818 // Setup variables for projecting images
820 // Project an MDD object into an image bitmap
821 int rviewPerformFlatProjection(rviewFlatProjEnv &env, char *data);
822 
823 
824 
825 
826 
827 
829 {
834 };
835 
836 /*
837  * Canvas displaying a chart
838  */
839 
840 class chartCanvas: public wxCanvas
841 {
842 public:
843 
844  chartCanvas(wxWindow *parent, int x, int y, int w, int h, long style=0);
845  ~chartCanvas(void);
846 
847  void setData(mdd_frame *mf, rviewBaseType bt);
848  void setVars(int s, double cs, int ds, bool cy, rviewChartMode cm);
849  int setProjection(r_Point &p1, r_Point &p2);
850  void OnPaint(void);
851 
852  // constants
853  // Space reserved on top / bottom of chart
854  static const int chcanv_cospace;
855  // Length of a corrdinate axis marker line
856  static const int chcanv_colength;
857  // Start exponential axis numbering when |exponent| >= x
858  static const int chcanv_exponents;
859 
860 
861 protected:
862 
863  // Core-functionality of chart modes
864  void redrawBar(wxDC *cdc, int height, int dim, int startOff, int endOff, float scale, float posx, float stepx, float orgy);
865  void redrawLine(wxDC *cdc, int dim, int startOff, int endOff, float scale, float posx, float stepx, float orgy);
866  void redrawSpline(wxDC *cdc, int dim, int startOff, int endOff, float scale, float posx, float stepx, float orgy);
867 
869  int step, dimMDD;
871  double min, max, costep;
874  wxBrush brush, back;
876  wxPen pen, pen_r, pen_g, pen_b;
877  wxFont *font;
878  bool cosys;
879  char format[10];
881  int scroll;
882 };
883 
884 
885 /*
886  * A class for drawing charts
887  */
888 
890 {
891 public:
892 
893  rviewChart(mdd_frame *mf, unsigned int flags=0);
894  ~rviewChart(void);
895 
896  void label(void);
897  int process(wxObject &obj, wxEvent &evt);
898  int newProjection(void);
899  virtual int openViewer(void);
900 
901  void OnSize(int w, int h);
902  void OnMenuCommand(int id);
903 
904  virtual const char *getFrameName(void) const;
905  virtual rviewFrameType getFrameType(void) const;
906  virtual int getViewerType(void) const;
907 
908  // constants
909  // Text widget dimensions (step)
910  static const int chart_twidth;
911  static const int chart_theight;
912  // checkbox dims
913  static const int chart_cwidth;
914  static const int chart_cheight;
915  // Minimum size of viewer
916  static const int chart_minwidth;
917  static const int chart_minheight;
918  static const int chart_ctrly;
919  static const int chart_totaly;
920 
921 
922 protected:
923 
924  virtual int saveView(FILE *fp);
925  virtual int readView(const char *key, const char *value);
926  virtual void loadViewFinished(void);
927 
928  void checkModeMenu(void);
929 
932  int lastMode;
933  double costep;
934  int scroll;
935  bool cosys;
939 
940  static const char *view_StepSize;
941  static const char *view_Markers;
942  static const char *view_ScrollPos;
943  static const char *view_CoSys;
944  static const char *view_ChartMode;
945 };
946 
947 
948 
949 /*
950  * Canvas for plotting text onto
951  */
952 
953 class textCanvas: public wxCanvas
954 {
955 public:
956 
957  textCanvas(wxWindow *parent, int x, int y, int w, int h, long style=0);
958  ~textCanvas(void);
959 
960  void setData(mdd_frame *mf, rviewBaseType bt, unsigned int bs);
961  void setStep(int sx, int sy);
962  void setCoSys(bool cs, int &cl, int &ct);
963  void setProjection(r_Point &pt1, r_Point &pt2, unsigned int fd, r_Point *mapIndex=NULL);
964  void setNumberBase(int newBase);
965  void OnPaint(void);
966  void CalcTextExtent(char *b, float &width, float &height);
967  void EstimateCellSize(int &width, int &height);
968 
969  // constants
970  // Space around coordinate system
971  static const int txcanv_cospace;
972  // Default space between columns
973  static const int txcanv_colspace;
974  // Border used in text canvas
975  static const int txcanv_border;
976 
977 
978 protected:
979 
983  int coleft, cotop;
984  int dim1, dim2;
985  unsigned int freeDims;
988  bool cosys;
990  unsigned int baseSize;
991  wxBrush fore, back;
992  wxPen pen;
993  wxFont *font;
994 };
995 
996 
997 
998 /*
999  * Class for displaying tables
1000  */
1001 
1003 {
1004 public:
1005 
1006  rviewTable(mdd_frame *mf, unsigned int flags=0);
1007  ~rviewTable(void);
1008 
1009  void label(void);
1010  int process(wxObject &obj, wxEvent &evt);
1011  int newProjection(void);
1012  void newTableSize(void);
1013  virtual int openViewer(void);
1014 
1015  virtual const char *getFrameName(void) const;
1016  virtual rviewFrameType getFrameType(void) const;
1017  virtual int getViewerType(void) const;
1018 
1019  void OnSize(int w, int h);
1020  void OnMenuCommand(int id);
1021 
1022  // constants
1023  // Dimensions of additional wxText items (configs)
1024  static const int table_twidth;
1025  static const int table_theight;
1026  // Dimensions of check box
1027  static const int table_cwidth;
1028  static const int table_cheight;
1029  // Minimum dimensions of table
1030  static const int table_minwidth;
1031  static const int table_minheight;
1032  static const int table_ctrly;
1033  static const int table_totaly;
1034 
1035 
1036 protected:
1037 
1038  void EstimateCellSize(int &width, int &height);
1039 
1040  virtual int saveView(FILE *fp);
1041  virtual int readView(const char *key, const char *value);
1042  virtual void loadViewFinished(void);
1043 
1044  void checkModeMenu(void);
1045 
1047  int stepx, stepy;
1051  unsigned int freeDims;
1052  bool cosys;
1056 
1057  static const char *view_StepSize;
1058  static const char *view_ScrollPos;
1059  static const char *view_CoSys;
1060  static const char *view_NumBase;
1061 };
1062 
1063 
1064 
1065 /*
1066  * Class for displaying strings
1067  */
1068 
1070 {
1071 public:
1072 
1073  rviewStringViewer(mdd_frame *mf, unsigned int flags=0);
1074  ~rviewStringViewer(void);
1075 
1076  int newProjection(void);
1077  virtual int openViewer(void);
1078 
1079  virtual const char *getFrameName(void) const;
1080  virtual rviewFrameType getFrameType(void) const;
1081  virtual int getViewerType(void) const;
1082 
1083  void OnSize(int w, int h);
1084 
1085  // constants
1086  static const int strview_msgheight;
1087  static const int strview_minwidth;
1088  static const int strview_minheight;
1089  static const int strview_ctrly;
1090  static const int strview_totaly;
1091 
1092 
1093 protected:
1094 
1095  unsigned int freeDims;
1096  wxMessage *msgString;
1097 };
1098 
1099 #endif
void unlinkParent(void)
void updateSettings(const rview_image_setup &ris)
void OnSize(int w, int h)
void openViewerEpilogue(rviewFrameType ft)
virtual const char * getFrameName(void) const
static const int table_ctrly
Definition: rviewDModes.hh:1032
float mousex
Definition: rviewDModes.hh:437
int step
Definition: rviewDModes.hh:931
rviewText * lightsScintAngle
Definition: rviewDModes.hh:172
Definition: rviewDModes.hh:831
virtual const char * getFrameName(void) const
rviewButton * applyButton
Definition: rviewDModes.hh:276
virtual int saveView(FILE *fp)
r_Minterval fullDomain
Definition: rviewDModes.hh:782
bool cosys
Definition: rviewDModes.hh:878
char * setupGraphEnv(void)
r_Point low
Definition: rviewDModes.hh:774
void redrawSpline(wxDC *cdc, int dim, int startOff, int endOff, float scale, float posx, float stepx, float orgy)
rviewText * lightsDist
Definition: rviewDModes.hh:173
bool doBoundingBox
Definition: rviewDModes.hh:669
int dim1
Definition: rviewDModes.hh:984
virtual int getViewerType(void) const
static const char * view_ChartMode
Definition: rviewDModes.hh:944
wxPanel * panel
Definition: rviewDModes.hh:165
static const int rcview_height
Definition: rviewDModes.hh:268
rviewText * lightsDir
Definition: rviewDModes.hh:173
virtual rviewFrameType getFrameType(void) const
virtual int getViewerType(void) const
wxPen pen
Definition: rviewDModes.hh:992
void setPixmap(wxPixmap *pmap)
void OnSize(int w, int h)
void newTableSize(void)
int datastep
Definition: rviewDModes.hh:931
~rviewImageSetup(void)
Definition: rviewUtils.hh:416
int process(wxObject &obj, wxEvent &evt)
virtual void prepareToDie(void)
virtual int newProjection(void)
static const char * view_KernelType
Definition: rviewDModes.hh:620
void matrixToAngles(vertex_fp &angles) const
rviewText * pixThreshHighWidget
Definition: rviewDModes.hh:168
rviewCheckBox * boundingBox
Definition: rviewDModes.hh:663
int process(wxObject &obj, wxEvent &evt)
virtual int newProjection(void)
static void rotateCube(int axis, float angle, vertex_fp *matrix)
int rect_x1
Definition: rviewDModes.hh:328
virtual char * movieNewFrame(void)
void OnMenuCommand(int id)
virtual rviewFrameType getFrameType(void) const
int rendererPlayback
Definition: rviewDModes.hh:584
vertex_fp * geomData
Definition: rviewDModes.hh:585
rviewText * wgtQuantWidget
Definition: rviewDModes.hh:168
struct rviewFlatProjEnv rviewFlatProjEnv
Definition: rviewDModes.hh:840
static const int rctrl_rwidth
Definition: rviewDModes.hh:214
static const char * view_WeightQuant
Definition: rviewDModes.hh:610
rviewBaseType bt
Definition: rviewDModes.hh:808
Definition: rviewDModes.hh:725
int datastep
Definition: rviewDModes.hh:880
double costep
Definition: rviewDModes.hh:933
virtual const char * getFrameName(void) const
virtual int readView(const char *key, const char *value)
rviewText * sxText
Definition: rviewDModes.hh:1053
bool dontLoad
Definition: rviewDModes.hh:783
rview_image_setup oldSetup
Definition: rviewDModes.hh:178
virtual void redrawSettingsChanged(void)
double d
Definition: rviewDModes.hh:592
rviewText * scaleHeight
Definition: rviewDModes.hh:176
graph_env * graphEnv
Definition: rviewDModes.hh:587
unsigned int freeDims
Definition: rviewDModes.hh:1051
virtual bool cspaceRangeHook(bool suggest)
int pixPitch
Definition: rviewDModes.hh:432
virtual void configureMode(void)
static const char * view_LightScint
Definition: rviewDModes.hh:616
virtual const char * getFrameName(void) const
wxPixmap * pixmap
Definition: rviewDModes.hh:317
virtual int userEvent(const user_event &ue)
static const int txcanv_border
Definition: rviewDModes.hh:975
bool initPhaseFinished
Definition: rviewDModes.hh:448
bool doCspace
Definition: rviewDModes.hh:810
int coleft
Definition: rviewDModes.hh:880
int lastMode
Definition: rviewDModes.hh:932
void updateDisplay(bool borders=FALSE)
r_GMarray * mddPtr
Definition: rviewDModes.hh:805
vertex_fp * rot
Definition: rviewDModes.hh:586
static const int image_bheight
Definition: rviewDModes.hh:390
Definition: rviewDModes.hh:830
void updateParameters(void)
wxBrush fore
Definition: rviewDModes.hh:991
~rviewTable(void)
virtual int readView(const char *key, const char *value)
void OnSize(int w, int h)
virtual bool modeNeedsCspace(rviewBaseType bt) const
rviewImage(mdd_frame *mf, int es, unsigned int flags=0)
Definition: point.hh:59
int rviewPerformFlatProjection(rviewFlatProjEnv &env, char *data)
void configureCspace(bool state)
static const char * view_ZClip
Definition: rviewDModes.hh:606
static const int image_bwidth
Definition: rviewDModes.hh:389
mesh_desc * meshDesc
Definition: rviewDModes.hh:713
virtual int readView(const char *key, const char *value)
void setCurrentView(const vertex_fp &angles, long off, double scale)
rviewText * zproWidget
Definition: rviewDModes.hh:167
static const char * view_KernelSize
Definition: rviewDModes.hh:619
Definition: cube_render.h:108
rviewText * wgtThreshWidget
Definition: rviewDModes.hh:168
virtual int saveView(FILE *fp)
int process(wxObject &obj, wxEvent &evt)
wxPen pen_g
Definition: rviewDModes.hh:876
virtual void label(void)
Definition: rviewUtils.hh:306
int dimMDD
Definition: rviewDModes.hh:869
void closeRendererControls(void)
virtual rviewFrameType getFrameType(void) const
r_Ref< r_GMarray > dummyMDD
Definition: rviewDModes.hh:715
void OnEvent(wxMouseEvent &mevt)
virtual void label(void)
static const int imgset_border
Definition: rviewDModes.hh:142
rviewBaseType baseType
Definition: rviewDModes.hh:989
virtual int saveView(FILE *fp)
int scroll
Definition: rviewDModes.hh:881
virtual bool cspaceRangeHook(bool suggest)
virtual const char * getFrameName(void) const
virtual int process(wxObject &obj, wxEvent &evt)
int scrollx
Definition: rviewDModes.hh:1048
wxGroupBox * heightGroup
Definition: rviewDModes.hh:166
virtual const char * getFrameName(void) const
rviewImage * parentWin
Definition: rviewDModes.hh:325
void setAutoRotation(float rx, float ry, float rz)
virtual int newProjection(void)
double min
Definition: rviewDModes.hh:871
wxPen pen_r
Definition: rviewDModes.hh:876
rviewButton * resetX
Definition: rviewDModes.hh:229
colourspaceMapper * csmap
Definition: rviewDModes.hh:811
virtual char * initMode(void)
Definition: cube_render.h:86
int scrollY
Definition: rviewDModes.hh:982
rendererControl(float drx, float dry, float drz, int mode, rviewRenderImage *parentWin)
virtual int process(wxObject &obj, wxEvent &evt)
static const int image_dragtoff
Definition: rviewDModes.hh:392
rendererCurrentView(const vertex_fp &angles, long off, double scale, rviewRenderImage *parentWin)
static const char * view_CspaceFull
Definition: rviewDModes.hh:460
int pad
Definition: rviewDModes.hh:815
static const int image_ctrly
Definition: rviewDModes.hh:397
pixmapCanvas(rviewImage *parent, int x, int y, int w, int h, long style=0)
rviewFlatImage(mdd_frame *mf, unsigned int flags=0)
rviewButton * closeBut
Definition: rviewDModes.hh:230
wxPen pen
Definition: rviewDModes.hh:876
char * projectImage(void)
static const char * view_CspaceSigmas
Definition: rviewDModes.hh:463
static const char * view_ZOffset
Definition: rviewDModes.hh:626
virtual int newProjection(void)
r_Ref< r_GMarray > mddObj
Definition: rviewDModes.hh:868
void label(void)
virtual void OnSize(int w, int h)
static const char * normalKernelSizes[]
Definition: rviewDModes.hh:180
rviewSlider * scaleSlider
Definition: rviewDModes.hh:431
static const int chcanv_exponents
Definition: rviewDModes.hh:858
int pitch
Definition: rviewDModes.hh:815
static const int imgset_chkheight
Definition: rviewDModes.hh:146
rviewText * roty
Definition: rviewDModes.hh:277
static const char * view_UseRGBBright
Definition: rviewDModes.hh:611
static const int table_twidth
Definition: rviewDModes.hh:1024
bool cosys
Definition: rviewDModes.hh:988
int freeDimsFromProjection(int &dim1, int &dim2, r_Point *map)
wxBrush border
Definition: rviewDModes.hh:320
rviewButton * zoomInBut
Definition: rviewDModes.hh:763
static const int image_pbheight
Definition: rviewDModes.hh:375
int setupEnvBase(int w, int h, r_Ref< r_GMarray > &mdd, colourspaceMapper **csm, r_Minterval *csdom)
rviewFlatBaseImage(mdd_frame *mf, int es, unsigned int flags=0)
void resizeImage(void)
static const char * view_CspaceMeans
Definition: rviewDModes.hh:462
rviewRenderImage * parent
Definition: rviewDModes.hh:280
static const char * view_VolumeMode
Definition: rviewDModes.hh:671
virtual void fillBuffer(void)=0
static const int rcview_border
Definition: rviewDModes.hh:260
int lastMode
Definition: rviewDModes.hh:665
wxBrush brush
Definition: rviewDModes.hh:874
static const int image_minheight
Definition: rviewDModes.hh:378
virtual rviewFrameType getFrameType(void) const
void setCspaceProjMode(bool pmode)
static const int chcanv_cospace
Definition: rviewDModes.hh:854
Definition: rviewUtils.hh:482
wxPen bpen
Definition: rviewDModes.hh:322
rviewScaledImage(collection_desc *cd, r_Fast_Base_Scale *scaler, unsigned int flags=0)
Definition: cube_render.h:68
float drz
Definition: rviewDModes.hh:597
unsigned int freeDims
Definition: rviewDModes.hh:1095
virtual int requestQuit(int level)
void closeEditor(bool newSetup)
rviewText * pixThreshLowWidget
Definition: rviewDModes.hh:168
int newProjection(void)
virtual bool modeNeedsCspace(rviewBaseType bt) const
char format[10]
Definition: rviewDModes.hh:879
rviewImageMode imode
Definition: rviewDModes.hh:664
Definition: rviewDModes.hh:189
int fieldsx
Definition: rviewDModes.hh:1049
bool HasDragBox(void) const
void redrawLine(wxDC *cdc, int dim, int startOff, int endOff, float scale, float posx, float stepx, float orgy)
rviewImageSetup(rview_image_setup *ris, rviewRenderImage *parentWin)
vertex_fp * geomUse
Definition: rviewDModes.hh:585
bool GetDragBox(int &x0, int &y0, int &x1, int &y1) const
static const int image_chkheight
Definition: rviewDModes.hh:381
void EstimateCellSize(int &width, int &height)
void label(void)
virtual const char * getFrameName(void) const
void setNumberBase(int newBase)
void label(void)
static const char * view_ZProject
Definition: rviewDModes.hh:605
rviewButton * zoomBoxBut
Definition: rviewDModes.hh:766
virtual bool OnClose(void)
void projectionStringForView(void)
Definition: rviewDModes.hh:239
virtual void prepareToDie(void)
virtual rviewFrameType getFrameType(void) const
virtual int openViewer(void)
virtual void label(void)
int scrollX
Definition: rviewDModes.hh:982
static const char * view_LightGain
Definition: rviewDModes.hh:614
static const char * view_Markers
Definition: rviewDModes.hh:941
rviewButton * cancelBut
Definition: rviewDModes.hh:177
wxFont * font
Definition: rviewDModes.hh:324
int pixHeight
Definition: rviewDModes.hh:432
virtual ~rviewHeightImage(void)
unsigned int baseSize
Definition: rviewDModes.hh:990
virtual char * setupEnvironment(int w, int h)
Definition: rviewDModes.hh:473
Definition: rviewDModes.hh:526
static const int image_theight
Definition: rviewDModes.hh:387
int rect_y1
Definition: rviewDModes.hh:328
void ensureLoadedView(void)
#define FALSE
Definition: defs.h:70
void redrawBar(wxDC *cdc, int height, int dim, int startOff, int endOff, float scale, float posx, float stepx, float orgy)
void SetDragBox(int x0, int y0, int x1, int y1)
wxGroupBox * renderGroup
Definition: rviewDModes.hh:166
virtual int requestQuit(int level)
wxGroupBox * voxelGroup
Definition: rviewDModes.hh:166
static const char * view_CspaceProj
Definition: rviewDModes.hh:461
rviewImageSetup * setupWindow
Definition: rviewDModes.hh:600
virtual int saveView(FILE *fp)
void deleteViewCspace(void)
r_Minterval * csInterv
Definition: rviewDModes.hh:449
virtual bool moviePossible(void) const
virtual bool doUpdate(int updateFlags)
virtual int openViewer(void)
wxBrush brush_r
Definition: rviewDModes.hh:875
double cubeScale
Definition: rviewDModes.hh:595
void ToggleDragBox(bool clearMode)
virtual void loadViewFinished(void)
Definition: rviewUtils.hh:636
virtual bool moviePossible(void) const
r_Ref< r_GMarray > mddObj
Definition: rviewDModes.hh:980
wxDC * myDC
Definition: rviewDModes.hh:318
static const int strview_msgheight
Definition: rviewDModes.hh:1086
virtual char * initMode(void)
colourspaceMapper * csmap
Definition: rviewDModes.hh:441
static const int strview_minheight
Definition: rviewDModes.hh:1088
~chartCanvas(void)
rendererCurrentView * rcurview
Definition: rviewDModes.hh:602
int pixPad
Definition: rviewDModes.hh:432
rviewText * zoff
Definition: rviewDModes.hh:278
char * projectImage(void)
virtual rviewFrameType getFrameType(void) const
static const int rctrl_sheight
Definition: rviewDModes.hh:217
rviewStringViewer(mdd_frame *mf, unsigned int flags=0)
Definition: rviewDModes.hh:497
Definition: rviewDModes.hh:1069
Definition: rviewDisplay.hh:56
void unlinkParent(void)
static const int imgset_hgtheight
Definition: rviewDModes.hh:150
rviewText * lightsAngle
Definition: rviewDModes.hh:172
void updateParameters(void)
int pixHeight
Definition: rviewDModes.hh:326
void AdjustDragBox(int x1, int y1)
virtual bool moviePossible(void) const
virtual void OnMenuCommand(int id)
int virtualPitch
Definition: rviewDModes.hh:433
static const char * view_StepSize
Definition: rviewDModes.hh:940
static const int rcview_width
Definition: rviewDModes.hh:267
r_Point pt2
Definition: rviewDModes.hh:806
virtual rviewFrameType getFrameType(void) const
virtual int openViewer(void)
rviewText * stText
Definition: rviewDModes.hh:937
virtual bool doUpdate(int updateFlags)
static const char * view_UseCspace
Definition: rviewDModes.hh:459
Definition: rviewUtils.hh:671
virtual void prepareToDie(void)
int stepy
Definition: rviewDModes.hh:981
void checkModeMenu(void)
static const int txcanv_cospace
Definition: rviewDModes.hh:971
static const char * view_ScrollPos
Definition: rviewDModes.hh:458
r_Point pt1
Definition: rviewDModes.hh:870
int newProjection(void)
static const int image_totaly
Definition: rviewDModes.hh:398
void setData(mdd_frame *mf, rviewBaseType bt, unsigned int bs)
virtual int openViewer(void)
virtual int process(wxObject &obj, wxEvent &evt)
virtual int fileMenuInitHook(wxMenu *menu)
textCanvas(wxWindow *parent, int x, int y, int w, int h, long style=0)
rviewImageMode
Definition: rviewDModes.hh:78
Definition: rviewUtils.hh:701
int rect_x0
Definition: rviewDModes.hh:328
wxBrush brush_b
Definition: rviewDModes.hh:875
virtual void loadViewFinished(void)
void SetAspectRatio(double ratio)
rviewRenderImage * parent
Definition: rviewDModes.hh:164
void setStep(int sx, int sy)
static const int chart_minwidth
Definition: rviewDModes.hh:916
virtual ~rviewImage(void)
Definition: rviewColMap.hh:193
Definition: rviewDModes.hh:832
void updateView(const vertex_fp &angles, long off, double scale)
static const double scaleStep
Definition: rviewDModes.hh:793
virtual void processMouseEvent(wxMouseEvent &mevt)
virtual void loadViewFinished(void)
static const char * view_LightAmbient
Definition: rviewDModes.hh:613
static const int chart_minheight
Definition: rviewDModes.hh:917
~rviewFlatImage(void)
virtual void OnSize(int w, int h)
static const char * view_GridSize
Definition: rviewDModes.hh:623
void paintCore(int x, int y)
static const char * view_VoxColour
Definition: rviewDModes.hh:622
virtual ~rviewFlatBaseImage(void)
virtual int readView(const char *key, const char *value)
rviewText * coText
Definition: rviewDModes.hh:937
~rviewChart(void)
int depthForHeightfield(void) const
virtual int openViewer(void)
r_Point pt2
Definition: rviewDModes.hh:986
virtual int openViewer(void)
virtual rviewFrameType getFrameType(void) const
static const char * view_CspaceRange
Definition: rviewDModes.hh:465
double scaleValue
Definition: rviewDModes.hh:435
virtual int process(wxObject &obj, wxEvent &evt)
void OnPaint(void)
Definition: rviewDModes.hh:634
void readNewSetup(void)
wxPen pen_b
Definition: rviewDModes.hh:876
rendererControl * rcontrol
Definition: rviewDModes.hh:601
virtual int getViewerType(void) const
virtual void OnMenuCommand(int id)
virtual void fillBuffer(void)
int height
Definition: rviewDModes.hh:814
static const int rcview_bheight
Definition: rviewDModes.hh:263
static const char * view_LightDir
Definition: rviewDModes.hh:617
virtual void processMouseEvent(wxMouseEvent &mevt)
rviewText * lightsAmbient
Definition: rviewDModes.hh:172
void UpdateDragBox(int x1, int y1)
virtual void fillBuffer(void)
virtual bool canRotateObject(void) const
static const int strview_ctrly
Definition: rviewDModes.hh:1089
virtual const char * getFrameName(void) const
rviewButton * okBut
Definition: rviewDModes.hh:177
rviewCheckBox * useVoxCol
Definition: rviewDModes.hh:174
rviewText * syText
Definition: rviewDModes.hh:1053
rviewSlider * roty
Definition: rviewDModes.hh:228
static const int imgset_choheight
Definition: rviewDModes.hh:156
virtual int viewMenuInitHook(wxMenu *menu)
static const char * view_ScaleHeight
Definition: rviewDModes.hh:624
double max
Definition: rviewDModes.hh:871
bool compareViews(const view_desc_t &v1, const view_desc_t &v2)
bool cosys
Definition: rviewDModes.hh:935
static const int table_minwidth
Definition: rviewDModes.hh:1030
Definition: gmarray.hh:66
virtual void loadViewFinished(void)
virtual void fillBackgroundCore(rviewBaseType bt, double minVal)
static const int table_cheight
Definition: rviewDModes.hh:1028
virtual int saveView(FILE *fp)
wxPanel * panel
Definition: rviewDModes.hh:227
~textCanvas(void)
int mousebut
Definition: rviewDModes.hh:438
void updatePixmap(char *oldData, char *newData)
void OnSize(int w, int h)
virtual int process(wxObject &obj, wxEvent &evt)
void translateBufferToCspace(rviewBaseType bt, double *useMinVal=NULL, double *useMaxVal=NULL)
void setVars(int s, double cs, int ds, bool cy, rviewChartMode cm)
rviewText * scaleString
Definition: rviewDModes.hh:767
Definition: cube_render.h:95
void unlinkParent(void)
virtual int getViewerType(void) const
static const int rctrl_height
Definition: rviewDModes.hh:220
rviewChoice * kernelSize
Definition: rviewDModes.hh:171
wxBrush brush_g
Definition: rviewDModes.hh:875
rviewButton * resetY
Definition: rviewDModes.hh:229
int rviewPrepareFlatProjection(rviewFlatProjEnv &penv)
long zoff
Definition: rviewDModes.hh:594
int lastMode
Definition: rviewDModes.hh:1050
bool initVoxParams
Definition: rviewDModes.hh:668
double scale
Definition: rviewDModes.hh:809
rviewButton * lastZoomBut
Definition: rviewDModes.hh:765
rviewChartMode cmode
Definition: rviewDModes.hh:873
wxRect textBBox
Definition: rviewDModes.hh:330
rviewFrameType
Definition: rviewUtils.hh:443
void setActiveMode(int mode)
static const int image_sheight
Definition: rviewDModes.hh:372
virtual bool canRotateObject(void) const
double costep
Definition: rviewDModes.hh:871
static const int image_chkwidth
Definition: rviewDModes.hh:380
double initialScale
Definition: rviewDModes.hh:784
void setData(mdd_frame *mf, rviewBaseType bt)
r_Point pt2
Definition: rviewDModes.hh:870
static const char * view_UseVoxColour
Definition: rviewDModes.hh:621
static const char * view_StepSize
Definition: rviewDModes.hh:1057
rviewRenderImage(mdd_frame *mf, int es, unsigned int flags=0)
static const int imgset_renheight
Definition: rviewDModes.hh:148
view_desc_t thisView
Definition: rviewDModes.hh:781
int dimMDD
Definition: rviewDModes.hh:981
r_Point pt1
Definition: rviewDModes.hh:986
virtual char * movieNewFrame(void)
int lastMovieMode
Definition: rviewDModes.hh:453
Definition: cube_render.h:167
rviewRenderImage * parent
Definition: rviewDModes.hh:231
static const int image_pbwidth
Definition: rviewDModes.hh:374
chartCanvas(wxWindow *parent, int x, int y, int w, int h, long style=0)
static const int rctrl_width
Definition: rviewDModes.hh:219
float f
Definition: rviewDModes.hh:591
static const int chcanv_colength
Definition: rviewDModes.hh:856
static const int rctrl_rheight
Definition: rviewDModes.hh:215
virtual void updateCurrentView(void)
virtual char * initMode(void)
int pixWidth
Definition: rviewDModes.hh:432
rviewText * dataText
Definition: rviewDModes.hh:937
void CalcTextExtent(char *b, float &width, float &height)
Definition: rviewDModes.hh:290
static const int imgset_height
Definition: rviewDModes.hh:159
void anglesToMatrix(const vertex_fp &angles)
int coleft
Definition: rviewDModes.hh:983
rviewHeightImage(mdd_frame *mf, unsigned int flags=0)
rviewText * rotx
Definition: rviewDModes.hh:277
wxBrush back
Definition: rviewDModes.hh:874
int pixDepth
Definition: rviewDModes.hh:432
bool doFullRangeCspace
Definition: rviewDModes.hh:443
Definition: rviewDModes.hh:889
virtual void projectObjectHook(void)
Definition: rviewDModes.hh:953
r_Point pt1
Definition: rviewDModes.hh:806
int scrolly
Definition: rviewDModes.hh:436
virtual void redrawSettingsChanged(void)
virtual char * movieNewFrame(void)
static const int imgset_bwidth
Definition: rviewDModes.hh:152
static int getPixmapFlags(void)
static const char * view_BoxScale
Definition: rviewDModes.hh:797
virtual int openViewer(void)
rviewText * clipzWidget
Definition: rviewDModes.hh:167
static const int chart_totaly
Definition: rviewDModes.hh:919
rviewText * voxColour
Definition: rviewDModes.hh:175
static const int image_twidth
Definition: rviewDModes.hh:386
virtual int process(wxObject &obj, wxEvent &evt)
Definition: wx_pixmap.h:114
int offY
Definition: rviewDModes.hh:327
unsigned int freeDims
Definition: rviewDModes.hh:439
static int parseLightDirection(const char *dir)
unsigned long l
Definition: rviewDModes.hh:590
bool boxState
Definition: rviewDModes.hh:769
void setCoSys(bool cs, int &cl, int &ct)
rviewCheckBox * useRgbBrightness
Definition: rviewDModes.hh:169
void adjustBoxToRatio(void)
wxPanel * panel
Definition: rviewDModes.hh:275
Definition: rviewUtils.hh:317
virtual void rotateObject(wxMouseEvent &mevt)
static const char * view_LightAngle
Definition: rviewDModes.hh:615
void OnSize(int w, int h)
void setProjection(r_Point &pt1, r_Point &pt2, unsigned int fd, r_Point *mapIndex=NULL)
static const int table_totaly
Definition: rviewDModes.hh:1033
int scroll
Definition: rviewDModes.hh:934
static const char * view_UseLighting
Definition: rviewDModes.hh:612
static const int image_bbwidth
Definition: rviewDModes.hh:383
static const int table_theight
Definition: rviewDModes.hh:1025
collection_desc * collDesc
Definition: rviewDModes.hh:791
rviewButton * playBack
Definition: rviewDModes.hh:451
rviewCheckBox * csBox
Definition: rviewDModes.hh:1054
static const char * view_PixThreshLow
Definition: rviewDModes.hh:607
wxPen fpen
Definition: rviewDModes.hh:323
static const int image_swidth
Definition: rviewDModes.hh:371
rviewText * lightsGain
Definition: rviewDModes.hh:172
virtual int requestQuit(int level)
virtual const char * getFrameName(void) const
rviewText * cubeScale
Definition: rviewDModes.hh:279
rviewChartMode
Definition: rviewDModes.hh:828
int process(wxObject &obj, wxEvent &evt)
static const int imgset_voxheight
Definition: rviewDModes.hh:149
static const char * view_Rotation
Definition: rviewDModes.hh:625
rviewBaseType
Definition: rviewUtils.hh:97
static const char * view_PixThreshHigh
Definition: rviewDModes.hh:608
wxBrush textBack
Definition: rviewDModes.hh:321
virtual int openViewer(void)
rview_image_setup setup
Definition: rviewDModes.hh:599
static const int table_cwidth
Definition: rviewDModes.hh:1027
virtual int getViewerType(void) const
rviewText * rotz
Definition: rviewDModes.hh:277
virtual const r_Minterval & getVirtualDomain(void) const
rviewSlider * rotx
Definition: rviewDModes.hh:228
virtual const char * getFrameName(void) const
rviewCheckBox * csBox
Definition: rviewDModes.hh:938
static const char * view_UseBBox
Definition: rviewDModes.hh:672
int width
Definition: rviewDModes.hh:814
void label(void)
virtual int getViewerType(void) const
virtual void label(void)
static const int chart_ctrly
Definition: rviewDModes.hh:918
virtual void OnMenuCommand(int id)
DynamicStack< view_desc_t > viewHistory
Definition: rviewDModes.hh:787
void scaleViewBy(double scale)
double getLastScale(void) const
static const int rcview_bwidth
Definition: rviewDModes.hh:262
int active
Definition: rviewDModes.hh:232
rviewBaseType baseType
Definition: rviewDModes.hh:872
static const char * view_ScrollPos
Definition: rviewDModes.hh:1058
chartCanvas * canvas
Definition: rviewDModes.hh:930
virtual int saveView(FILE *fp)
static const int imgset_chowidth
Definition: rviewDModes.hh:155
void OnPaint(void)
static const char * view_CoSys
Definition: rviewDModes.hh:1059
int numberBase
Definition: rviewDModes.hh:987
union rviewRenderImage::@0 voxColour
void updateSettings(int setFlags)
int numberBase
Definition: rviewDModes.hh:1055
void OnSize(int w, int h)
static const int table_minheight
Definition: rviewDModes.hh:1031
Definition: rviewUtils.hh:331
int offX
Definition: rviewDModes.hh:327
static const int image_dragtspace
Definition: rviewDModes.hh:393
virtual void OnSize(int w, int h)
virtual void loadViewFinished(void)
int setProjection(r_Point &p1, r_Point &p2)
virtual void loadViewFinished(void)
virtual void projectObjectHook(void)
virtual const char * getFrameName(void) const
int newProjection(void)
wxMessage * msgString
Definition: rviewDModes.hh:1096
virtual rviewFrameType getFrameType(void) const
bool cspaceForType
Definition: rviewDModes.hh:446
virtual char * initMode(void)=0
int fieldsy
Definition: rviewDModes.hh:1049
virtual char * initMode(void)
virtual ~rviewVolumeImage(void)
static const int chart_twidth
Definition: rviewDModes.hh:910
Definition: rviewDModes.hh:118
rview_image_setup * imgSetup
Definition: rviewDModes.hh:178
Definition: rviewColMap.hh:54
rviewChartMode cmode
Definition: rviewDModes.hh:936
float drx
Definition: rviewDModes.hh:597
Definition: rviewDModes.hh:94
virtual const char * getFrameName(void) const
int step
Definition: rviewDModes.hh:869
rviewButton * closeButton
Definition: rviewDModes.hh:276
static const int imgset_theight
Definition: rviewDModes.hh:144
rviewText * gridSize
Definition: rviewDModes.hh:176
virtual rviewFrameType getFrameType(void) const
void OnMenuCommand(int id)
wxFont * font
Definition: rviewDModes.hh:993
double aspectRatio
Definition: rviewDModes.hh:329
virtual rviewFrameType getFrameType(void) const
bool cosys
Definition: rviewDModes.hh:1052
int stepx
Definition: rviewDModes.hh:981
int scrollx
Definition: rviewDModes.hh:436
int rect_y0
Definition: rviewDModes.hh:328
unsigned int freeDims
Definition: rviewDModes.hh:985
Definition: rviewDModes.hh:802
rviewButton * playFwd
Definition: rviewDModes.hh:451
void EstimateCellSize(int &width, int &height)
static const char * view_ScaleValue
Definition: rviewDModes.hh:466
void ensureViewCspace(void)
virtual char * setupEnvironment(int w, int h)=0
static const int rcview_theight
Definition: rviewDModes.hh:265
static const char * view_LightDist
Definition: rviewDModes.hh:618
rviewButton * actionBut
Definition: rviewDModes.hh:230
rviewTable(mdd_frame *mf, unsigned int flags=0)
virtual int openViewer(void)
int dim2
Definition: rviewDModes.hh:807
mdd_desc * mddDesc
Definition: rviewDModes.hh:712
static const int rctrl_border
Definition: rviewDModes.hh:209
static const int chart_cheight
Definition: rviewDModes.hh:914
rviewButton * playStop
Definition: rviewDModes.hh:451
textCanvas * canvas
Definition: rviewDModes.hh:1046
bool showScaleSlider(void) const
Definition: rviewDModes.hh:342
pixmapCanvas * pcanv
Definition: rviewDModes.hh:430
int playDirection
Definition: rviewDModes.hh:452
virtual char * initMode(void)
static const int chart_cwidth
Definition: rviewDModes.hh:913
Definition: rviewDModes.hh:771
static const char * view_WeightThresh
Definition: rviewDModes.hh:609
virtual bool showScaleSlider(void) const
virtual rviewFrameType getFrameType(void) const
int stepx
Definition: rviewDModes.hh:1047
char * imgData
Definition: rviewDModes.hh:434
Definition: rviewDModes.hh:833
r_Fast_Base_Scale * scaleObject
Definition: rviewDModes.hh:789
virtual const char * getFrameName(void) const
rviewChoice * kernelType
Definition: rviewDModes.hh:171
static const char * view_CurrentBox
Definition: rviewDModes.hh:796
static const int strview_totaly
Definition: rviewDModes.hh:1090
double scale
Definition: rviewDModes.hh:773
static const int strview_minwidth
Definition: rviewDModes.hh:1087
rviewChart(mdd_frame *mf, unsigned int flags=0)
bool doProjRangeCspace
Definition: rviewDModes.hh:444
rviewVolumeImage(mdd_frame *mf, unsigned int flags=0)
static const int imgset_bheight
Definition: rviewDModes.hh:153
rviewCheckBox * useLights
Definition: rviewDModes.hh:170
float mousey
Definition: rviewDModes.hh:437
static const int txcanv_colspace
Definition: rviewDModes.hh:973
Definition: rviewDModes.hh:1002
static const char * view_NumBase
Definition: rviewDModes.hh:1060
virtual int userEvent(const user_event &ue)
virtual int newProjection(void)=0
tex_desc * texDesc
Definition: rviewDModes.hh:666
virtual int configMenuInitHook(wxMenu *menu)
Definition: cube_render.h:144
Definition: rviewUtils.hh:663
int scrolly
Definition: rviewDModes.hh:1048
colourspace_params * cspar
Definition: rviewDModes.hh:455
virtual void fillBackgroundCore(rviewBaseType bt, double minVal)
int cspaceState
Definition: rviewDModes.hh:812
int dim2
Definition: rviewDModes.hh:984
void fillBufferBackground(bool doCspace, bool &cspaceOK, r_Ref< r_GMarray > &obj, colourspaceMapper **csm, r_Minterval *csdom, rviewBaseType bt, bool fullRange, double *useMinVal=NULL)
Definition: rviewDModes.hh:679
void newView(bool loadImage=TRUE)
int depth
Definition: rviewDModes.hh:815
wxPixmap * pixmap
Definition: rviewDModes.hh:429
Definition: rviewUtils.hh:297
void OnPaint(void)
rviewButton * zoomOutBut
Definition: rviewDModes.hh:764
float dry
Definition: rviewDModes.hh:597
wxBrush back
Definition: rviewDModes.hh:991
Definition: rviewUtils.hh:680
static const int imgset_width
Definition: rviewDModes.hh:158
void OnSize(int w, int h)
voxel_desc * voxDesc
Definition: rviewDModes.hh:667
virtual void rotateObject(wxMouseEvent &mevt)
wxBrush brush
Definition: rviewDModes.hh:319
bool doValToCspace
Definition: rviewDModes.hh:442
virtual rviewFrameType getFrameType(void) const
void getLightPos(vertex_fp *lpos)
static const int image_draghotzone
Definition: rviewDModes.hh:395
static const keyword_to_ident_c normalKernelTypes[]
Definition: rviewDModes.hh:181
virtual bool doUpdate(int updateFlags)=0
void checkModeMenu(void)
static const char * view_ScrollPos
Definition: rviewDModes.hh:942
view_desc_t * loadedView
Definition: rviewDModes.hh:785
virtual bool OnClose(void)
virtual void label(void)
virtual int configMenuInitHook(wxMenu *menu)
virtual char * setupEnvironment(int w, int h)
~rendererControl(void)
virtual int readView(const char *key, const char *value)
int dim2
Definition: rviewDModes.hh:775
static const int rctrl_bheight
Definition: rviewDModes.hh:212
rviewSlider * rotz
Definition: rviewDModes.hh:228
#define TRUE
Definition: defs.h:67
int pixWidth
Definition: rviewDModes.hh:326
static const char * view_CoSys
Definition: rviewDModes.hh:943
static const int rctrl_bwidth
Definition: rviewDModes.hh:211
static const int chart_theight
Definition: rviewDModes.hh:911
virtual void OnSize(int w, int h)
Definition: minterval.hh:249
virtual char * initMode(void)
~pixmapCanvas(void)
wxFont * font
Definition: rviewDModes.hh:877
int stepy
Definition: rviewDModes.hh:1047
virtual int getViewerType(void) const
virtual void label(void)
virtual ~rviewRenderImage(void)
int process(wxObject &obj, wxEvent &evt)
static const int image_bbheight
Definition: rviewDModes.hh:384
int dim1
Definition: rviewDModes.hh:807
virtual int readView(const char *key, const char *value)
int cotop
Definition: rviewDModes.hh:983
static const int image_minwidth
Definition: rviewDModes.hh:377
rviewButton * resetZ
Definition: rviewDModes.hh:229
static const char * view_CspaceType
Definition: rviewDModes.hh:464