Package gov.nih.mipav.model.algorithms
Class fMRIBlindDeconvolution
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.fMRIBlindDeconvolution
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class(package private) class(package private) classNested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final doubleprivate final doubleReference: Hamza Cherkaoui, Thomas Moreau, Abderrahim Halimi, Philippe Ciuciu.Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStoppedFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]__inf_norm(double[] x) double[][][]__inf_norm(double[][][] x) double[]_custom_padd(int[] p_total, double[] a, int min_power_of_2, int min_zero_padd, double zero_padd_ratio) double[][]_inf_norm(double[][][] arr, int axis) double[][]_inf_norm(double[][] arr, int axis) double[]_loops_deconv(double[] y, double[] diff_z, double[][] H, double lbda, long nb_iter, boolean early_stopping, long wind, double tol) double[][]_padd_assymetric(double[][] arrays, int[] p, double c, String paddtype) double[]_padd_assymetric(double[] arrays, int[] p, double c, String paddtype) double[][]_padd_symetric(double[][] arrays, int p, double c, String paddtype) double[]_padd_symetric(double[] arrays, int p, double c, String paddtype) void_test_conv_adj_fourier_hrf(double[] ai_s, double[] hrf, String testname) void_test_conv_adj_toeplitz_kernel_hrf(double[] ai_s, double[] hrf, String testname) void_test_conv_adj_toeplitz_kernel_signal(double[] ai_s, double[] hrf, String testname) void_test_conv_fourier_kernel_hrf(double[] ai_s, double[] hrf, String testname) void_test_conv_toeplitz_kernel_hrf(double[] ai_s, double[] hrf, String testname) void_test_conv_toeplitz_kernel_signal(double[] ai_s, double[] hrf, String testname) void_test_data(double[] noisy_ar_s, double[] ar_s, double[] ai_s, double[] i_s, double[] hrf, double[] noise, double snr, int nb_events, String testnum) double[][]_unpadd_assymetric(double[][] arrays, int[] p, String paddtype) double[]_unpadd_assymetric(double[] arrays, int[] p, String paddtype) double[][]_unpadd_symetric(double[][] arrays, int p, String paddtype) double[]_unpadd_symetric(double[] arrays, int p, String paddtype) void_yield_data(double[][] noisy_ar_s, double[][] ar_s, double[][] ai_s, double[][] i_s, double[][] hrf, double[][] noise, double[] snr, int[] nb_events) voidadd_gaussian_noise(double[] noisy_signal, double[] noise, double[] signal, double snr, boolean haveSeed, long random_state) voidbd(Vector<Double> xout, Vector<Double> zout, Vector<Double> diff_zout, Vector<Double> hout, Vector<Double> dr, Vector<Double> dg, Vector<Double> dJ, double[] y, double t_r, double lbda, double theta, double[] z_0, double hrf_dur, double[] bounds, int nb_iter, int nb_sub_iter, int nb_last_iter, int print_period, boolean early_stopping, int wind, double tol, int verbose) voiddouble[][]custom_padd(int[] padd, double[][] arrays, int min_power_of_2, int min_zero_padd, double zero_padd_ratio) voidvoiddeconv(double[] x, double[] z, double[] diff_z, Vector<Double> J, Vector<Double> R, Vector<Double> G, double[] y, double t_r, double[] hrf, double lbda, boolean early_stopping, double tol, int wind, int nb_iter, int nb_sub_iter, int verbose) voiddoublefwhm(double[] t_hrf, double[] hrf, int k) voidgen_regular_ai_s(double[] ai_s, double[] i_s, double[] t, int dur, double tr, double dur_bloc, boolean centered) voidgen_regular_bloc_bold(double[] noisy_ar_s, double[] ar_s, double[] ai_s, double[] i_s, double[] t, double[] noise, int dur, double tr, double dur_bloc, boolean sourcehrf, double[] hrf, double snr, boolean haveSeed, long random_state) voidgen_rnd_ai_s(double[] ai_s, double[] i_s, double[] t, double dur, double tr, int nb_events, int avg_dur, double std_dur, boolean middle_spike, boolean overlapping, boolean unitary_block, boolean haveSeed, long random_state, int nb_try, int nb_try_duration, boolean centered) voidgen_rnd_bloc_bold(double[] noisy_ar_s, double[] ar_s, double[] ai_s, double[] i_s, double[] t, double[] noise, double dur, double tr, boolean sourcehrf, double[] hrf, int nb_events, int avg_dur, double std_dur, boolean middle_spike, boolean overlapping, boolean unitary_block, double snr, int nb_try, int nb_try_duration, boolean centered, boolean haveSeed, long random_state) voidgen_rnd_event_bold(double[] noisy_ar_s, double[] ar_s, double[] i_s, double[] t, double[] noise, int dur, double tr, boolean sourcehrf, double[] hrf, int nb_events, double avg_ampl, double std_ampl, double snr, boolean haveSeed, long random_state) voidgen_rnd_i_s(double[] i_s, double[] t, int dur, double tr, int nb_events, double avg_ampl, double std_ampl, boolean haveSeed, long random_state, int nb_try, int nb_try_duration, boolean centered) voidhrf_estim(double[] h, Vector<Double> J, double[] z, double[] y, double t_r, double dur, int verbose) doublehrf_fit_err(double theta, double[] z, double[] y, double t_r, double hrf_dur) private doubleinf_norm(double[] x) private doubledouble[]irfft(double[][] x, boolean isOdd) doublelog2(double x) doublemad(double[] x, double c) doublemad_daub_noise_est(double[] x, double c) doublemedian(double[] x) doublenorm(double[] x) random_generator(long random_state) double[][]rfft(double[] x) voidActually runs the algorithm.doublesign(double x) double[]simple_convolve(double[] k, double[] x, int dim_out) voiddouble[]simple_retro_convolve(double[] k, double[] x, int dim_out) double[]spectral_convolve(double[] k, double[] xin) double[]spectral_deconvolve(double[] k, double[] x) doublespectral_radius_est(fMRIBlindDeconvolution.ConvAndLinear L, int x_shape, int nb_iter, double tol, boolean verbose) double[]spectral_retro_convolve(double[] k, double[] xin) double[]spectral_retro_deconvolve(double[] k, double[] x) voidspm_hrf(double[] hrf, double[] t_hrf, double delta, double t_r, double dur, boolean normalized_hrf, double dt, double p_delay, double undershoot, double p_disp, double u_disp, double p_u_ratio, double onset) doublestd(double[] x) voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoiddouble[][]toeplitz_from_kernel(double[] k, int dim_in, int dim_out) doubletp(double[] t_hrf, double[] hrf) voidyield_blocks_signal(double[][] ai_s, double[][] hrf, double[][] alpha, double[] tr) voidyield_diracs_signal(double[][] i_s, double[][] hrf, double[][] alpha, double[] tr) private doublezabs(double zr, double zi) zabs computes the absolute value or magnitude of a double precision complex variable zr + j*zi.private voidzdiv(double ar, double ai, double br, double bi, double[] cr, double[] ci) complex divide c = a/b.Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, finalize, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, generateProgressValues, getDestImage, getElapsedTime, getMask, getMaxProgressValue, getMinProgressValue, getNumberOfThreads, getProgress, getProgressChangeListener, getProgressChangeListeners, getProgressModulus, getProgressStep, getProgressValues, getSrcImage, isCompleted, isImage25D, isMultiThreadingEnabled, isRunningInSeparateThread, isThreadStopped, linkProgressToAlgorithm, linkProgressToAlgorithm, makeProgress, notifyListeners, removeListener, removeProgressChangeListener, run, setCompleted, setImage25D, setMask, setMaxProgressValue, setMinProgressValue, setMultiThreadingEnabled, setNumberOfThreads, setProgress, setProgressModulus, setProgressStep, setProgressValues, setProgressValues, setRunningInSeparateThread, setSrcImage, setStartTime, setThreadStopped, startMethod, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpenedMethods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Field Details
-
MIN_DELTA
private final double MIN_DELTAReference: Hamza Cherkaoui, Thomas Moreau, Abderrahim Halimi, Philippe Ciuciu. Sparsity-based blind deconvolution of neural activation signal in fMRI. IEEE-ICASSP 2019 - International Conference on Acoustics, Speech and Signal Processing, May 2019, Brighton, United Kingdom. ffhal-02085810v2- See Also:
-
MAX_DELTA
private final double MAX_DELTA- See Also:
-
-
Constructor Details
-
fMRIBlindDeconvolution
public fMRIBlindDeconvolution()
-
-
Method Details
-
runAlgorithm
public void runAlgorithm()Description copied from class:AlgorithmBaseActually runs the algorithm. Implemented by inheriting algorithms.- Specified by:
runAlgorithmin classAlgorithmBase
-
spm_hrf
public void spm_hrf(double[] hrf, double[] t_hrf, double delta, double t_r, double dur, boolean normalized_hrf, double dt, double p_delay, double undershoot, double p_disp, double u_disp, double p_u_ratio, double onset) -
test_power_2_padding_length
public void test_power_2_padding_length() -
test_zero_padd_unpadd
public void test_zero_padd_unpadd() -
test_zero_mirror_zero_padd_unpadd
public void test_zero_mirror_zero_padd_unpadd() -
_padd_symetric
-
_padd_symetric
-
_padd_assymetric
-
_padd_assymetric
-
_unpadd_symetric
-
_unpadd_symetric
-
_unpadd_assymetric
-
_unpadd_assymetric
-
log2
public double log2(double x) -
_custom_padd
public double[] _custom_padd(int[] p_total, double[] a, int min_power_of_2, int min_zero_padd, double zero_padd_ratio) -
custom_padd
public double[][] custom_padd(int[] padd, double[][] arrays, int min_power_of_2, int min_zero_padd, double zero_padd_ratio) -
rfft
public double[][] rfft(double[] x) -
irfft
public double[] irfft(double[][] x, boolean isOdd) -
spectral_convolve
public double[] spectral_convolve(double[] k, double[] xin) -
spectral_retro_convolve
public double[] spectral_retro_convolve(double[] k, double[] xin) -
zabs
private double zabs(double zr, double zi) zabs computes the absolute value or magnitude of a double precision complex variable zr + j*zi.- Parameters:
zr- doublezi- double- Returns:
- double
-
zdiv
private void zdiv(double ar, double ai, double br, double bi, double[] cr, double[] ci) complex divide c = a/b.- Parameters:
ar- doubleai- doublebr- doublebi- doublecr- double[]ci- double[]
-
spectral_deconvolve
public double[] spectral_deconvolve(double[] k, double[] x) -
spectral_retro_deconvolve
public double[] spectral_retro_deconvolve(double[] k, double[] x) -
toeplitz_from_kernel
public double[][] toeplitz_from_kernel(double[] k, int dim_in, int dim_out) -
simple_convolve
public double[] simple_convolve(double[] k, double[] x, int dim_out) -
simple_retro_convolve
public double[] simple_retro_convolve(double[] k, double[] x, int dim_out) -
median
public double median(double[] x) -
mad
public double mad(double[] x, double c) -
mad_daub_noise_est
public double mad_daub_noise_est(double[] x, double c) -
fwhm
public double fwhm(double[] t_hrf, double[] hrf, int k) -
tp
public double tp(double[] t_hrf, double[] hrf) -
random_generator
-
spectral_radius_est
public double spectral_radius_est(fMRIBlindDeconvolution.ConvAndLinear L, int x_shape, int nb_iter, double tol, boolean verbose) -
test_inf_norm
public void test_inf_norm() -
__inf_norm
public double[] __inf_norm(double[] x) -
_inf_norm
public double[][] _inf_norm(double[][] arr, int axis) -
_inf_norm
public double[][] _inf_norm(double[][][] arr, int axis) -
__inf_norm
public double[][][] __inf_norm(double[][][] x) -
norm
public double norm(double[] x) -
add_gaussian_noise
public void add_gaussian_noise(double[] noisy_signal, double[] noise, double[] signal, double snr, boolean haveSeed, long random_state) -
gen_rnd_ai_s
public void gen_rnd_ai_s(double[] ai_s, double[] i_s, double[] t, double dur, double tr, int nb_events, int avg_dur, double std_dur, boolean middle_spike, boolean overlapping, boolean unitary_block, boolean haveSeed, long random_state, int nb_try, int nb_try_duration, boolean centered) -
gen_rnd_bloc_bold
public void gen_rnd_bloc_bold(double[] noisy_ar_s, double[] ar_s, double[] ai_s, double[] i_s, double[] t, double[] noise, double dur, double tr, boolean sourcehrf, double[] hrf, int nb_events, int avg_dur, double std_dur, boolean middle_spike, boolean overlapping, boolean unitary_block, double snr, int nb_try, int nb_try_duration, boolean centered, boolean haveSeed, long random_state) -
_yield_data
public void _yield_data(double[][] noisy_ar_s, double[][] ar_s, double[][] ai_s, double[][] i_s, double[][] hrf, double[][] noise, double[] snr, int[] nb_events) -
_test_data
public void _test_data(double[] noisy_ar_s, double[] ar_s, double[] ai_s, double[] i_s, double[] hrf, double[] noise, double snr, int nb_events, String testnum) -
test_data_gen
public void test_data_gen() -
gen_regular_ai_s
public void gen_regular_ai_s(double[] ai_s, double[] i_s, double[] t, int dur, double tr, double dur_bloc, boolean centered) -
gen_regular_bloc_bold
public void gen_regular_bloc_bold(double[] noisy_ar_s, double[] ar_s, double[] ai_s, double[] i_s, double[] t, double[] noise, int dur, double tr, double dur_bloc, boolean sourcehrf, double[] hrf, double snr, boolean haveSeed, long random_state) -
gen_rnd_i_s
public void gen_rnd_i_s(double[] i_s, double[] t, int dur, double tr, int nb_events, double avg_ampl, double std_ampl, boolean haveSeed, long random_state, int nb_try, int nb_try_duration, boolean centered) -
gen_rnd_event_bold
public void gen_rnd_event_bold(double[] noisy_ar_s, double[] ar_s, double[] i_s, double[] t, double[] noise, int dur, double tr, boolean sourcehrf, double[] hrf, int nb_events, double avg_ampl, double std_ampl, double snr, boolean haveSeed, long random_state) -
yield_diracs_signal
public void yield_diracs_signal(double[][] i_s, double[][] hrf, double[][] alpha, double[] tr) -
yield_blocks_signal
public void yield_blocks_signal(double[][] ai_s, double[][] hrf, double[][] alpha, double[] tr) -
_test_conv_toeplitz_kernel_hrf
-
test_toeplitz_convolution_kernel_hrf_on_dirac
public void test_toeplitz_convolution_kernel_hrf_on_dirac() -
test_toeplitz_convolution_kernel_hrf_on_ai_s
public void test_toeplitz_convolution_kernel_hrf_on_ai_s() -
_test_conv_fourier_kernel_hrf
-
test_fourier_convolution_kernel_hrf_on_dirac
public void test_fourier_convolution_kernel_hrf_on_dirac() -
test_fourier_convolution_kernel_hrf_on_ai_s
public void test_fourier_convolution_kernel_hrf_on_ai_s() -
_test_conv_adj_toeplitz_kernel_hrf
-
test_toeplitz_adj_convolution_kernel_hrf_on_dirac
public void test_toeplitz_adj_convolution_kernel_hrf_on_dirac() -
test_toeplitz_adj_convolution_kernel_hrf_on_ai_s
public void test_toeplitz_adj_convolution_kernel_hrf_on_ai_s() -
_test_conv_adj_fourier_hrf
-
test_fourier_adj_convolution_kernel_hrf_on_dirac
public void test_fourier_adj_convolution_kernel_hrf_on_dirac() -
test_fourier_adj_convolution_kernel_hrf_on_ai_s
public void test_fourier_adj_convolution_kernel_hrf_on_ai_s() -
_test_conv_toeplitz_kernel_signal
-
test_toeplitz_convolution_kernel_signal_on_dirac
public void test_toeplitz_convolution_kernel_signal_on_dirac() -
test_toeplitz_convolution_kernel_signal_on_ai_s
public void test_toeplitz_convolution_kernel_signal_on_ai_s() -
_test_conv_adj_toeplitz_kernel_signal
-
test_toeplitz_adj_convolution_kernel_signal_on_dirac
public void test_toeplitz_adj_convolution_kernel_signal_on_dirac() -
test_toeplitz_adj_convolution_kernel_signal_on_ai_s
public void test_toeplitz_adj_convolution_kernel_signal_on_ai_s() -
test_integ_op
public void test_integ_op() -
test_integ_adj
public void test_integ_adj() -
sign
public double sign(double x) -
deconv
-
std
public double std(double[] x) -
deconv_example
public void deconv_example() -
hrf_fit_err
public double hrf_fit_err(double theta, double[] z, double[] y, double t_r, double hrf_dur) -
hrf_estim
-
simple_hrf_estimation
public void simple_hrf_estimation() -
_loops_deconv
public double[] _loops_deconv(double[] y, double[] diff_z, double[][] H, double lbda, long nb_iter, boolean early_stopping, long wind, double tol) -
bd
public void bd(Vector<Double> xout, Vector<Double> zout, Vector<Double> diff_zout, Vector<Double> hout, Vector<Double> dr, Vector<Double> dg, Vector<Double> dJ, double[] y, double t_r, double lbda, double theta, double[] z_0, double hrf_dur, double[] bounds, int nb_iter, int nb_sub_iter, int nb_last_iter, int print_period, boolean early_stopping, int wind, double tol, int verbose) -
blind_deconvolution_example
public void blind_deconvolution_example() -
inf_norm
private double inf_norm(double[] x) -
inf_norm
-
data_generation_example
public void data_generation_example()
-