JEMRIS 2.9.2
open-source MRI simulations
Loading...
Searching...
No Matches
Microstructure.h
1/*
2 * Microstructure.h
3 *
4 * Created on: Dec 10, 2009
5 * Author: dpflug
6 */
7
8
9/*
10 * JEMRIS Copyright (C)
11 * 2006-2025 Tony Stoecker
12 * 2007-2018 Kaveh Vahedipour
13 * 2009-2019 Daniel Pflugfelder
14 *
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
29 */
30
31#ifndef MICROSTRUCTURE_H_
32#define MICROSTRUCTURE_H_
33
34#include "TrajectoryDiffusion.h"
35
39struct neuron {
40 double dx;
41 double dy;
42 double dz;
43 double x;
44 double y;
45 double z;
46 double r_a;
47 double r_m;
48};
49
50class RNG;
51
56public:
58 virtual ~Microstructure();
59
65 virtual void IndexObject(triple pos, int &LastId ,int &shellid) {LastId=-1;shellid=-1;};
66
70 virtual double GetD(int LastId=-1,int shellid=-1) {return m_D_external;};
71
75 void SetExternalDiffusionConstant(double d) {m_D_external=d;};
76
77 bool isInsideBox(triple pos) {return ((fabs(pos.x)<m_boxsize) & (fabs(pos.y)<m_boxsize) & (fabs(pos.z)<m_boxsize));};
78
79 /*
80 * maps a position outside of the box into it
81 */
82 triple PeriodicBoundary(triple trialpos);
83
84 void SetBoxSize(double size) {m_boxsize=size;}
85 double GetBoxSize() {return m_boxsize;}
86
87protected:
88 // microstructure is defined in box with [-m_boxsize..m_boxsize] in each direction
89 double m_boxsize;
90 double m_D_external;
91
92 RNG* m_rng;
93
94};
95
96#endif /* MICROSTRUCTURE_H_ */
Microsructure base class.
Definition Microstructure.h:55
virtual double GetD(int LastId=-1, int shellid=-1)
Definition Microstructure.h:70
virtual void IndexObject(triple pos, int &LastId, int &shellid)
Definition Microstructure.h:65
void SetExternalDiffusionConstant(double d)
Definition Microstructure.h:75
Definition of a neuron/axon for the Microstructure.
Definition Microstructure.h:39
double dy
y-component of fiber orientation
Definition Microstructure.h:41
double r_m
radius of axon including myelin sheet
Definition Microstructure.h:47
double dx
x-component of fiber orientation
Definition Microstructure.h:40
double dz
z-component of fiber orientation
Definition Microstructure.h:42
double z
z position of fiber
Definition Microstructure.h:45
double x
x position of fiber
Definition Microstructure.h:43
double r_a
radius of axon without myelin sheet
Definition Microstructure.h:46
double y
y position of fiber
Definition Microstructure.h:44
Cartesians positions for diffusion trajectory of a spin.
Definition TrajectoryDiffusion.h:46

-- last change 03.01.2025 | Tony Stoecker | Imprint | Data Protection --