SIVIC API  0.9.26
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
svkImageViewer2.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2009-2014 The Regents of the University of California.
3  * All Rights Reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  * • Redistributions of source code must retain the above copyright notice,
8  * this list of conditions and the following disclaimer.
9  * • Redistributions in binary form must reproduce the above copyright notice,
10  * this list of conditions and the following disclaimer in the documentation
11  * and/or other materials provided with the distribution.
12  * • None of the names of any campus of the University of California, the name
13  * "The Regents of the University of California," or the names of any of its
14  * contributors may be used to endorse or promote products derived from this
15  * software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20  * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
21  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
26  * OF SUCH DAMAGE.
27  */
28 
29 
30 
31 /*
32  * $URL$
33  * $Rev$
34  * $Author$
35  * $Date$
36  *
37  * Authors:
38  * Jason C. Crane, Ph.D.
39  * Beck Olson
40  */
41 
42 /*
43  * NOTE:: SOME SOURCE WAS DIRECTLY TAKEN FROM VTKIMAGEVIEWER2
44  */
45 
46 
47 #ifndef SVK_IMAGE_VIEWER_2_H
48 #define SVK_IMAGE_VIEWER_2_H
49 
50 #include <vtkImageViewer2.h>
51 #include <vtkImageMapper3D.h>
52 #include <vtkTransform.h>
53 #include <vtkImageActor.h>
54 #include <vtkRenderWindow.h>
55 #include <vtkRenderWindowInteractor.h>
56 #include <vtkInteractorStyleImage.h>
57 #include <vtkCommand.h>
58 #include <vtkCamera.h>
59 #include <vtkImageMapToWindowLevelColors.h>
60 
62 #include <svkImageData.h>
63 #include <svkOrientedImageActor.h>
64 #include <vtkRenderer.h>
65 #include <vtkCollectionIterator.h>
66 
67 
68 namespace svk {
69 
70 
71 class svkImageViewer2 : public vtkImageViewer2
72 {
73 
74  public:
75 
76  // vtk type revision macro
77  vtkTypeMacro( svkImageViewer2, vtkImageViewer2 );
78 
79  static svkImageViewer2* New();
80 
81  void SetInputData( svkImageData *in );
82  virtual void SetSlice( int slice );
83  virtual void SetSlice( int slice, svkDcmHeader::Orientation sliceOrientation );
84  virtual void SetActiveVolume( int volume );
85  void Render();
86  void ResetCamera();
89  int GetSlice();
91  virtual void SetColorLevel(double s);
92  virtual void SetColorWindow(double s);
93  virtual void SetOrientation( svkDcmHeader::Orientation orientation );
97  virtual svkImageData* GetInput();
98  virtual bool AreOrthogonalImagesOn();
99  void SetInteractorStyle( vtkInteractorStyleImage* style );
100  void SetCameraZoom( double zoom );
101 
105  void UpdateInputInformation();
106 
107  protected:
108 
109  svkImageViewer2();
111 
113 
116 
118 
120  void InstallPipeline();
124 
125  //svkOpenGLOrientedImageActor* orthImageActor1;
126  //svkOpenGLOrientedImageActor* orthImageActor2;
127  //svkImageMapToWindowLevelColors* orthWinLevel1;
128  //svkImageMapToWindowLevelColors* orthWinLevel2;
132 
133  private:
134  double cameraZoom;
135 
136 
137 };
138 
139 
140 } //svk
141 
142 
143 #endif //SVK_IMAGE_VIEWER_2_H
virtual void SetColorLevel(double s)
Definition: svkImageViewer2.cc:612
virtual svkOrientedImageActor * GetImageActor(svkDcmHeader::Orientation actorOrientation=svkDcmHeader::UNKNOWN_ORIENTATION)
Definition: svkImageViewer2.cc:749
svkDcmHeader::Orientation orientation
Definition: svkImageViewer2.h:117
Definition: svkImageMapToWindowLevelColors.h:64
virtual svkDcmHeader::Orientation GetOrientation()
Definition: svkImageViewer2.cc:740
Definition: svkImageActor.h:75
int orthSlice1
Definition: svkImageViewer2.h:114
svkOrientedImageActor * axialImageActor
Definition: svkImageViewer2.h:121
svkImageMapToWindowLevelColors * coronalWinLevel
Definition: svkImageViewer2.h:130
Definition: svkImageViewer2.h:71
int GetSlice()
Definition: svkImageViewer2.cc:405
void UpdateInputInformation()
Definition: svkImageViewer2.cc:777
void InitializeOrthogonalActors()
Definition: svkImageViewer2.cc:623
void SetCameraZoom(double zoom)
Definition: svkImageViewer2.cc:592
void Render()
Definition: svkImageViewer2.cc:342
svkImageViewer2()
Constructor.
Definition: svkImageViewer2.cc:56
svkImageMapToWindowLevelColors * sagittalWinLevel
Definition: svkImageViewer2.h:131
int coronalSlice
Definition: svkImageViewer2.h:103
void SetInputData(svkImageData *in)
Definition: svkImageViewer2.cc:304
void InstallPipeline()
Definition: svkImageViewer2.cc:259
Orientation
Definition: svkDcmHeader.h:101
~svkImageViewer2()
Destructor.
Definition: svkImageViewer2.cc:89
virtual svkImageData * GetInput()
Definition: svkImageViewer2.cc:768
virtual bool AreOrthogonalImagesOn()
Definition: svkImageViewer2.cc:695
virtual void SetOrientation(svkDcmHeader::Orientation orientation)
Definition: svkImageViewer2.cc:731
static svkImageViewer2 * New()
vtkTypeMacro(svkImageViewer2, vtkImageViewer2)
svkImageData * data
Definition: svkImageViewer2.h:112
virtual void SetColorWindow(double s)
Definition: svkImageViewer2.cc:601
int sagittalSlice
Definition: svkImageViewer2.h:104
virtual void SetActiveVolume(int volume)
Definition: svkImageViewer2.cc:485
void SetInteractorStyle(vtkInteractorStyleImage *style)
Definition: svkImageViewer2.cc:708
int orthSlice2
Definition: svkImageViewer2.h:115
void ResetCamera()
Definition: svkImageViewer2.cc:507
Definition: svkImageData.h:107
int axialSlice
Definition: svkImageViewer2.h:102
svkOrientedImageActor * sagittalImageActor
Definition: svkImageViewer2.h:123
svkOrientedImageActor * coronalImageActor
Definition: svkImageViewer2.h:122
virtual void SetSlice(int slice)
Definition: svkImageViewer2.cc:432
void TurnOrthogonalImagesOn()
Definition: svkImageViewer2.cc:639
svkImageMapToWindowLevelColors * axialWinLevel
Definition: svkImageViewer2.h:129
Definition: svkDcmHeader.h:102
void TurnOrthogonalImagesOff()
Definition: svkImageViewer2.cc:667