Hi Katie,

The core.py file has been updated now. Please try downloading it again and applying the same fix as before.

Best,
Avnish

From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Katie Rose Jobson <katie.jobson@temple.edu>
Sent: Monday, February 6, 2023 3:17 PM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] [External] Re: 7.3.2-patch issues - thalamic segmentation
 

        External Email - Use Caution        

Hi FS experts,

Apologies for my late follow up.

In reference to the previous conversation, I added the core.py file to the correct subdirectory to complete the thalamic nuclei segmentation. I received an error still, albeit a different error:

Traceback (most recent call last):

  File "/usr/local/freesurfer-7.3.2/python/scripts/segment_subregions", line 6, in <module>

    from freesurfer import subregions

  File "/usr/local/freesurfer-7.3.2/python/packages/freesurfer/subregions/__init__.py", line 1, in <module>

    from freesurfer.subregions.process import structure_names

  File "/usr/local/freesurfer-7.3.2/python/packages/freesurfer/subregions/process.py", line 8, in <module>

    from freesurfer.subregions.thalamus import ThalamicNuclei

  File "/usr/local/freesurfer-7.3.2/python/packages/freesurfer/subregions/thalamus.py", line 9, in <module>

    from freesurfer.subregions.core import MeshModel

  File "/usr/local/freesurfer-7.3.2/python/packages/freesurfer/subregions/core.py", line 9, in <module>

    from gems.subregions import utils

ImportError: cannot import name 'utils' from 'gems.subregions' (unknown location)


I am assuming this is because the core.py script was previously housed in the '/gems/subregions' subdirectory, and is attempting to import 'utils' from there. Is there any way to edit this file (core.py) to call on this 'utils' function?

Please let me know if I can clarify my question in any way and thank you in advance for your help!

Best Wishes,
Katie
--
Katie Jobson, M.S. | Personal Website
Ph.D. Student | Cognitive Neuroscience Lab
Department of Psychology and Neuroscience | Temple University


From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Kumar, Avnish <Avnish.Kumar@mgh.harvard.edu>
Sent: Thursday, December 8, 2022 10:19 AM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Subject: [External] Re: [Freesurfer] 7.3.2-patch issues - thalamic segmentation
 
Hi Katie, 

Thank you for pointing this out! Yes, please make changes to the core.py script in your '$FREESURFER/python/packages/freesurfer/subregions/' folder. I will update the patch instructions to reflect this as well.

Best,
Avnish

From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Katie Rose Jobson <katie.jobson@temple.edu>
Sent: Wednesday, December 7, 2022 3:35 PM
To: freesurfer@nmr.mgh.harvard.edu <freesurfer@nmr.mgh.harvard.edu>
Subject: [Freesurfer] 7.3.2-patch issues - thalamic segmentation
 

        External Email - Use Caution        

Hi FS experts,

I am attempting to implement the patch on version 7.3.2 for issues with thalamic segmentation. I followed the instructions found here: MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.3.2-patch/readme.txt and placed the scripts in their designated directories. However, I received the same error as before. The output indicates that the core.py script is located in the '$FREESURFER/python/packages/freesurfer/subregions/' directory, as opposed to the directory I was instructed to put the core.py script in ('$FREESURFER/python/packages/gems/subregions/'). 

Should I replace the core.py script within '$FREESURFER/python/packages/freesurfer/subregions/'? Or is there another course of action that I can do that may solve this issue?

Here is the exact error, if that is at all helpful:
Step 2: aligning atlas to reference segmentation
Traceback (most recent call last):
  File "/usr/local/freesurfer-7.3.2/python/scripts/segment_subregions", line 99, in <module>
    subregions.run_cross_sectional(args.structure, parameters)
  File "/usr/local/freesurfer-7.3.2/python/packages/freesurfer/subregions/process.py", line 52, in run_cross_sectional
    model.align_atlas_to_seg()
  File "/usr/local/freesurfer-7.3.2/python/packages/freesurfer/subregions/core.py", line 240, in align_atlas_to_seg
    mask = mask.resize(1, interp='nearest')
TypeError: resize() got an unexpected keyword argument 'interp'

Thank you in advance for your help!

Best Wishes,
Katie
--
Katie Jobson, M.S. | Personal Website
Department of Psychology and Neuroscience | Temple University