49 #include <vtkObject.h>
50 #include <vtkObjectFactory.h>
51 #include <vtkInformation.h>
52 #include <vtkStreamingDemandDrivenPipeline.h>
55 #define _USE_MATH_DEFINES
76 #ifndef SYS_F2C_OSIRIX
77 int zheev_(
char *jobz,
char *uplo, integer *n, doublecomplex
78 *a, integer *lda, doublereal *w, doublecomplex *work, integer *lwork,
79 doublereal *rwork, integer *info);
80 int zheevd_(
char *jobz,
char *uplo, integer *n,
81 doublecomplex *a, integer *lda, doublereal *w, doublecomplex *work,
82 integer *lwork, doublereal *rwork, integer *lrwork, integer *iwork,
83 integer *liwork, integer *info);
84 int zgeqp3_(integer *m, integer *n, doublecomplex *a,
85 integer *lda, integer *jpvt, doublecomplex *tau, doublecomplex *work,
86 integer *lwork, doublereal *rwork, integer *info);
87 int zungqr_(integer *m, integer *n, integer *k,
88 doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex *
89 work, integer *lwork, integer *info);
90 int ztrtrs_(
char *uplo,
char *trans,
char *diag, integer *n,
91 integer *nrhs, doublecomplex *a, integer *lda, doublecomplex *b,
92 integer *ldb, integer *info);
93 int zgeev_(
char *jobvl,
char *jobvr, integer *n,
94 doublecomplex *a, integer *lda, doublecomplex *w, doublecomplex *vl,
95 integer *ldvl, doublecomplex *vr, integer *ldvr, doublecomplex *work,
96 integer *lwork, doublereal *rwork, integer *info);
134 SET_FILTER_TO_ZERO = 0,
135 SET_SIGNAL_TO_ZERO = 1,
143 void RemoveLipidOn();
145 void AddPPMFrequencyFilterRule(
146 float frequencyLimit1PPM,
147 float frequencyLimit2PPM
150 void AddFrequencyAndDampingFilterRule(
151 float frequencyLimit1PPM,
152 float frequencyLimit2PPM,
153 float dampingThreshold
156 void AddDampingFilterRule(
157 float dampingThreshold
159 bool GetFitSuccessStatus();
160 void ExportFilterImage();
163 void OnlyFitSpectraInVolumeLocalization();
164 void SetModelOrder(
int modelOrder );
166 void SetErrorHandlingBehavior( HSVDBehaviorOnError errBehavior );
167 void SetErrorHandlingSignalToZeroOn();
168 void SetErrorHandlingFilterToZeroOn();
169 void SetErrorHandlingIgnoreError();
171 void SetThresholdModelDifference(
float percentDifferenceUp,
float percentDifferenceDown );
173 void SetSingleThreaded();
180 virtual int FillInputPortInformation(
int port, vtkInformation* info);
184 virtual int RequestInformation(
185 vtkInformation* request,
186 vtkInformationVector** inputVector,
187 vtkInformationVector* outputVector
191 virtual int RequestData(
192 vtkInformation* request,
193 vtkInformationVector** inputVector,
194 vtkInformationVector* outputVector
198 virtual void ThreadedRequestData(
199 vtkInformation* request,
200 vtkInformationVector** inputVector,
201 vtkInformationVector* outputVector,
202 vtkImageData*** inData,
203 vtkImageData** outData,
213 typedef std::complex<float> complexf;
214 typedef std::complex<double> complexd;
215 typedef std::complex<long double> complexld;
217 void svkHSVDExecute(
int ext[6],
int id);
218 void HSVDFitCellSpectrum(
int cellID );
219 bool HSVD(
int cellID, vector< vector <double> >* hsvdModel );
220 void GenerateHSVDFilterModel(
int cellID, vector< vector<double> >* hsvdModel,
bool cellFit);
221 void SubtractFilter();
222 void CheckInputSpectralDomain();
223 void CheckOutputSpectralDomain();
224 bool CanFitSignal(
const doublecomplex* signal,
int numPts );
225 bool GetFilterFailStatus(
227 vtkFloatArray* filterSpec,
232 const doublecomplex* matrix1,
233 const doublecomplex* matrix2,
236 doublecomplex* result
240 const doublecomplex* matrix,
243 doublecomplex* result
247 const doublecomplex* matrix,
248 const doublecomplex* vector,
251 doublecomplex* result
255 vector< vector< float > > filterRules;
257 bool isInputInTimeDomain;
258 bool exportFilterImage;
259 bool onlyFitInVolumeLocalization;
261 short* selectionBoxMask;
264 double spectralWidth;
266 double thresholdRMSRatioDown;
267 double thresholdRMSRatioUp;
268 int numberPtsToCheckQuality;
int zgeqp3_(integer *m, integer *n, doublecomplex *a, integer *lda, integer *jpvt, doublecomplex *tau, doublecomplex *work, integer *lwork, doublereal *rwork, integer *info)
Definition: svkMrsImageData.h:66
int zheev_(char *jobz, char *uplo, integer *n, doublecomplex *a, integer *lda, doublereal *w, doublecomplex *work, integer *lwork, doublereal *rwork, integer *info)
int ztrtrs_(char *uplo, char *trans, char *diag, integer *n, integer *nrhs, doublecomplex *a, integer *lda, doublecomplex *b, integer *ldb, integer *info)
HSVDBehaviorOnError
Definition: svkHSVD.h:133
int zheevd_(char *jobz, char *uplo, integer *n, doublecomplex *a, integer *lda, doublereal *w, doublecomplex *work, integer *lwork, doublereal *rwork, integer *lrwork, integer *iwork, integer *liwork, integer *info)
Definition: svkThreadedImageAlgorithm.h:71
Definition: svkHSVD.h:128
int zungqr_(integer *m, integer *n, integer *k, doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex *work, integer *lwork, integer *info)
Definition: svkMriImageData.h:72
static int * progress
Definition: svkHSVD.h:207
int zgeev_(char *jobvl, char *jobvr, integer *n, doublecomplex *a, integer *lda, doublecomplex *w, doublecomplex *vl, integer *ldvl, doublecomplex *vr, integer *ldvr, doublecomplex *work, integer *lwork, doublereal *rwork, integer *info)