SIVIC API  0.9.26
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
svkDataViewController.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 #ifndef SVK_DATA_VIEW_CONTROLLER_H
44 #define SVK_DATA_VIEW_CONTROLLER_H
45 
46 
47 #include <svkImageData.h>
48 #include <svkDataView.h>
49 #include <vtkRenderWindow.h>
50 #include <vtkRenderWindowInteractor.h>
51 #include <vtkObject.h>
52 #include <vtkCallbackCommand.h>
53 #include <vector>
54 
55 
56 namespace svk {
57 
58 
59 using namespace std;
60 
61 
62 // forward declaration:
63 class svkDataView;
64 
65 
66 // Note forward declaration to avoid self refererncing includes.
67 
68 
72 class svkDataViewController: public vtkObject
73 {
74 
75 
76  // Check access specifiers and whether some of these can be concrete
77  // implementations in base class. See if DataView setup can be automated
78  // via controller methods rather than requiring application layer to deal with it.
79  // validate inputs and initialization order... simplify life for application layer.
80  public:
81 
82  vtkTypeMacro( svkDataViewController, vtkObject);
83 
86 
87  // Methods
88  virtual void SetInput( svkImageData* data, int index = 0 ) = 0;
89  virtual svkImageData* GetData( int index = 0);
90  virtual void SetView( svkDataView* view );
91  virtual svkDataView* GetView();
92  virtual void SetSlice(int slice);
93  virtual int GetSlice();
94  // Method for setting visible data ranges, e.g. spectral view intensity, freq range:
95  virtual void SetWindowLevelRange( double lower, double upper, int index );
96  virtual void SetRWInteractor( vtkRenderWindowInteractor* rwi );
97  virtual vtkRenderWindowInteractor* GetRWInteractor( );
98 
99  protected:
100 
101  // Members:
102  vector <svkImageData*> dataVector;
104  vtkRenderWindowInteractor* rwi;
105 
106 
107 };
108 
109 
110 } //svk
111 
112 
113 #endif //SVK_DATA_VIEW_CONTROLLER_H
114 
Definition: svkDataView.h:73
svkDataView * view
Definition: svkDataViewController.h:103
Definition: svkDataViewController.h:72
vtkRenderWindowInteractor * rwi
Definition: svkDataViewController.h:104
Definition: svkImageData.h:107
vector< svkImageData * > dataVector
Definition: svkDataViewController.h:102