SIVIC API  0.9.26
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
svkMrsZeroFill.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_MRS_ZERO_FILL_H
44 #define SVK_MRS_ZERO_FILL_H
45 
46 
47 #include <vtkObject.h>
48 #include <vtkObjectFactory.h>
49 #include <vtkInformation.h>
50 #include <vtkInformationVector.h>
51 #include <vtkStreamingDemandDrivenPipeline.h>
52 
53 #include <svkUtils.h>
54 #include <svkMriZeroFill.h>
55 #include <svkImageInPlaceFilter.h>
56 #include <svkMrsLinearPhase.h>
57 
58 
59 namespace svk {
60 
61 
62 using namespace std;
63 
64 
65 
70 {
71 
72  public:
73 
74  static svkMrsZeroFill* New();
75  vtkTypeMacro( svkMrsZeroFill, svkImageInPlaceFilter);
76 
77  typedef enum {
78  VALUE = 0,
80  POWER2
81  } FillType;
82 
83 
84 
85  void SetNumberOfRows( int numRows );
86  void SetNumberOfRowsToDouble( );
87  void SetNumberOfRowsToNextPower2( );
88 
89  void SetNumberOfColumns( int numColumns );
90  void SetNumberOfColumnsToDouble( );
91  void SetNumberOfColumnsToNextPower2( );
92 
93  void SetNumberOfSlices( int numSlices );
94  void SetNumberOfSlicesToDouble( );
95  void SetNumberOfSlicesToNextPower2( );
96 
97  void SetNumberOfSpecPoints( int numSpecPoints );
98  void SetNumberOfSpecPointsToDouble( );
99  void SetNumberOfSpecPointsToNextPower2( );
100 
101  void SetOutputDimensions( int numRows, int numColumns, int numSlices, int numSpecPoints );
102 
103  void SetOutputWholeExtent( int extent[6] );
104  void SetOutputWholeExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ);
105 
106 
107 
108  protected:
109 
110  svkMrsZeroFill();
111  ~svkMrsZeroFill();
112 
113  virtual int FillInputPortInformation(int port, vtkInformation* info);
114 
115 
116  // Methods:
117  virtual int RequestInformation(
118  vtkInformation* request,
119  vtkInformationVector** inputVector,
120  vtkInformationVector* outputVector
121  );
122 
123  virtual int RequestData(
124  vtkInformation* request,
125  vtkInformationVector** inputVector,
126  vtkInformationVector* outputVector
127  );
128 
129  virtual int RequestDataSpatial(
130  vtkInformation* request,
131  vtkInformationVector** inputVector,
132  vtkInformationVector* outputVector
133  );
134 
135  virtual int RequestDataSpectral(
136  vtkInformation* request,
137  vtkInformationVector** inputVector,
138  vtkInformationVector* outputVector
139  );
140 
141  virtual int RequestUpdateExtent(vtkInformation*,
142  vtkInformationVector**,
143  vtkInformationVector*);
144 
145  virtual void ComputeInputUpdateExtent (int inExt[6], int outExt[6], int wExt[6]);
146 
147  virtual void InitializeOutputWholeExtent();
148 
149  private:
150 
151  // Members:
152 
153  // These will store the fill type. This is used in case the user defines the fill
154  // type before setting the input. The extent is computed on RequestInformation.
155  FillType rowFillType;
156  FillType columnFillType;
157  FillType sliceFillType;
158  FillType specFillType;
159 
160  int numSpecPoints;
161  //ZeroFillDomain domain;
162  int outputWholeExtent[6];
163 
164  virtual void InitializeDataArrays( svkMrsImageData* outputData );
165 
166 
167 };
168 
169 
170 } //svk
171 
172 
173 #endif //SVK_MRS_ZERO_FILL_H
174 
Definition: svkMrsImageData.h:66
Definition: svkMrsZeroFill.h:69
Definition: svkMrsZeroFill.h:79
Definition: svkImageInPlaceFilter.h:69