Morphologist is a neuroimaging software dedicated to cortical analysis and sulcal morphometry. See https://brainvisa.info and :morphoproc:`the toolbox documentation in BrainVISA <categories/morphologist/category_documentation.html>`.

Morphologist is a neuroimaging software dedicated to cortical analysis and sulcal morphometry. See 

Morphologist-UI is a user-friendly interface to the Morphologist pipeline. It is based on the same processing chain, and offers interactive visualization using `anatomist <https://brainvisa.info>`_.

Morphologist-UI is a user-friendly interface to the Morphologist pipeline. It is based on the same processing chain, and offers interactive visualization using 

Robust: Morphologist has processed several tenths of thousands of brains

It is a simplified intercace, providing only the default parameters settings. For the sake of simplicity, there are no buttons, parameters, or other tuning which may affect processing: it is designed for "standard" processing.

It is a simplified intercace, providing only the default parameters settings. For the sake of simplicity, there are no buttons, parameters, or other tuning which may affect processing: it is designed for “standard” processing.

Morphologist-UI performs the processings of the classical Morphologist toolbox in BrainVISA, with a slightly modified files organization: it will write additional files for the "renormalization" step (second normalization after skull stripping to enforce the alignment robustness).

Morphologist-UI performs the processings of the classical Morphologist toolbox in BrainVISA, with a slightly modified files organization: it will write additional files for the “renormalization” step (second normalization after skull stripping to enforce the alignment robustness).

Morphologist-UI relies on files existence to display results and re-run processing steps in case of interruptions, so files have to be written just once. This is not what the Morphologist toolbox does in BrainVISA (for historical and technical reasons). Hence the difference.

For this and other reasons, Morphologist-UI does not use nor feed BrainVisa databases, so if you are to use the "regular" brainvisa after running Morphologist-UI, you should create or update an appropriate database for the study directory.

For this and other reasons, Morphologist-UI does not use nor feed BrainVisa databases, so if you are to use the “regular” brainvisa after running Morphologist-UI, you should create or update an appropriate database for the study directory.

Apart from these additional output files, Morphologist-UI and Morphologist produce the same results and are interchangeable. So if Morphologist-UI fails for some reason, it is always possible to use the classical BrainVISA pipeline, with all its available parameters, to complete the processing.

A restriction on file formats (images, meshes) also apply for Morphologist-UI: it can handle several formats, as Morphologist have always did, but the format is chosen globally: all files in a database should have a single same format for all images, or all meshes, others will not be recognized.

The normalization step may make use of external software, that has to be installed separately. If none is installed, the normalization defaults to the AimsMIRegister (mutual information) method, which is not the best tested one and might suffer from robustness issues. If installed and configured (see configuration options), the following software may be used instead, in that order:

  * `SPM (FIL, UK) <https://www.fil.ion.ucl.ac.uk/spm/>`_. It needs to be installed separately and setup in Morphologist configuration. SPM8 or SPM12 are supported, both with either the regular matlab version or the *standalone* compiled one.
  * `FSL flirt (FMRIB, UK) <https://fsl.fmrib.ox.ac.uk/fsl>`_. It needs to be installed separately and setup in Morphologist configuration.
  * Baladin (Inria, France). You will probably not use it, since this software is not freely available.

* `SPM (FIL, UK) <https://www.fil.ion.ucl.ac.uk/spm/>`_. It needs to be installed separately and setup in Morphologist configuration. SPM8 or SPM12 are supported, both with either the regular matlab version or the *standalone* compiled one.
* `FSL flirt (FMRIB, UK) <https://fsl.fmrib.ox.ac.uk/fsl>`_. It needs to be installed separately and setup in Morphologist configuration.
* Baladin (Inria, France). You will probably not use it, since this software is not freely available.

`SPM (FIL, UK) <https://www.fil.ion.ucl.ac.uk/spm/>`_. It needs to be installed separately and setup in Morphologist configuration. SPM8 or SPM12 are supported, both with either the regular matlab version or the *standalone* compiled one.

. It needs to be installed separately and setup in Morphologist configuration. SPM8 or SPM12 are supported, both with either the regular matlab version or the 

`FSL flirt (FMRIB, UK) <https://fsl.fmrib.ox.ac.uk/fsl>`_. It needs to be installed separately and setup in Morphologist configuration.

. It needs to be installed separately and setup in Morphologist configuration.

Baladin (Inria, France). You will probably not use it, since this software is not freely available.

Run the executable script ``morphologist`` in the ``bin/`` directory of the BrainVisa/Morphologist distribution.

It can also be found in BrainVISA processes, in the Morphologist toolbox.

One is the :axonusr:`BrainVisa configuration (preferences) <axon_manual.html#preferences-window>`, which have to be setup since BrainVisa processes are still running under the hood. They are accessed via the **Settings / BrainVISA configuration** menu, or from the brainvisa software itself (it is the same configuration).
Especially, external software configuration (SPM, FSL) should be configured there.

, which have to be setup since BrainVisa processes are still running under the hood. They are accessed via the 

 menu, or from the brainvisa software itself (it is the same configuration).

Other options are **Morphologist study configuration**. They include description of the data to be processed (subjects, images...), and also a few processing options which are managed by `CAPSUL <https://neurospin.github.io/capsul/>`_, the future new pipelining system which will replace BrainVISA internals in the future.

. They include description of the data to be processed (subjects, images…), and also a few processing options which are managed by 

, the future new pipelining system which will replace BrainVISA internals in the future.

Some of these options are redundant with BrainVisa ones, and are linked to them.

These configuration options are linked to the "study" directory: a study contains all needed configuration, and two different studies may have completely different configurations.

These configuration options are linked to the “study” directory: a study contains all needed configuration, and two different studies may have completely different configurations.

Last, the **Calculations settings** allow to select the computing resource and processors to be used for calculation (**Settings / Calculations** menu). It should be noted that for non-local computing resources, resources have to be setup and declared in :somaworkflow:`soma-workflow configuration <install_config.html>` first.

 allow to select the computing resource and processors to be used for calculation (

 menu). It should be noted that for non-local computing resources, resources have to be setup and declared in 

A study is both the working data directory and all configuration settings needed to run the processings.

**Study directory**: where all data will be stored and processed, and the study file (configuration, data list) will be stored.

: where all data will be stored and processed, and the study file (configuration, data list) will be stored.

**Volumes and meshes formats**: file formats used during processing. If these formats are changed after data have been written, all existing data will be converted to the new formats.

: file formats used during processing. If these formats are changed after data have been written, all existing data will be converted to the new formats.

**Computing resource**: for processing distribution. It defaults to the local machine, but computing resources configured in Soma-Workflow may be used. They have to be setup in soma-workflow config first. See `Soma-Workflow documentation <https://brainvisa.info/soma/soma-workflow/index.html>`_.

: for processing distribution. It defaults to the local machine, but computing resources configured in Soma-Workflow may be used. They have to be setup in soma-workflow config first. See 

New subjects will be imported (copied into the study directory).

This option enables to create a complete study from a directory tree containing organized data. It may be a BrainVisa database directory, or a directory with a different organization (well, this is not supported yet, actually...).

This option enables to create a complete study from a directory tree containing organized data. It may be a BrainVisa database directory, or a directory with a different organization (well, this is not supported yet, actually…).

With BrainVisa databases, subjects may be either used in-place (reusing the existing database directory to work in it and share data with BrainVisa/Morphologist), or by copying raw T1 images in a new study directory.

Process several or all subjects. Run in parallel using `Soma-Workflow <https://brainvisa.info/soma/soma-workflow/index.html>`_.
Results appear in the display window at the time they are available.

.

Processing steps currently running are visible in the subjects state (right panel in the interface). It is also always possible to monitor the workflow execution via the :somaworkflow:`soma_workglow_gui <gui.html>` program.

Processing steps currently running are visible in the subjects state (right panel in the interface). It is also always possible to monitor the workflow execution via the 

Morphologist-UI is a very simplified interface for running Morphologist analyses, and provides no options or tuning in processing steps. When things go wrong on some images, the simplified user interface will not allow users to fix problems and re-run the processings with modified settings.

In this case, users should use the older (and complete) BrainVisa toolbox to overcome problems: as it is compatible, and provides many processing options, it is possible to run specific steps with modified settings using BrainVisa.

This is a first release of Morphologist-UI. It currently supports the main segmentation steps, sulci extraction, and sulcal morphometric measurements extraction. The morphometric step is whole brain, and there is currently no choice and no statistical analysis provided.

In the future, Morphologist-UI will be extended for inter-subject statistical analysis on sulcal morphometric features.

Other improvements in specialized steps visualization windows are planned, especially for processing parameters edition, and manual correction of processed data, as in BrainVisa editors.

Use the **Study / Import** option. Use the BrainVisa database directory, keeping files in place (leave the "Create the study in this directory" option ON).

 option. Use the BrainVisa database directory, keeping files in place (leave the “Create the study in this directory” option ON).

In the study specification, make sure you set the same files formats as the ones which were used in brainvisa.

Reprocess Morphologist-UI results using the BrainVisa Morphologist

In the **Preferences**, setup a database to be the study directory of Morphologist-UI.

, setup a database to be the study directory of Morphologist-UI.

If it already existed, you will have to update the database (using the process **Data management / Update databases**, if not already prompted to do so).

If it already existed, you will have to update the database (using the process 

reprocess morphologist-ui results using the brainvisa morphologist

Soma-workflow: A unified and simple interface to parallel computing resource

Supporting new computing resources: writing a Scheduler implementation

Why it’s difficult and often impossible to run the Soma-Workflow server inside a container

When transformations information is present in the object header (such as NIFTI volume)

PyAnatomist / PyAims tutorial : mixing Anatomist and AIMS in Python language

f-strings support = for self-documenting expressions and debugging

ZERO-CLAUSE BSD LICENSE FOR CODE IN THE PYTHON 3.10.13 DOCUMENTATION

email.message.Message: Representing an email message using the compat32 API

What is the most efficient way to concatenate many strings together?

Why does a_tuple[i] += [‘item’] raise an exception when the addition works?

What does the slash(/) in the parameter list of a function mean?

Why am I getting an UnboundLocalError when the variable has a value?

PEP 3118: New memoryview implementation and buffer protocol documentation

PEP 476: Enabling certificate verification by default for stdlib http clients

PEP 471 - os.scandir() function – a better and faster directory iterator

Why must ‘self’ be used explicitly in method definitions and calls?

argparse — Parser for command-line options, arguments and sub-commands

functools — Higher-order functions and operations on callable objects

multiprocessing.shared_memory — Shared memory for direct access across processes

sysconfig — Provide access to Python’s configuration information