JEMRIS 2.9.1
open-source MRI simulations
Loading...
Searching...
No Matches
CoilArray.h
Go to the documentation of this file.
1
5/*
6 * JEMRIS Copyright (C)
7 * 2006-2023 Tony Stoecker
8 * 2007-2018 Kaveh Vahedipour
9 * 2009-2019 Daniel Pflugfelder
10 *
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 */
26
27#ifndef COILARRAY_H_
28#define COILARRAY_H_
29
30#include "XMLIO.h"
31
32#include "Signal.h"
34
35class Coil;
36
40class CoilArray {
41
42 public:
43
49 CoilArray();
50
56 void Initialize (string uri);
57
62 unsigned int Populate ();
63
67 virtual ~CoilArray ();
68
77 static unsigned int CreateCoil (void* ptr,DOMNode* node);
78
85 DOMNode* RunTree (DOMNode* node, void* ptr, unsigned int (*fun) (void*, DOMNode*));
86
87
93 inline unsigned int GetSize () { return m_coils.size(); };
94
100 void InitializeSignals (long lADCs);
101
107 void Receive (long lADC);
108
113 IO::Status DumpSignals (string tmp_prefix = "", bool normalize = true);
114
119 IO::Status DumpSignalsISMRMRD (string prefix = "_ismrmrd", bool normalize = true);
120
125 IO::Status DumpSensMaps (bool verbose = false);
126
127
133 void SetSignalPrefix (string val) {m_signal_prefix = val;};
134
135 string GetSignalPrefix () {return m_signal_prefix;};
136
137 void SetSenMaplPrefix (string val) {m_senmap_prefix = val;};
138
139 string GetSenMaplPrefix () {return m_senmap_prefix;};
140
146 void SetSenMapOutputDir(string dir) { m_senmap_output_dir = dir; };
147
148 string GetSenMapOutputDir () {return m_senmap_output_dir;};
149
155 void SetSignalOutputDir(string dir) { m_signal_output_dir = dir; };
156
157 string GetSignalOutputDir () {return m_signal_output_dir;};
158
165 Coil* GetCoil (unsigned channel);
166
174 bool Prepare (const PrepareMode mode);
175
179 void setMode (unsigned short mode) { m_mode = mode; }
180
184 int ReadRestartSignal();
185
186 private:
187
188 vector<Coil*> m_coils;
189 double m_radius;
190 unsigned short m_mode;
197 DOMDocument* m_dom_doc;
201 bool m_normalized=false;
203};
204
205#endif /*COILARRAY_H_*/
Implementation of JEMRIS CoilPrototypeFactory.
mode
Definition: Declarations.h:112
Status
Definition: Declarations.h:150
Implementation of JEMRIS Signal.
Implementation of JEMRIS XMLIO.
Coil configuration and sensitivities.
Definition: CoilArray.h:40
CoilPrototypeFactory * m_cpf
Coil factory
Definition: CoilArray.h:196
string m_signal_output_dir
string to signal directory
Definition: CoilArray.h:193
string m_signal_prefix
prefix string to signal binary filenames
Definition: CoilArray.h:191
vector< Coil * > m_coils
My coils
Definition: CoilArray.h:188
string m_senmap_prefix
prefix string to sensitivity map filenames
Definition: CoilArray.h:192
unsigned short m_mode
My mode (RX/TX)
Definition: CoilArray.h:190
Parameters * m_params
My parameters
Definition: CoilArray.h:198
virtual ~CoilArray()
Default destructor.
Definition: CoilArray.cpp:52
IO::Status DumpSignalsISMRMRD(string prefix="_ismrmrd", bool normalize=true)
Dump all signals Dump the signals from all coils to ISMRMRD file.
Definition: CoilArray.cpp:228
IO::Status DumpSignals(string tmp_prefix="", bool normalize=true)
Dump all signals Dump the signals from all coils to discrete files.
Definition: CoilArray.cpp:154
unsigned int GetSize()
Get the number of channels.
Definition: CoilArray.h:93
string m_senmap_output_dir
string to sensitivity map directory
Definition: CoilArray.h:194
void Initialize(string uri)
Initialize the array and its elements.
Definition: CoilArray.cpp:131
DOMDocument * m_dom_doc
DOM document containing configuration.
Definition: CoilArray.h:197
IO::Status DumpSensMaps(bool verbose=false)
Dump all sensitivities Dump the sensitivities from all coils to discrete files.
Definition: CoilArray.cpp:361
void Receive(long lADC)
Recieve a signal from the World singleton with my coils for a given event.
Definition: CoilArray.cpp:146
Coil * GetCoil(unsigned channel)
Get a particular coil.
Definition: CoilArray.cpp:390
static unsigned int CreateCoil(void *ptr, DOMNode *node)
Clone a coil.
Definition: CoilArray.cpp:91
XMLIO * m_xio
My XML IO module
Definition: CoilArray.h:199
unsigned int Populate()
Populate coil array Run over coil array configuration tree and Populate the array.
Definition: CoilArray.cpp:61
int ReadRestartSignal()
reads restart signal.
Definition: CoilArray.cpp:399
void SetSignalPrefix(string val)
Set signal file-name prefix Set the prefix string for signal binary filenames.
Definition: CoilArray.h:133
void InitializeSignals(long lADCs)
Create the signal structures of given size for all my coils.
Definition: CoilArray.cpp:138
CoilArray()
Default constructor.
Definition: CoilArray.cpp:36
double m_radius
My radius
Definition: CoilArray.h:189
bool m_normalized
WIP parameter to check if data was already normalized by DumpSignals().
Definition: CoilArray.h:201
void SetSignalOutputDir(string dir)
Set signals output directory Directory the signal binary is saved to.
Definition: CoilArray.h:155
bool Prepare(const PrepareMode mode)
Prepare my coils.
Definition: CoilArray.cpp:81
DOMNode * RunTree(DOMNode *node, void *ptr, unsigned int(*fun)(void *, DOMNode *))
Run over XML tree and return nodes.
Definition: CoilArray.cpp:104
void SetSenMapOutputDir(string dir)
Set SensMap output directory Directory the SensMap is saved to.
Definition: CoilArray.h:146
This interface knows about coil prototypes.
Definition: CoilPrototypeFactory.h:36
Base class of coil objects.
Definition: Coil.h:39
World parameters provide the parametric data of the sequence.
Definition: Parameters.h:37
XML file-IO class.
Definition: XMLIO.h:61

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