ALBA
albaGUIImageViewer.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaGUIImageViewer
5 Authors: Nicola Vanella
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 __albaGUIImageViewer_H__
18#define __albaGUIImageViewer_H__
19
20#include "albaObserver.h"
21#include "albaServiceClient.h"
22
23//----------------------------------------------------------------------------
24// forward reference
25//----------------------------------------------------------------------------
27class albaGUIButton;
28class albaGUIDialog;
29class albaRWI;
30class albaVME;
31class albaVMEGroup;
32class albaVMEImage;
33class vtkActor;
34class vtkImageData;
35class vtkPlaneSource;
36class vtkPolyDataMapper;
37class vtkTexture;
38
39//----------------------------------------------------------------------------
40// Widgets ID's
41//----------------------------------------------------------------------------
43{
56};
57
62class ALBA_EXPORT albaGUIImageViewer : public albaObserver, albaServiceClient
63{
64public:
65
66 albaGUIImageViewer(albaObserver *Listener, const albaString &label = _("ImageViewer"));
68
70 virtual void OnEvent(albaEventBase *alba_event);
71
73 void SetListener(albaObserver *Listener) { m_Listener = Listener; };
74
76 void ShowImageDialog(albaVMEGroup *group, int selection = 0);
77
79
80 void Reset();
81
83 int GetSelection() { return m_ImageSelection; };
84
85 void UpdateSelectionDialog(int selection);
86
87 void SetTitle(wxString title) { m_TitleDialog = title; };
88 void EnableOkButton(bool enable) { m_EnableOkButton = enable; };
89 void EnablePrintButton(bool enable) { m_EnablePrintButton = enable; };
90 void EnableDeleteButton(bool enable) { m_EnableDeleteButton = enable; };
91 void EnableSaveButton(bool enable) { m_EnableSaveImageButton = enable; };
92 void EnableCheckButton(bool enable) { m_EnableImageCheckButton = enable; };
93
94 void SetCheck(int check) { m_ImageCheck = check; };
95 int GetCheck() { return m_ImageCheck; };
96
97 void AddImage(wxBitmap &bitmap, wxString name);
98 void DeleteImage(int index);
100
101 int GetImagesNum() { return m_ImagesList.size(); };
102
103 void SetMouse(albaDeviceButtonsPadMouse *mouse) { m_Mouse = mouse; };
104protected:
105
107
108 int SaveVMEImage(albaVMEImage *image, wxString imageFileName, bool scale = false);
111
113
114 albaVMEGroup *m_ImagesGroup;
115
116 std::vector<wxString> m_ImagesList;
117
120
122
126 wxCheckBox *m_CheckBtn;
127
129
135
137
138 wxBoxSizer *m_RwiSizer;
139 albaRWI *m_Rwi; //Render window
140
141 vtkPlaneSource *m_PlaneSource;
142 vtkPolyDataMapper *m_DataMapper;
143 vtkTexture *m_Texture;
144 vtkActor *m_Actor;
145};
146#endif
MINID
Definition: albaDecl.h:420
ImageViewerEvents
@ ID_IMAGE_PREV
@ ID_SAVE_ALL
@ ID_SETTING_COLOR
@ ID_IMAGE_DELETE
@ ID_IMAGE_SELECT
@ ID_SETTING_ENABLE_RESOLUTION
@ ID_IMAGE_SAVE
@ ID_IMAGE_PRINT
@ ID_IMAGE
@ ID_IMAGE_NEXT
@ ID_SETTING_RESOLUTION
@ ID_OK
Implementation of the message object for the Subject/Observer design pattern.
Definition: albaEventBase.h:49
albaGUIButton inherit from wxButton.
Definition: albaGUIButton.h:35
albaGUIDialog is the base class for albaDialogs.
Definition: albaGUIDialog.h:76
class name: albaGUIImageViewer
void SetListener(albaObserver *Listener)
Set the listener of the events launched.
vtkPlaneSource * m_PlaneSource
albaGUIDialog * m_Dialog
void ShowImageDialog(albaVMEGroup *group, int selection=0)
Show ImagePreview dialog.
std::vector< wxString > m_ImagesList
wxString GetSelectedImageName()
void EnableOkButton(bool enable)
void DeleteImage(int index)
void AddImage(wxBitmap &bitmap, wxString name)
vtkPolyDataMapper * m_DataMapper
void EnableSaveButton(bool enable)
void UpdateSelectionDialog(int selection)
void SetCheck(int check)
albaObserver * m_Listener
albaVMEGroup * m_ImagesGroup
int SaveVMEImage(albaVMEImage *image, wxString imageFileName, bool scale=false)
albaGUIImageViewer(albaObserver *Listener, const albaString &label=_("ImageViewer"))
void EnableDeleteButton(bool enable)
virtual void OnEvent(albaEventBase *alba_event)
Answer to the messages coming from interface.
albaDeviceButtonsPadMouse * m_Mouse
albaGUIButton * m_NextBtn
void EnableCheckButton(bool enable)
void DeleteSelectedImage()
albaGUIButton * m_PrevBtn
void SetTitle(wxString title)
void EnablePrintButton(bool enable)
void SetMouse(albaDeviceButtonsPadMouse *mouse)
Interface implementing the Observer of the Subject/Observer design pattern.
Definition: albaObserver.h:36
albaString - performs common string operations on c-strings.
Definition: albaString.h:43
albaVME -
Definition: albaVME.h:150