ALBA
albaGUILutEditor.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaGUILutEditor
5 Authors: Silvano Imboden
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16
17#ifndef __albaGUILutEditor_H__
18#define __albaGUILutEditor_H__
19
20#include "albaDecl.h"
21#include "albaEvent.h"
22#include "albaLUTLibrary.h"
23
24#include "albaGUILutWidget.h"
25#include "albaGUILutSwatch.h"
26#include "albaGUIColorWidget.h"
27
28#include "vtkLookupTable.h"
46class albaGUILutEditor: public wxPanel, public albaObserver
47{
48public:
49 albaGUILutEditor(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
50 const wxSize& size = wxSize(300,800), long style = wxTAB_TRAVERSAL);
52
53 virtual void SetListener(albaObserver *Listener) {m_Listener = Listener;};
54 void OnEvent(albaEventBase *alba_event);
55
57 void SetLut(vtkLookupTable *lut);
58
60 static void ShowLutDialog(vtkLookupTable *lut, albaObserver *listener = NULL, int id = MINID);
61
62protected:
63
64 void UpdateInfo();
65
67 void UpdateLut();
68
70
72 void CopyLut(vtkLookupTable *from, vtkLookupTable *to);
73
74 //void OnComboSelection(wxCommandEvent &event);
75
77
80
82 double m_ValueRange[2];
83 wxString m_Info; // selected indexes
86
90
92 wxComboBox *m_UserPresetCombo;
93 wxComboBox *m_PresetCombo;
94 vtkLookupTable *m_ExternalLut;
95 vtkLookupTable *m_Lut;
96 DECLARE_EVENT_TABLE()
97};
98#endif
MINID
Definition: albaDecl.h:420
Implementation of the message object for the Subject/Observer design pattern.
Definition: albaEventBase.h:49
albaGUIColorWidget : helper class for albaGUILutEditor and albaGUIColorEditor.
albaGUILutEditor : vtkLookupTable Editor
vtkLookupTable * m_ExternalLut
Given lut that will be modified by "ok" or "apply".
void OnEvent(albaEventBase *alba_event)
process the events sent by subjects
wxString m_UserLutLibraryDir
wxString m_NewUserLutName
albaGUILutSwatch * m_LutSwatch
void SetLut(vtkLookupTable *lut)
Assign the external lookup table to the widget.
albaObserver * m_Listener
wxComboBox * m_UserPresetCombo
void UpdateWidgetsOnLutChange()
static void ShowLutDialog(vtkLookupTable *lut, albaObserver *listener=NULL, int id=MINID)
Show the dialog.
double m_ValueRange[2]
Value range of the current lookup table.
wxComboBox * m_PresetCombo
albaLUTLibrary * m_UserLutLibrary
virtual ~albaGUILutEditor()
albaGUILutEditor(wxWindow *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(300, 800), long style=wxTAB_TRAVERSAL)
int m_NumEntry
Number of colors of the current lookup table.
int m_Preset
Index of lookup table preset.
albaGUIColorWidget * m_ColorWidget
void UpdateLut()
Update the internal Lookup Table according to the preset selected from the combo box.
void CopyLut(vtkLookupTable *from, vtkLookupTable *to)
Copy the external Lookup Table given by the user to the internal one.
vtkLookupTable * m_Lut
Internal lut – initialized in SetLut.
virtual void SetListener(albaObserver *Listener)
albaGUILutWidget * m_LutWidget
albaGUILutSwatch : widget representing a LUT, usually used to call the LutEditor.
albaGUILutWidget : Helper class for albaLutEditor
A component to handle lookup table libraries.
Interface implementing the Observer of the Subject/Observer design pattern.
Definition: albaObserver.h:36