mrsprint package¶
Subpackages¶
Submodules¶
mrsprint.globals module¶
Global values.
- Authors:
- Victor Hugo de Mello Pessoa <victor.pessoa@usp.br>
- Daniel Cosmo Pizetta <daniel.pizetta@usp.br>
- Since:
- 2015/06/01
mrsprint.mainwindow module¶
Main window of visual simulator.
- Authors:
- Victor Hugo de Mello Pessoa <victor.pessoa@usp.br>
- Daniel Cosmo Pizetta <daniel.pizetta@usp.br>
- Since:
- 2017/08/01
Todo
Replaning this module, divide and make it more simple.
-
class
mrsprint.mainwindow.
MainWindow
(parent=None)[source]¶ Bases:
PyQt4.QtGui.QMainWindow
Main window.
- About load methods:
- This method should exist for each type of context that could be edited in the 2D editor and 3D view. Ex. loadSystemParameters. It should be responsible for loading values from parameter tree, connect signals - to respective own actions, and set data.To keep it isolated, it should set data, and when data is changed, data triggers the GUI update. And the reverse mode.
-
canClose
()[source]¶ Check if the user want to save the sample before closing.
Returns: True if can close. Return type: bool
-
clearSelection2DEditor
(all_tables=False)[source]¶ Clear selection of all 2D editor tables.
Parameters: all_tables (bool) – Informs if all tables are shown or not. Default is False.
-
create3DView
()[source]¶ Create a 3D view and the first 3D object.
It must be called when starts and when the shape or size is changed.
-
fileSave
()[source]¶ Save the current sample in the last saving file.
If there is no current saving file, it calls fileSaveAs().
-
gradient2DEditor
()[source]¶ Run the gradient editor and set values to 2D editor tables.
Todo
Remove eval after changing itemMethodsTable2dEditor.
-
invertBackground3DView
(invert=False)[source]¶ Invert the background color of 3D view.
Parameters: invert (bool) – Informs if the background color should be inverted. Default is False.
-
itemsMethodsTable2DEditor
()[source]¶ Return current selected item, methods to access their indexes and the table.
Returns: The current selected items, the methods attached to the selected table and the selected table Return type: list (QtGui.QTableWidgetItem()), dict (string of methods), QtGui.QTableWidget() Todo
This could be even better if getting these values, return just a new matrix with proper indexes and values to set data.
-
open
(file_path)[source]¶ Open a HDF5 file and applies the changes to the program.
Parameters: file_path (str) – Path to the file where the data will be opened.
-
openSample
(file_path)[source]¶ Open a HDF5 sample file.
Parameters: file_path (str) – Path to a file containing a sample.
-
openSequence
(file_path)[source]¶ Open a python sequence file.
The file must contain a class SequenceExample, that contains information about the sequence as RF pulses and the Gradient.
Parameters: file_path (str) – Path to a file containing the sequence.
-
openSystem
(file_path)[source]¶ Open a HDF5 system file.
Parameters: file_path (str) – Path to a file containing the system.
-
resizeTable2DEditor
()[source]¶ Change the size of the tableWidgets whenever a row/column is added/removed.
-
save
(file_path)[source]¶ Create a HDF5 file to save current data.
Parameters: file_path (str) – Path to the file where the data will be saved.
-
saveSample
(file_path)[source]¶ Save a HDF5 sample file.
Parameters: file_path (str) – Path to the file where the sample will be saved.
-
saveSystem
(file_path)[source]¶ Save a HDF5 system file.
Parameters: file_path (str) – Path to the file where the system will be saved.
-
showAxis3DView
(show=True)[source]¶ Show axis in 3D view.
Parameters: show (bool) – Informs if the axis should be visible. Default is True.
-
tabify2DEditor
(value)[source]¶ Tabify 2D editor depending on value.
Parameters: value (bool) – Informs if the tables in 2DEditor should be tabified or not.
mrsprint.settings module¶
Module responsible for the configuration of settings of all other modules.
- Authors:
- Victor Hugo de Mello Pessoa <victor.pessoa@usp.br>
- Daniel Cosmo Pizetta <daniel.pizetta@usp.br>
- Since:
- 2017/07/01
Todo
Insert log inside functions.
-
class
mrsprint.settings.
Settings
(*args, **kwargs)[source]¶ Bases:
PyQt4.QtGui.QMainWindow
Main window for settings.
Todo
Include restore default settings. Create a better check for values.
-
blockUnblockSignals
(value)[source]¶ Block or unblock signals defined by value.
Parameters: value (bool) – True to block, false otherwise.
-
check
()[source]¶ Evaluate if parameters are between its limits before saving them.
Returns: True if OK. Return type: bool Todo
Reduce complexity and check all value limits.
-
Module contents¶
Magnetic resonance experiment simulator and visualization tool.
- Authors:
- Daniel Cosmo Pizetta <daniel.pizetta@usp.br>
- Victor Hugo de Mello Pessoa <victor.pessoa@usp.br>
- Since:
- 2015/07/01