CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
ctkDICOMItemView.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Library: CTK
4 
5  Copyright (c) Kitware Inc.
6 
7  Licensed under the Apache License, Version 2.0 (the "License");
8  you may not use this file except in compliance with the License.
9  You may obtain a copy of the License at
10 
11  http://www.apache.org/licenses/LICENSE-2.0.txt
12 
13  Unless required by applicable law or agreed to in writing, software
14  distributed under the License is distributed on an "AS IS" BASIS,
15  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  See the License for the specific language governing permissions and
17  limitations under the License.
18 
19 =========================================================================*/
20 
21 #ifndef __ctkDICOMItemView_h
22 #define __ctkDICOMItemView_h
23 
25 #include <QWidget>
26 #include <QImage>
27 #include <QModelIndex>
28 
30 #include "ctkQImageView.h"
31 #include "ctkPimpl.h"
32 #include "ctkDICOMWidgetsExport.h"
33 
34 class ctkDICOMItemViewPrivate;
35 class DicomImage;
36 
40 class CTK_DICOM_WIDGETS_EXPORT ctkDICOMItemView
41 : public ctkQImageView
42 {
43 
44  Q_OBJECT
45 
46 public:
47 
50 
52  ctkDICOMItemView( QWidget * parent = 0 );
53 
55  virtual ~ctkDICOMItemView( void );
56 
57  void setDatabaseDirectory(const QString& directory);
58 
59  QModelIndex currentImageIndex();
60 
61 Q_SIGNALS:
62 
65 
66  void imageDisplayed(int imageID, int count);
67 
68 public Q_SLOTS:
69 
70  void addImage( const QImage & image );
71 
72  void addImage( DicomImage & dcmImage, bool defaultIntensity = true);
73 
74  void onModelSelected(const QModelIndex& index);
75 
76  void displayImage(int imageIndex);
77 
78  virtual void update( bool zoomChanged=false, bool sizeChanged=false );
79 
80 protected:
81 
83  ctkDICOMItemView( ctkDICOMItemViewPrivate & pvt,
84  QWidget* parent=0 );
85 
87  virtual void mousePressEvent( QMouseEvent * event );
88  virtual void mouseMoveEvent( QMouseEvent * event );
89 
90 private:
91 
92  QScopedPointer< ctkDICOMItemViewPrivate > d_ptr;
93 
94  Q_DECLARE_PRIVATE( ctkDICOMItemView );
95 
96  Q_DISABLE_COPY( ctkDICOMItemView );
97 
98  void emitImageDisplayedSignal(int imageID, int count);
99 
100 };
101 
102 #endif
void addImage(const QImage &image)
void displayImage(int imageIndex)
void addImage(DicomImage &dcmImage, bool defaultIntensity=true)
void imageDisplayed(int imageID, int count)
virtual ~ctkDICOMItemView(void)
Destructor.
ctkQImageView Superclass
Superclass typedef.
virtual void mousePressEvent(QMouseEvent *event)
re-implemented QWidget event functions
void requestPreviousImage()
virtual void update(bool zoomChanged=false, bool sizeChanged=false)
ctkDICOMItemView(ctkDICOMItemViewPrivate &pvt, QWidget *parent=0)
protected constructor to derive private implementations
void setDatabaseDirectory(const QString &directory)
void onModelSelected(const QModelIndex &index)
QModelIndex currentImageIndex()
virtual void mouseMoveEvent(QMouseEvent *event)
void requestNextImage()
ctkDICOMItemView(QWidget *parent=0)
Constructor.