PET Volume Pipeline Crash: 4D Image Error and in_image AttributeError

23 views
Skip to first unread message

Shahzad ALi

unread,
Jul 1, 2025, 2:40:46 AMJul 1
to Clinica

Dear Clinica Team,

I hope you are doing well.
I am experiencing repeated errors while running the pet-volume pipeline using the command below:

clinica run pet-volume BIDS_Dir CAPS_DIR Group FDG PONS2 -tsv subjects.tsv -wd ../tmp

Issue 1: 4D Image Error
File "/Users/shahzadali/miniconda3/envs/clinicaEnv_10_0/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 769, in _run_command
raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node init_pipeline.

Traceback:
Traceback (most recent call last):
File "<string>", line 8, in init_input_node
File "/Users/shahzadali/miniconda3/envs/clinicaEnv_10_0/lib/python3.10/site-packages/clinica/utils/filemanip.py", line 191, in load_volume
raise ValueError(f"The image is not 3D but {dim}D.")
ValueError: The image is not 3D but 4D.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/shahzadali/miniconda3/envs/clinicaEnv_10_0/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 401, in run
runtime = self._run_interface(runtime)
File "/Users/shahzadali/miniconda3/envs/clinicaEnv_10_0/lib/python3.10/site-packages/nipype/interfaces/utility/wrappers.py", line 139, in _run_interface
out = function_handle(**args)
File "<string>", line 12, in init_input_node
ValueError: Clinica could not load volumes for sub-ADNI035S7049 | ses-M000. The image is not 3D but 4D.


I tried removing problematic subjects iteratively, but the issue persisted with other subjects too. I then tried running a single subject, and that led to a different error.

Issue 2: in_image AttributeError (Single Subject)

2025-07-01 06:42:17,299:INFO:Setting SPM path to /Users/shahzadali/Documents/MATLAB/spm25
2025-07-01 06:42:17,301:INFO:Found installation of spm with version 25.25.1.2, satisfying >=12.
2025-07-01 06:43:14,565:INFO:The pipeline will be run on the following 1 image(s):
  - sub-ADNI002S2010 | ses-M000
2025-07-01 06:43:14,565:INFO:List available in /Volumes/CrucialX6/NeuroimagingData/tmp/pet-volume/participants.tsv
2025-07-01 06:43:14,565:INFO:The pipeline will last approximately 10 minutes per image.
2025-07-01 06:43:14,569:WARNING:SPM standalone is not available on this system. The pipeline will try to use SPM and Matlab instead. If you want to rely on spm standalone, please make sure to set the following environment variables: $SPMSTANDALONE_HOME, and $MCR_HOME
...
250701-06:43:54,902 nipype.workflow INFO:
   [Node] Executing "apply_mask" <nipype.interfaces.utility.wrappers.Function>
Traceback (most recent call last):
  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_10_0/lib/python3.10/site-packages/nipype/pipeline/plugins/multiproc.py", line 323, in _send_procs_to_workers
    num_subnodes = self.procs[jobid].num_subnodes()
  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_10_0/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 1312, in num_subnodes
    self._check_iterfield()
  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_10_0/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 1334, in _check_iterfield
    if not isdefined(getattr(self.inputs, iterfield)):
AttributeError: 'DynamicTraitedSpec' object has no attribute 'in_image'
...
RuntimeError: Traceback (most recent call last):
  ...
  AttributeError: 'DynamicTraitedSpec' object has no attribute 'in_image'

I am using: 

  • clinica version: 0.10.0
  • matlab: 2024b
  • SPM 25

I would be grateful if you could help me resolve these errors.


Best,

Shahzad

--------------------

Alice Joubert

unread,
Jul 1, 2025, 5:30:35 AMJul 1
to clinic...@googlegroups.com
Hello Shazhad,

Thanks for reporting. From my understanding you are trying to use `pet-volume` with the set-up matlab + spm (not standalone). Clinica pipelines do not support spm25 yet so the error would likely come from there. Do you have an installation of spm12 you can test it with ? The `pet-volume` pipeline requires having ran `t1-volume` previously, which also relies on spm. Did you manage to do that ? 

Best,

Alice 

--
You received this message because you are subscribed to the Google Groups "Clinica" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clinica-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/clinica-user/9d0bde96-b534-4b69-b104-211f3f24d206n%40googlegroups.com.

Shahzad ALi

unread,
Jul 1, 2025, 5:46:56 AMJul 1
to clinic...@googlegroups.com

Hi Alice,

Thank you for your response.

Yes, I was able to run the t1-volume pipeline using the same setup (MATLAB + SPM25) but with Clinica 0.9.4. Previously, I also tried pet-volume with Clinica 0.9.4, but encountered a different error:

/Users/shahzadali/miniconda3/envs/adni_clinica94/lib/python3.10/site-packages/clinica/iotools/utils/data_handling/_centering.py", line 216, in check_relative_volume_location_in_world_coordinate_system
warnings.warn(warning_message)
TypeError: expected string or bytes-like object, got 'NoneType'
After going through the discussions, I found that this issue was addressed in the latest version of Clinica. Therefore, I tried running pet-volume with Clinica 0.10.0.

P.s.: I did try setting up SPM12 with MATLAB but ran into issues. However, I somehow managed to get the pipeline running with SPM25. Since t1-volume worked, I continued using the same setup for pet-volume.
Now, do I have to shift to SPM12 for pet-volume?

Best,

Shahzad 

-----------------------------------------------------------------------



Alice Joubert

unread,
Jul 3, 2025, 7:28:14 AMJul 3
to clinic...@googlegroups.com
Hi Shahzad,

I would say ideally you should run the pipelines with the same version of SPM as I don't know if they made big changes in the processings and that could change your results. Can you tell me which issues you had with the set-up MATLAB + SPM12 ?


Best,

Alice

Shahzad ALi

unread,
Jul 3, 2025, 7:39:16 AMJul 3
to clinic...@googlegroups.com
Dear Alice, 
Thanks for your suggestion. I will check again.
Howevre, the issue I faced I reported  here, let me copy this here:

(clinicaEnv_094) shahzadali@Shahzads-MacBook-Pro ADNI % clinica run t1-volume BIDS_Dir/BIDS_Multimodal CAPS_DIR/CAPS_Multimodal AD -tsv BIDS_Dir/Summary/participants_AD.tsv

2025-04-04 20:00:52,413:INFO:The t1-volume pipeline is divided into 4 parts:

t1-volume-tissue-segmentation pipeline: Tissue segmentation, bias correction and spatial normalization to MNI space

t1-volume-create-dartel pipeline: Inter-subject registration with the creation of a new DARTEL template

t1-volume-dartel2mni pipeline: DARTEL template to MNI

t1-volume-parcellation pipeline: Atlas statistics

2025-04-04 20:00:52,413:INFO:Part 1/4: Running t1-volume-segmentation pipeline.

2025-04-04 20:00:52,510:INFO:Setting SPM path to /Users/shahzadali/spm12

2025-04-04 20:00:54,227:INFO:The CAPS dataset 'None', located at /Volumes/CrucialX6/NeuroimagingData/ADNI/CAPS_DIR/CAPS_Multimodal, already contains a 'dataset_description.json' file.

2025-04-04 20:00:54,229:WARNING:The existing CAPS dataset, located at /Volumes/CrucialX6/NeuroimagingData/ADNI/CAPS_DIR/CAPS_Multimodal has a name 'eb8eff5f-1ba9-41cb-8586-ead098267da6' different from the new name '3825af6d-231d-43f5-b68a-cc1e1aef079c'. The old name will be kept.

/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/clinica/utils/stream.py:103: UserWarning: The existing CAPS dataset, located at /Volumes/CrucialX6/NeuroimagingData/ADNI/CAPS_DIR/CAPS_Multimodal has a name 'eb8eff5f-1ba9-41cb-8586-ead098267da6' different from the new name '3825af6d-231d-43f5-b68a-cc1e1aef079c'. The old name will be kept.

  warnings.warn(message, warning_type)

2025-04-04 20:00:57,327:INFO:Setting SPM path to /Users/shahzadali/spm12

Traceback (most recent call last):

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/nipype/utils/spm_docs.py", line 48, in _strip_header

    index = doc.index(hdr)

ValueError: substring not found


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/bin/clinica", line 8, in <module>

    sys.exit(main())

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/clinica/cmdline.py", line 113, in main

    cli()

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/click/core.py", line 1161, in __call__

    return self.main(*args, **kwargs)

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/click/core.py", line 1082, in main

    rv = self.invoke(ctx)

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/click/core.py", line 1697, in invoke

    return _process_result(sub_ctx.command.invoke(sub_ctx))

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/click/core.py", line 1697, in invoke

    return _process_result(sub_ctx.command.invoke(sub_ctx))

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/click/core.py", line 1443, in invoke

    return ctx.invoke(self.callback, **ctx.params)

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/click/core.py", line 788, in invoke

    return __callback(*args, **kwargs)

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func

    return f(get_current_context(), *args, **kwargs)

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/clinica/pipelines/t1_volume/t1_volume_cli.py", line 95, in cli

    ctx.invoke(

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/click/core.py", line 788, in invoke

    return __callback(*args, **kwargs)

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/clinica/pipelines/t1_volume_tissue_segmentation/t1_volume_tissue_segmentation_cli.py", line 73, in cli

    pipeline.run(plugin="MultiProc", plugin_args={"n_procs": n_procs})

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/clinica/pipelines/engine.py", line 729, in run

    self.build()

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/clinica/pipelines/engine.py", line 45, in func_wrapper

    res = func(self, *args, **kwargs)

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/clinica/pipelines/engine.py", line 690, in build

    self._check_dependencies()

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/clinica/pipelines/engine.py", line 798, in _check_dependencies

    dependency.check()

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/clinica/utils/check_dependency.py", line 115, in check

    check_software(self.name, log_level="error", specifier=self.version_constraint)

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/clinica/utils/check_dependency.py", line 786, in check_software

    _check_software_version(software, log_level=log_level, specifier=specifier)

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/clinica/utils/check_dependency.py", line 689, in _check_software_version

    if (installed_version := get_software_version(software)) not in specifier:

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/clinica/utils/check_dependency.py", line 518, in get_software_version

    return _get_spm_version()

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/clinica/utils/check_dependency.py", line 540, in _get_spm_version

    return Version(spm.SPMCommand().version)

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/nipype/interfaces/spm/base.py", line 303, in __init__

    super().__init__(**inputs)

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 199, in __init__

    unavailable_traits = self._check_version_requirements(

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 297, in _check_version_requirements

    if names and self.version:

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/nipype/interfaces/spm/base.py", line 351, in version

    info_dict = Info.getinfo(

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/nipype/interfaces/spm/base.py", line 235, in getinfo

    out = sd._strip_header(out.runtime.stdout)

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv_094/lib/python3.10/site-packages/nipype/utils/spm_docs.py", line 50, in _strip_header

    raise OSError("This docstring was not generated by Nipype!\n") from e

OSError: This docstring was not generated by Nipype!



Best,

Shahzad

-----------------------------------------------------------------------



On Thu, Mar 27, 2025 at 10:52 AM Alice Joubert <alice00...@gmail.com> wrote:
Hello Shahzad,

Regarding your set-up, we are using nipype 1.8.6 in our current version but in clinica v0.9.1 as well. Normally by installing the clinica package in a specific environment you should have the right dependency. I am not sure this would solve anything but out of curiosity would you make a new environment with clinica in it ? You can also upgrade to clinica v0.9.3 though it would not change anything for t1-volume.

Tell me if that changes anything,

Alice

 

Le mar. 25 mars 2025 à 23:31, Shahzad ALi <shahza...@gmail.com> a écrit :
Hi, Dear Alice, 

Thanks for your response. I have get this tsv using iotools command. 

However, when i run this command:

clinica run t1-volume BIDS_Dir/BIDS_Multimodal CAPS_DIR/CAPS_Multimodal AD -tsv BIDS_Dir/Summary/participants_AD.tsv

2025-03-25 23:20:00,607:INFO:The t1-volume pipeline is divided into 4 parts:

t1-volume-tissue-segmentation pipeline: Tissue segmentation, bias correction and spatial normalization to MNI space

t1-volume-create-dartel pipeline: Inter-subject registration with the creation of a new DARTEL template

t1-volume-dartel2mni pipeline: DARTEL template to MNI

t1-volume-parcellation pipeline: Atlas statistics

2025-03-25 23:20:00,607:INFO:Part 1/4: Running t1-volume-segmentation pipeline.

2025-03-25 23:20:00,690:INFO:Setting SPM path to /Users/shahzadali/spm12

2025-03-25 23:20:01,271:INFO:The CAPS dataset 'None', located at /Volumes/CrucialX6/SS_ADNI/Clinica/ADNI_multimodal/CAPS_DIR/CAPS_Multimodal, already contains a 'dataset_description.json' file.

2025-03-25 23:20:01,271:WARNING:The existing CAPS dataset, located at /Volumes/CrucialX6/SS_ADNI/Clinica/ADNI_multimodal/CAPS_DIR/CAPS_Multimodal has a name 'eb8eff5f-1ba9-41cb-8586-ead098267da6' different from the new name '48cdbe1c-af42-45f7-ba8a-b45112edfb4c'. The old name will be kept.

/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/clinica/utils/stream.py:103: UserWarning: The existing CAPS dataset, located at /Volumes/CrucialX6/SS_ADNI/Clinica/ADNI_multimodal/CAPS_DIR/CAPS_Multimodal has a name 'eb8eff5f-1ba9-41cb-8586-ead098267da6' different from the new name '48cdbe1c-af42-45f7-ba8a-b45112edfb4c'. The old name will be kept.

  warnings.warn(message, warning_type)

2025-03-25 23:20:03,399:INFO:Setting SPM path to /Users/shahzadali/spm12

Traceback (most recent call last):

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/nipype/utils/spm_docs.py", line 48, in _strip_header

    index = doc.index(hdr)

ValueError: substring not found


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/bin/clinica", line 8, in <module>

    sys.exit(main())

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/clinica/cmdline.py", line 113, in main

    cli()

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/click/core.py", line 1161, in __call__

    return self.main(*args, **kwargs)

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/click/core.py", line 1082, in main

    rv = self.invoke(ctx)

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/click/core.py", line 1697, in invoke

    return _process_result(sub_ctx.command.invoke(sub_ctx))

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/click/core.py", line 1697, in invoke

    return _process_result(sub_ctx.command.invoke(sub_ctx))

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/click/core.py", line 1443, in invoke

    return ctx.invoke(self.callback, **ctx.params)

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/click/core.py", line 788, in invoke

    return __callback(*args, **kwargs)

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func

    return f(get_current_context(), *args, **kwargs)

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/clinica/pipelines/t1_volume/t1_volume_cli.py", line 95, in cli

    ctx.invoke(

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/click/core.py", line 788, in invoke

    return __callback(*args, **kwargs)

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/clinica/pipelines/t1_volume_tissue_segmentation/t1_volume_tissue_segmentation_cli.py", line 73, in cli

    pipeline.run(plugin="MultiProc", plugin_args={"n_procs": n_procs})

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/clinica/pipelines/engine.py", line 729, in run

    self.build()

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/clinica/pipelines/engine.py", line 45, in func_wrapper

    res = func(self, *args, **kwargs)

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/clinica/pipelines/engine.py", line 690, in build

    self._check_dependencies()

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/clinica/pipelines/engine.py", line 798, in _check_dependencies

    dependency.check()

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/clinica/utils/check_dependency.py", line 115, in check

    check_software(self.name, log_level="error", specifier=self.version_constraint)

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/clinica/utils/check_dependency.py", line 786, in check_software

    _check_software_version(software, log_level=log_level, specifier=specifier)

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/clinica/utils/check_dependency.py", line 689, in _check_software_version

    if (installed_version := get_software_version(software)) not in specifier:

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/clinica/utils/check_dependency.py", line 518, in get_software_version

    return _get_spm_version()

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/clinica/utils/check_dependency.py", line 540, in _get_spm_version

    return Version(spm.SPMCommand().version)

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/nipype/interfaces/spm/base.py", line 303, in __init__

    super().__init__(**inputs)

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 199, in __init__

    unavailable_traits = self._check_version_requirements(

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 297, in _check_version_requirements

    if names and self.version:

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/nipype/interfaces/spm/base.py", line 351, in version

    info_dict = Info.getinfo(

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/nipype/interfaces/spm/base.py", line 235, in getinfo

    out = sd._strip_header(out.runtime.stdout)

  File "/Users/shahzadali/miniconda3/envs/clinicaEnv/lib/python3.10/site-packages/nipype/utils/spm_docs.py", line 50, in _strip_header

    raise OSError("This docstring was not generated by Nipype!\n") from e

OSError: This docstring was not generated by Nipype!





I have spm12 installed in matlab, Here are some checks:

clinica --version

clinica, version 0.9.1

>> spm('version')
ans =
    'SPM12 (dev)'

>> which spm
/Users/shahzadali/spm12/spm.m

echo $SPM_HOME

/Users/shahzadali/spm12

shahzadali@Shahzads-MacBook-Pro ~ % 


pip show nipype

Name: nipype

Version: 1.9.2

Summary: Neuroimaging in Python: Pipelines and Interfaces

Home-page: http://nipy.org/nipype

Author: nipype developers

Author-email: neuroi...@python.org

License: Apache License, 2.0

Location: /Users/shahzadali/fsl/lib/python3.11/site-packages

Requires: acres, click, etelemetry, filelock, looseversion, networkx, nibabel, numpy, packaging, prov, puremagic, pydot, python-dateutil, rdflib, scipy, simplejson, traits

Required-by: 


Best,

Shahzad 

-----------------------------------------------------------------------




Alice Joubert

unread,
Jul 3, 2025, 7:57:27 AMJul 3
to clinic...@googlegroups.com
Do you still have that issue if you use clinica 0.10.0 ?

Shahzad ALi

unread,
Jul 3, 2025, 8:44:17 AMJul 3
to clinic...@googlegroups.com
No, I didn't try SPM12 on clinica 0.10.0. I will check now and then get back to you.
Thanks.

Shahzad 

-----------------------------------------------------------------------



Shahzad ALi

unread,
Jul 3, 2025, 9:28:54 AMJul 3
to clinic...@googlegroups.com
Dear Alice,
I am having error while running spm12 (attached screenshot): I checked downloading the SPM 12 from both at:
  1. https://github.com/spm/spm12
  2. https://github.com/spm/spm12/releases/tag/r7771
However, the link to SPM installation at clinica website directly leads to SPM25.

Best,

Shahzad

---------------



Screenshot 2025-07-03 at 15.22.55.png

Shahzad ALi

unread,
Jul 3, 2025, 9:50:39 AMJul 3
to clinic...@googlegroups.com
Furthermore, I tried with SPM12 (dev), then SPM12 works in Matlab but gives error while running the t1-volume pipeline:

2025-07-03 15:47:09,500:INFO:Setting SPM path to /Users/shahzadali/Documents/MATLAB/spm12

2025-07-03 15:47:17,486:INFO:The CAPS dataset 'None', located at /Volumes/CrucialX6/NeuroimagingData/ADNI/CAPS_DIR, already contains a 'dataset_description.json' file.

2025-07-03 15:47:17,488:WARNING:The existing CAPS dataset, located at /Volumes/CrucialX6/NeuroimagingData/ADNI/CAPS_DIR has a name 'eb8eff5f-1ba9-41cb-8586-ead098267da6' different from the new name '1731358b-5f09-4199-89dc-44a718c8893a'. The old name will be kept.

/Users/shahzadali/miniconda3/envs/clinicaEnv_10_0/lib/python3.10/site-packages/clinica/utils/stream.py:103: UserWarning: The existing CAPS dataset, located at /Volumes/CrucialX6/NeuroimagingData/ADNI/CAPS_DIR has a name 'eb8eff5f-1ba9-41cb-8586-ead098267da6' different from the new name '1731358b-5f09-4199-89dc-44a718c8893a'. The old name will be kept.

  warnings.warn(message, warning_type)

2025-07-03 15:47:41,586:INFO:Setting SPM path to /Users/shahzadali/Documents/MATLAB/spm12

2025-07-03 15:47:41,587:ERROR:spm version is 12.dev0. We strongly recommend to have spm >=12.

2025-07-03 15:47:41,587:ERROR:spm version is 12.dev0. We strongly recommend to have spm >=12.

(clinicaEnv_10_0) shahzadali@Mac ADNI % 



Best,

Shahzad 

-----------------------------------------------------------------------


Screenshot 2025-07-03 at 15.46.40.png

Alice Joubert

unread,
Jul 4, 2025, 7:07:47 AMJul 4
to clinic...@googlegroups.com
Hello,

Where did you get the spm12(dev) version so I can try to reproduce that error ? In the meantime if you want I know our non-regression tests for clinica run to the end with MATLAB 2017a and SPM12/r7771 if you can find a  version of SPM12 still

Best,

Alice

Shahzad ALi

unread,
Jul 4, 2025, 3:48:22 PMJul 4
to clinic...@googlegroups.com
Dear Alice,

Thank you for your response.

I had downloaded the relevant file quite some time ago and unfortunately, I am unable to locate the original source now. However, I’ve attached the file to this email for your reference.

Additionally, I wanted to ask if it would be possible for your team to verify the Clinica pipeline compatibility with SPM25. I’ve observed that it works perfectly for the t1-volume pipeline, but I’m encountering an error when running it for pet-volume.

In the past, I spent a considerable amount of time trying to configure the setup with SPM12, but it was unsuccessful. Surprisingly, SPM25 worked smoothly for the T1 pipeline, which is why I’m now trying to use it for PET as well.

Your support and guidance on this would be highly appreciated.

Best regards,
Shahzad

-----------------------------------------------------------------------



Alice Joubert

unread,
Jul 7, 2025, 1:56:16 AMJul 7
to Clinica
Hello Shahzad,

It is indeed planned for us to verify compatibility with SPM25. I will get back to you as soon as I know more about that.

Best,

Alice

Shahzad ALi

unread,
Sep 1, 2025, 6:04:22 PM (7 days ago) Sep 1
to clinic...@googlegroups.com

Hi! Dear Alice and Clinica team,

Just checking in, has there been any progress on verifying Clinica’s compatibility with SPM25?

For context: SPM25 has been working smoothly for me on the t1-volume pipeline, but I still get an error with pet-volume (SPM12 didn’t work in my setup previously).

Thanks a lot for the update!

Best regards,
Shahzad

-----------------------------------------------------------------------



Alice Joubert

unread,
Sep 2, 2025, 4:19:26 AM (6 days ago) Sep 2
to Clinica
Hello Shahzad,

On my end I still have issues with t1-volume, as it does not behave the way it should with SPM25. Can you remind me your OS ? (And if it is a Mac the version ?)

Thank you very much,

Alice Joubert

Shahzad ALi

unread,
Sep 3, 2025, 3:15:36 AM (5 days ago) Sep 3
to clinic...@googlegroups.com
Hi Dear Alice,
I’m on macOS 15.6.1.
If it helps, I can try to reproduce the t1-volume issue on my side and share my SPM25 config (MATLAB version, paths, and any custom toolboxes) so we can compare.

Best,
Shahzad

------------------


You received this message because you are subscribed to a topic in the Google Groups "Clinica" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clinica-user/XNwdP9OWYJI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clinica-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/clinica-user/655b6190-a811-482b-8dd5-811b3da2317en%40googlegroups.com.

Alice Joubert

unread,
Sep 3, 2025, 3:46:59 AM (5 days ago) Sep 3
to clinic...@googlegroups.com
Hello Shahzad,

Thank you very much. I personally am using SPM25 standalone + MCR which is not your configuration if I remember correctly, since I think you use MATLAB + SPM25. By the way if it works we might change to only allow the set-up with SPM standalone (recent warning in our documentation). Out of curiosity, would that be a big issue for you ?

Best,

Alice

Shahzad ALi

unread,
Sep 3, 2025, 3:55:57 AM (5 days ago) Sep 3
to clinic...@googlegroups.com
Dear Alice,
Thank you for your prompt response and for sharing those details.
You remember correctly, I am currently using SPM25 through MATLAB (2024b) rather than the standalone version with MCR.
I will try switching to the SPM standalone setup on my end to test its compatibility and will share my results with you. But as you mentioned, this setup is not working for you with the t1-volume pipeline (if I understood correctly...). 

Best,
Shahzad

-----------------------------------------------------------------------



Alice Joubert

unread,
Sep 3, 2025, 4:08:10 AM (5 days ago) Sep 3
to clinic...@googlegroups.com
Thank you for the quick response ! What you can do also when you test the pipeline is specify a working directory (option `-wd`). Inside you will have the pipeline steps intermediary results and reports (which command line was used and so on) so that can be useful. 

Alice

Alice Joubert

unread,
Sep 3, 2025, 5:39:11 AM (5 days ago) Sep 3
to clinic...@googlegroups.com
I do have an additional question if you use the MATLAB+SPM set-up. Does clinica not ask you to set a SPMSTANDALONE_HOME anyway ?

Thanks !

Shahzad ALi

unread,
Sep 3, 2025, 5:49:12 AM (5 days ago) Sep 3
to clinic...@googlegroups.com
I have this path set up:

export MATLAB_HOME="/Applications/MATLAB_R2024b.app/bin/"

export PATH=${MATLAB_HOME}:${PATH}

export MATLABCMD="${MATLAB_HOME}/matlab"


export MATLABCMD="/Applications/MATLAB_R2024b.app/bin/matlab"


#export SPM_HOME="/Users/shahzadali/Documents/MATLAB/spm12"

export SPM_HOME="/Users/shahzadali/Documents/MATLAB/spm25"


export SPM_STANDALONE=0


#export PATH="/Applications/MATLAB_R2024b.app/bin:$PATH"


Best,

Shahzad 

-----------------------------------------------------------------------



Alice Joubert

unread,
Sep 3, 2025, 8:27:02 AM (5 days ago) Sep 3
to clinic...@googlegroups.com

Alice Joubert

unread,
Sep 3, 2025, 11:09:23 AM (5 days ago) Sep 3
to Clinica
Dear Shahzad,

I think I found a solution for your PET-Volume pipeline issue. We will perform a release but I am unsure when (I need to do more work around the fix), all I know is it should be before end of September. If you can't wait and are comfortable modifying the dev version of clinica I can tell you what to do for the pipeline to complete.

Best,

Alice

Shahzad ALi

unread,
Sep 3, 2025, 11:19:49 AM (5 days ago) Sep 3
to clinic...@googlegroups.com

Dear Alice,

Thank you for your quick help. 

I would be happy to test the suggested workaround on the dev version of Clinica. Please let me know the steps, and I will try them out.

Best regards,
Shahzad

-----------------------------------------------------------------------



Alice Joubert

unread,
Sep 4, 2025, 5:15:25 AM (4 days ago) Sep 4
to Clinica
Hello ! 

I opened a PR to fix this issue : https://github.com/aramis-lab/clinica/pull/1543. It should be merged soon and available on the dev version of clinica (you can access it by cloning the GitHub repository) however if you don't want to wait you can still get the dev version and perform the changes yourself. Don't hesitate to tell me if any part of this seems complicated for you (cloning the repository, going on the dev version...), I can explain in more details.

Best,

Alice
Reply all
Reply to author
Forward
0 new messages