42 #ifndef SVK_MRS_ZERO_ORDER_PHASE_COST_FUNCTION_H
43 #define SVK_MRS_ZERO_ORDER_PHASE_COST_FUNCTION_H
74 this->zeroOrderPhasePeak = 0;
85 double phi0 = parameters[0];
93 for (
int peakNum = 0; peakNum < this->peaks->GetNumPeaks(); peakNum++ ) {
98 this->peaks->GetPeakDefinition( peakNum, &startPt, &peakPt, &endPt );
101 for (
int freq = startPt; freq <= endPt; freq++) {
102 this->copySpectrum->GetTupleValue(freq, cmplxPt);
104 this->copySpectrum->SetTuple(freq, cmplxPt);
107 static_cast<float*>(this->copySpectrum->GetVoidPointer(4)),
111 cout <<
"PEAK HT: " << peakHt <<
" @ " << phi0 * 180. / vtkMath::Pi() << endl;
112 intensity += (-1 * peakHt);
131 this->copySpectrum->DeepCopy(this->spectrum);
132 cost = GetZeroOrderPhaseCost_2( parameters );
160 this->zeroOrderPhasePeak = peakNum;
169 return this->zeroOrderPhasePeak;
178 int zeroOrderPhasePeak;
184 #endif// SVK_MRS_ZERO_ORDER_PHASE_COST_FUNCTION_H
virtual MeasureType GetValue(const ParametersType ¶meters) const
Definition: svkMRSZeroOrderPhaseCostFunction.h:124
Definition: svkPhaseCostFunction.h:64
itk::SmartPointer< Self > Pointer
Definition: svkMRSZeroOrderPhaseCostFunction.h:64
MeasureType GetZeroOrderPhaseCost_2(const ParametersType ¶meters) const
Definition: svkMRSZeroOrderPhaseCostFunction.h:82
Superclass::MeasureType MeasureType
Definition: svkPhaseCostFunction.h:79
void SetZeroOrderPhasePeak(int peakNum)
Definition: svkMRSZeroOrderPhaseCostFunction.h:158
Definition: svkMRSZeroOrderPhaseCostFunction.h:57
Definition: svkMRSPeakPick.h:69
svkMRSZeroOrderPhaseCostFunction()
Definition: svkMRSZeroOrderPhaseCostFunction.h:73
void SetPeakPicker(svkMRSPeakPick *peaks)
Definition: svkMRSZeroOrderPhaseCostFunction.h:149
svkPhaseCostFunction Superclass
Definition: svkMRSZeroOrderPhaseCostFunction.h:63
int GetZeroOrderPhasePeak()
Definition: svkMRSZeroOrderPhaseCostFunction.h:167
static void ZeroOrderPhase(float phi0, float *cmplxPt)
Definition: svkPhaseSpec.cc:339
Superclass::ParametersType ParametersType
Definition: svkPhaseCostFunction.h:77
itk::SmartPointer< const Self > ConstPointer
Definition: svkMRSZeroOrderPhaseCostFunction.h:65
virtual unsigned int GetNumberOfParameters(void) const
Definition: svkMRSZeroOrderPhaseCostFunction.h:143
svkMRSZeroOrderPhaseCostFunction Self
Definition: svkMRSZeroOrderPhaseCostFunction.h:62