SIVIC API  0.9.26
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
svkEPSIReorder.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  *
39  *
40  */
41 
42 
43 #ifndef SVK_EPSI_REORDER_H
44 #define SVK_EPSI_REORDER_H
45 
46 #include <vtkObject.h>
47 #include <vtkObjectFactory.h>
48 
49 #include <svkMrsImageFFT.h>
50 #include <svkImageInPlaceFilter.h>
51 
52 
53 namespace svk {
54 
55 
56 using namespace std;
57 
58 
63 {
64 
65  public:
66 
67  static svkEPSIReorder* New();
68  vtkTypeMacro( svkEPSIReorder, svkImageInPlaceFilter);
69 
70  typedef enum {
71  UNDEFINED_EPSI_TYPE = 0,
74  INTERLEAVED
75  } EPSIType;
76 
77  typedef enum {
78  UNDEFINED_EPSI_AXIS = -1,
80  ROWS,
81  SLICES
82  } EPSIAxis;
83 
84  void SetEPSIType( svkEPSIReorder::EPSIType epsiType );
85  void SetNumEPSILobes( int numLobes );
86  void SetNumSamplesPerLobe( int numSamples );
87  int GetNumSamplesPerLobe();
88  void SetFirstSample( int firstSample );
89  void SetNumSamplesToSkip( int numSamplesToSkip );
90  void SetEPSIAxis( svkEPSIReorder::EPSIAxis epsiAxis );
91  svkEPSIReorder::EPSIAxis GetEPSIAxis();
92  virtual int GetNumEPSIAcquisitions();
93  virtual int GetNumEPSIAcquisitionsPerFID();
94  virtual int GetNumEPSIFrequencyPoints();
95  static void CombineLobes(svkImageData* data);
96 
97 
98 
99  protected:
100 
101  svkEPSIReorder();
102  ~svkEPSIReorder();
103 
104  virtual int FillInputPortInformation(int port, vtkInformation* info);
105 
106  // Methods:
107  virtual int RequestData(
108  vtkInformation* request,
109  vtkInformationVector** inputVector,
110  vtkInformationVector* outputVector
111  );
112 
113 
114  private:
115 
116  EPSIType epsiType;
117  int numLobes;
118  int numSamplesPerLobe;
119  int firstSample;
120  int numSamplesToSkip;
121  EPSIAxis epsiAxis;
122 
123  void ReorderEPSIData( svkImageData* data );
124  void UpdateReorderedParams( svkImageData* data, int numVoxels[3] );
125 
126  int numVoxelsReordered[3];
127 
128 
129 };
130 
131 
132 } //svk
133 
134 
135 #endif //SVK_EPSI_REORDER_H
136 
EPSIType
Definition: svkEPSIReorder.h:70
Definition: svkEPSIReorder.h:79
Definition: svkEPSIReorder.h:73
EPSIAxis
Definition: svkEPSIReorder.h:77
Definition: svkEPSIReorder.h:62
Definition: svkEPSIReorder.h:72
Definition: svkImageData.h:107
Definition: svkImageInPlaceFilter.h:69
Definition: svkEPSIReorder.h:80