help > RE: Error in preprocessing (Realign & Unwarp)
Mar 16, 2025  12:03 AM | Pravesh Parekh - University of Oslo
RE: Error in preprocessing (Realign & Unwarp)

Hi Himanshu,


Off the top of my head, I think you are running out of space in the location which MATLAB is using to save temporary realignment files.


Few things to try:



  • Change the MATLAB default temporary directory and see if that mitigates the problem [https://www.mathworks.com/matlabcentral/answers/97720-how-do-i-change-the-temporary-directory-that-matlab-uses]

  • Try clearing up a bit more space in that location

  • If running in parallel, maybe reduce the number of parallel jobs


Hope this helps


Best


Pravesh


Originally posted by Himanshu Joshi:



Hi Alfonso and the conn experts,


Can you help me is troubleshooting this error:


SPM12: spm_uw_estimate (v6824)                     15:57:24 - 15/03/2025
========================================================================
15-Mar-2025 15:58:22 - Failed  'Realign & Unwarp'
Error using mat2file
Can't open file for writing:
C:\Users\hp\AppData\Local\Temp\tp55f57447_787c_40f6_b60c_5d082cdcf5d0.nii
Check for write permission or whether the directory exists.
In file "C:\MATLAB\R2024b\toolbox\spm12\@file_array\subsasgn.m" (v7147), function "subfun" at line 164.
In file "C:\MATLAB\R2024b\toolbox\spm12\@file_array\subsasgn.m" (v7147), function "subsasgn" at line 85.
In file "C:\MATLAB\R2024b\toolbox\spm12\spm_write_plane.m" (v6079), function "spm_write_plane" at line 31.
In file "C:\MATLAB\R2024b\toolbox\spm12\spm_smooth.m" (v4419), function "smooth1" at line 107.
In file "C:\MATLAB\R2024b\toolbox\spm12\spm_smooth.m" (v4419), function "spm_smooth" at line 37.
In file "C:\MATLAB\R2024b\toolbox\spm12\spm_uw_estimate.m" (v6824), function "spm_uw_estimate" at line 268.
In file "C:\MATLAB\R2024b\toolbox\spm12\config\spm_run_realignunwarp.m" (v6554), function "spm_run_realignunwarp" at line 90.



The following modules did not run:
Failed: Realign & Unwarp
Failed: Realign & Unwarp
Failed: Realign & Unwarp
Failed: Realign & Unwarp
Failed: Realign & Unwarp
Failed: Realign & Unwarp
Failed: Realign & Unwarp
Failed: Realign & Unwarp
Failed: Realign & Unwarp
Failed: Realign & Unwarp
Failed: Realign & Unwarp
Failed: Realign & Unwarp
Failed: Realign & Unwarp
Failed: Realign & Unwarp
Failed: Realign & Unwarp
Failed: Realign & Unwarp
Failed: Realign & Unwarp
Failed: Realign & Unwarp
Failed: Realign & Unwarp
Failed: Realign & Unwarp
Failed: Realign & Unwarp


Kindly suggest the needful


Regards
Himanshu



 

Threaded View

TitleAuthorDate
Himanshu Joshi Mar 15, 2025
RE: Error in preprocessing (Realign & Unwarp)
Pravesh Parekh Mar 16, 2025
Himanshu Joshi Mar 18, 2025