Orfeo Toolbox  3.16
itkBSplineL2ResampleImageFilterBase.txx
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkBSplineL2ResampleImageFilterBase.txx,v $
5  Language: C++
6  Date: $Date: 2008-10-09 20:43:43 $
7  Version: $Revision: 1.6 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  Portions of this code are covered under the VTK copyright.
13  See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details.
14 
15  This software is distributed WITHOUT ANY WARRANTY; without even
16  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
17  PURPOSE. See the above copyright notices for more information.
18 
19 =========================================================================*/
20 
21 #ifndef __itkBSplineL2ResampleImageFilterBase_txx
22 #define __itkBSplineL2ResampleImageFilterBase_txx
25 //#include "itkImageRegionConstIteratorWithIndex.h"
26 namespace itk
27 {
28 
32 template <class TInputImage, class TOutputImage>
35 {
36 
37 }
38 
42 template <class TInputImage, class TOutputImage>
43 void
46  std::ostream& os,
47  Indent indent) const
48 {
49  Superclass::PrintSelf( os, indent );
50 }
51 
52 template <class TInputImage, class TOutputImage>
55 {
56  switch (SplineOrder)
57  {
58 
59  case 0L :
60  this->m_GSize = 1;
61  this->m_HSize = 1;
62  break;
63 
64  case 1L :
65  this->m_GSize = 14;
66  this->m_HSize = 2;
67  this->m_G.resize(this->m_GSize);
68  this->m_H.resize(this->m_HSize);
69  this->m_G[0] = 0.683013;
70  this->m_G[1] = 0.316987;
71  this->m_G[2] = -0.116025;
72  this->m_G[3] = -0.0849365;
73  this->m_G[4] = 0.0310889;
74  this->m_G[5] = 0.0227587;
75  this->m_G[6] = -0.00833025;
76  this->m_G[7] = -0.00609817;
77  this->m_G[8] = 0.00223208;
78  this->m_G[9] = 0.001634;
79  this->m_G[10] = -0.000598085;
80  this->m_G[11] = -0.000437829;
81  this->m_G[12] = 0.000160256;
82  this->m_G[13] = 0.000117316;
83  this->m_H[0] = 1.;
84  this->m_H[1] = 0.5;
85  break;
86 
87  case 3L :
88  this->m_GSize = 25;
89  this->m_HSize = 12;
90  this->m_G.resize(this->m_GSize);
91  this->m_H.resize(this->m_HSize);
92  this->m_G[0] = 0.594902;
93  this->m_G[1] = 0.31431;
94  this->m_G[2] = -0.0816632;
95  this->m_G[3] = -0.0942586;
96  this->m_G[4] = 0.0541374;
97  this->m_G[5] = 0.0454105;
98  this->m_G[6] = -0.0307778;
99  this->m_G[7] = -0.0236728;
100  this->m_G[8] = 0.0166858;
101  this->m_G[9] = 0.0125975;
102  this->m_G[10] = -0.00895838;
103  this->m_G[11] = -0.00673388;
104  this->m_G[12] = 0.00479847;
105  this->m_G[13] = 0.00360339;
106  this->m_G[14] = -0.00256892;
107  this->m_G[15] = -0.00192868;
108  this->m_G[16] = 0.00137514;
109  this->m_G[17] = 0.00103237;
110  this->m_G[18] = -0.000736093;
111  this->m_G[19] = -0.000552606;
112  this->m_G[20] = 0.000394017;
113  this->m_G[21] = 0.000295799;
114  this->m_G[22] = -0.00021091;
115  this->m_G[23] = -0.000158335;
116  this->m_G[24] = 0.000112896;
117  this->m_H[0] = 1.;
118  this->m_H[1] = 0.600481;
119  this->m_H[2] = 0.0;
120  this->m_H[3] = -0.127405;
121  this->m_H[4] = 0;
122  this->m_H[5] = 0.034138;
123  this->m_H[6] = 0;
124  this->m_H[7] = -0.00914725;
125  this->m_H[8] = 0;
126  this->m_H[9] = 0.002451;
127  this->m_H[10] = 0;
128  this->m_H[11] = -0.000656743;
129  break;
130 
131  case 5L :
132  this->m_GSize = 35;
133  this->m_HSize = 20;
134  this->m_G.resize(this->m_GSize);
135  this->m_H.resize(this->m_HSize);
136  this->m_G[0] = 0.564388;
137  this->m_G[1] = 0.316168;
138  this->m_G[2] = -0.0597634;
139  this->m_G[3] = -0.0998708;
140  this->m_G[4] = 0.0484525;
141  this->m_G[5] = 0.0539099;
142  this->m_G[6] = -0.0355614;
143  this->m_G[7] = -0.033052;
144  this->m_G[8] = 0.0246347;
145  this->m_G[9] = 0.0212024;
146  this->m_G[10] = -0.0166097;
147  this->m_G[11] = -0.0138474;
148  this->m_G[12] = 0.0110719;
149  this->m_G[13] = 0.00911006;
150  this->m_G[14] = -0.00734567;
151  this->m_G[15] = -0.0060115;
152  this->m_G[16] = 0.00486404;
153  this->m_G[17] = 0.00397176;
154  this->m_G[18] = -0.00321822;
155  this->m_G[19] = -0.00262545;
156  this->m_G[20] = 0.00212859;
157  this->m_G[21] = 0.00173587;
158  this->m_G[22] = -0.0014077;
159  this->m_G[23] = -0.0011478;
160  this->m_G[24] = 0.000930899;
161  this->m_G[25] = 0.000758982;
162  this->m_G[26] = -0.000615582;
163  this->m_G[27] = -0.000501884;
164  this->m_G[28] = 0.000407066;
165  this->m_G[29] = 0.000331877;
166  this->m_G[30] = -0.00026918;
167  this->m_G[31] = -0.000219459;
168  this->m_G[32] = 0.000178;
169  this->m_G[33] = 0.00014512;
170  this->m_G[34] = -0.000117706;
171  this->m_H[0] = 1.;
172  this->m_H[1] = 0.619879;
173  this->m_H[2] = 0.0;
174  this->m_H[3] = -0.167965;
175  this->m_H[4] = 0;
176  this->m_H[5] = 0.0686374;
177  this->m_H[6] = 0;
178  this->m_H[7] = -0.0293948;
179  this->m_H[8] = 0.0;
180  this->m_H[9] = 0.0126498;
181  this->m_H[10] = 0;
182  this->m_H[11] = -0.00544641;
183  this->m_H[12] = 0.0;
184  this->m_H[13] = 0.00234508;
185  this->m_H[14] = 0;
186  this->m_H[15] = -0.00100973;
187  this->m_H[16] = 0.0;
188  this->m_H[17] = 0.000434766;
189  this->m_H[18] = 0;
190  this->m_H[19] = -0.000187199;
191  break;
192  default :
193  // I don't feel well I think I'm going to throw up.
194  ExceptionObject err(__FILE__, __LINE__);
195  err.SetLocation( ITK_LOCATION );
196  err.SetDescription( "SplineOrder for L2 pyramid filter must be 0,1,3, or 5. Requested spline order has not been implemented." );
197  throw err;
198  break;
199  }
200 }
201 
202 } // namespace itk
203 
204 #endif

Generated at Sat Feb 2 2013 23:30:58 for Orfeo Toolbox with doxygen 1.8.1.1