iRoCS Toolbox  1.1.0
ldiffusion.hh
Go to the documentation of this file.
1 /**************************************************************************
2  *
3  * Copyright (C) 2015 Kun Liu, Thorsten Falk
4  *
5  * Image Analysis Lab, University of Freiburg, Germany
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software Foundation,
19  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  *
21  **************************************************************************/
22 
23 /*
24  * ldiffusion.h
25  *
26  * Created on: Oct 12, 2010
27  * Author: kun
28  */
29 
30 #ifndef LDIFFUSION_H_
31 #define LDIFFUSION_H_
32 
33 #ifdef HAVE_CONFIG_H
34 #include <config.hh>
35 #endif
36 
37 #include "lParallel.hh"
38 
39 #include <blitz/array.h>
40 
41 int mindex3(int x, int y, int z, int sizx, int sizy);
42 
43 template<typename Type, int Dim>
45  blitz::Array<Type,Dim> &image, blitz::Array<Type,Dim> &Dxx,
46  blitz::Array<Type,Dim> &Dyy, blitz::Array<Type,Dim> &Dzz,
47  blitz::Array<Type,Dim> &Dxy, blitz::Array<Type,Dim> &Dxz,
48  blitz::Array<Type,Dim> &Dyz, double delta_t = 0.0625, int v = 1);
49 
51  double *u, double *a, double *b, double *c, double *d, double *e,
52  double *f, int x, int y, int z, int nx, int ny, int nz, int px, int py,
53  int pz, double dt, int *dimsu);
54 
55 template<typename GType>
56 void get1DAOS_blitz(
57  blitz::Array<GType,1>& p, double delta_t, int len, int m,
58  double* alpha, double *beta, double *gamma, double* L, double *M,
59  double *R);
60 
61 template<typename Type, typename gType>
62 void AOS_3D_blitz(
63  const blitz::Array<Type, 3>& u, blitz::Array<gType, 3>& g,
64  blitz::Array<Type, 3>& u_new, const double delta_t);
65 
66 template<typename Type>
68  blitz::Array<Type, 3>& image,
69  const blitz::TinyVector<double, 3>& spacing, const int num_iter = 4,
70  const double kappa = 0.1, const double delta_t = 1, const int mode = 0,
71  const int v = 1);
72 
74  double* alpha, double* beta, double* gamma,
75  double* l, double* m, double* r, unsigned long N);
76 
78  double* l, double* m, double* r, double* d, double* y, unsigned long N);
79 
80 template<typename Type>
82  double* l, double* m, double* r, blitz::Array<Type,1> &d, double* y,
83  unsigned long N);
84 
85 #include "ldiffusion.icc"
86 
87 #endif /* LDIFFUSION_H_ */
double CalculateDiffusionNewGreyValue(double *u, double *a, double *b, double *c, double *d, double *e, double *f, int x, int y, int z, int nx, int ny, int nz, int px, int py, int pz, double dt, int *dimsu)
void nonlinearDiffusion3D_AOS(blitz::Array< Type, 3 > &image, const blitz::TinyVector< double, 3 > &spacing, const int num_iter=4, const double kappa=0.1, const double delta_t=1, const int mode=0, const int v=1)
void get1DAOS_blitz(blitz::Array< GType, 1 > &p, double delta_t, int len, int m, double *alpha, double *beta, double *gamma, double *L, double *M, double *R)
void tridiagonal_Thomas_solution(double *l, double *m, double *r, double *d, double *y, unsigned long N)
void anisotropicDiffusion3D_explicit(blitz::Array< Type, Dim > &image, blitz::Array< Type, Dim > &Dxx, blitz::Array< Type, Dim > &Dyy, blitz::Array< Type, Dim > &Dzz, blitz::Array< Type, Dim > &Dxy, blitz::Array< Type, Dim > &Dxz, blitz::Array< Type, Dim > &Dyz, double delta_t=0.0625, int v=1)
void tridiagonal_Thomas_solution_blitz(double *l, double *m, double *r, blitz::Array< Type, 1 > &d, double *y, unsigned long N)
int mindex3(int x, int y, int z, int sizx, int sizy)
void tridiagonal_Thomas_decomposition(double *alpha, double *beta, double *gamma, double *l, double *m, double *r, unsigned long N)
void AOS_3D_blitz(const blitz::Array< Type, 3 > &u, blitz::Array< gType, 3 > &g, blitz::Array< Type, 3 > &u_new, const double delta_t)