External Email - Use Caution        

Thank you so much yujing, it worked.


Il giorno lun 10 mar 2025 alle 14:24 Huang, Yujing <yhuan...@mgh.harvard.edu>
ha scritto:

> I have attached SamsegLongitudinal.py to fix the python error. Copy it to
> /Applications/freesurfer/8.0.0/python/packages/gems/SamsegLongitudinal.py
>
>
>
> Yujing
>
>
>
> *From:* freesurfer-boun...@nmr.mgh.harvard.edu <
> freesurfer-boun...@nmr.mgh.harvard.edu> *On Behalf Of *Paola Di Filippo
> *Sent:* Sunday, March 9, 2025 8:28 AM
> *To:* freesurfer@nmr.mgh.harvard.edu
> *Subject:* [Freesurfer] Longitudinal samseg not working - TypeError:
> transform() got an unexpected keyword argument 'affine'
>
>
>
> *        External Email - Use Caution        *
>
> Hi everyone, I am trying to launch longitudinal samseg with the lesion
> flag for an MS subject, in Freesurfer 8.0. I followed instructions, cross
> sectional samseg for the same subject at T0 worked fine, but now I am
> having troubles, described as follows:
>
>
>
> MBP-di-Paola:~ paoladifilippo$ export FS_LICENSE=$HOME/license.txt
>
> MBP-di-Paola:~ paoladifilippo$ export
> FREESURFER_HOME=/Applications/freesurfer/8.0.0
>
> MBP-di-Paola:~ paoladifilippo$ source $FREESURFER_HOME/SetUpFreeSurfer.sh
>
> -------- freesurfer-macOS-darwin_arm64-8.0.0-20250205-0f2bd3a --------
>
> Setting up environment for FreeSurfer/FS-FAST (and FSL)
>
> FREESURFER_HOME   /Applications/freesurfer/8.0.0
>
> FSFAST_HOME       /Applications/freesurfer/8.0.0/fsfast
>
> FSF_OUTPUT_FORMAT nii.gz
>
> SUBJECTS_DIR      /Applications/freesurfer/8.0.0/subjects
>
> MNI_DIR           /Applications/freesurfer/8.0.0/mni
>
> MBP-di-Paola:~ paoladifilippo$ export
> LD_LIBRARY_PATH=$FREESURFER_HOME/MCRv97/runtime/maci64:$FREESURFER_HOME/MCRv97/bin/maci64:$FREESURFER_HOME/MCRv97/sys/os/maci64:$FREESURFER_HOME/MCRv97/extern/bin/maci64
>
> MBP-di-Paola:~ paoladifilippo$ cd
> /Users/paoladifilippo/RM.OCT.NFL/A.C/LONGITUDINAL.SAMSEG
>
> MBP-di-Paola:LONGITUDINAL.SAMSEG paoladifilippo$ run_samseg_long
> --timepoint A.C.2.4.91.MRI.12.9.22_t1_reg.mgz
> A.C.2.4.91.MRI.12.9.22_flair_reg.mgz --timepoint
> A.C.2.4.91.MRI.13.2.23_t1_reg.mgz A.C.2.4.91.MRI.13.2.23_flair_reg.mgz
> --timepoint A.C.2.4.91.MRI.20.09.23_t1_reg.mgz
> A.C.2.4.91.MRI.20.09.23_flair_reg.mgz --pallidum-separate --lesion
> --lesion-mask-pattern 0 1 --output
> /Users/paoladifilippo/RM.OCT.NFL/A.C/LONG.SAMSEG.OUTPUT/
>
> Assuming an identity transformation between base and each time point
>
> WARNING:tensorflow:From
> /Applications/freesurfer/8.0.0/python/miniconda3_apple_dist/py3_8_13/lib/python3.8/site-packages/tensorflow/python/compat/v2_compat.py:107:
> disable_resource_variables (from tensorflow.python.ops.variable_scope) is
> deprecated and will be removed in a future version.
>
> Instructions for updating:
>
> non-resource variables are not supported in the long term
>
> Traceback (most recent call last):
>
>   File "/Applications/freesurfer/8.0.0/python/scripts/run_samseg_long",
> line 209, in <module>
>
>     samsegLongitudinal.segment(saveWarp=args.save_warp,
> initTransformFile=args.init_reg)
>
>   File
> "/Applications/freesurfer/8.0.0/python/packages/gems/SamsegLongitudinal.py",
> line 181, in segment
>
>     self.constructAndRegisterSubjectSpecificTemplate(initTransformFile)
>
>   File
> "/Applications/freesurfer/8.0.0/python/packages/gems/SamsegLongitudinal.py",
> line 200, in constructAndRegisterSubjectSpecificTemplate
>
>     self.sstFileNames = self.generateSubjectSpecificTemplate()
>
>   File
> "/Applications/freesurfer/8.0.0/python/packages/gems/SamsegLongitudinal.py",
> line 835, in generateSubjectSpecificTemplate
>
>     imageBuffer = image0.transform(affine=self.tpToBaseTransforms[0])
>
> TypeError: transform() got an unexpected keyword argument 'affine'
>
>
>
>
>
> I am working on Apple M4 Pro with 48 GB RAM, MacOS 15.2. Any ideas on how
> to fix this? Thanks in advance
>
>
> _______________________________________________
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://secure-web.cisco.com/1SjkGgFBfQ2YxdvO5YbLD_-zqO02W93GRB0-kFd6gvod5rpIpaq0cxvVQBnvhUN8rKrTauTnA2CoIplxyu50XCpfQ3z-3U_P6ydhvDLO8X_0ejQmAFAFsYrit0toVCgKYWoMPlxEy7QAauYx2f88Q5U8v7WCQdY3o_HjPNqXSAiFnCNajyDiajpvC_Cw6qjBgTOjiQzSrKkJ4bdmN2c-I4b31KtelTiz6Vm8zzBxVx51vsKnsPqiYcfVufSCrb4CJTodohjai8HkUl0DD2uZ6OJzGpXcQSXbd62toI91PziiZnK0hUoWrSpUdJKhri06Bixf9RmFON-Z-AsZCJUjosg/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer
> The information in this e-mail is intended only for the person to whom it
> is addressed.  If you believe this e-mail was sent to you in error and the
> e-mail contains patient information, please contact the Mass General
> Brigham Compliance HelpLine at
> https://secure-web.cisco.com/1tdCYoMk-QnkYrIXZwUTa6cX5_Zlv6dSLAPz-CkAlzPgWgEVHgw5n-mGVaMeRyvlfex34sPXmEqrhjF9y1jaC98VEnAD7UckTe_3z_uZo_mqtxQslDeCGNHVpgQEvmCD7rKblpphyjdvFAcazIhAYvp3zhMjlzwgCSj7ayA_NORx0_WzpXys-AbbVPBbpvOIADcFtm-iaRnnxDhkAIpon5jFtC5D_lBCIiHwBv_VIShgC6hfQgtpgKCQXImAC7f96zWy6KungHRpxThKvv7uazIiNNVctNxSzXAVgW70IffJ6mZ1apG0AgzhLjaiyJbOfQXkhZwTw3dS2WRgVBj0XVg/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline
>  <
> https://secure-web.cisco.com/1tdCYoMk-QnkYrIXZwUTa6cX5_Zlv6dSLAPz-CkAlzPgWgEVHgw5n-mGVaMeRyvlfex34sPXmEqrhjF9y1jaC98VEnAD7UckTe_3z_uZo_mqtxQslDeCGNHVpgQEvmCD7rKblpphyjdvFAcazIhAYvp3zhMjlzwgCSj7ayA_NORx0_WzpXys-AbbVPBbpvOIADcFtm-iaRnnxDhkAIpon5jFtC5D_lBCIiHwBv_VIShgC6hfQgtpgKCQXImAC7f96zWy6KungHRpxThKvv7uazIiNNVctNxSzXAVgW70IffJ6mZ1apG0AgzhLjaiyJbOfQXkhZwTw3dS2WRgVBj0XVg/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline>
>  .
> Please note that this e-mail is not secure (encrypted).  If you do not
> wish to continue communication over unencrypted e-mail, please notify the
> sender of this message immediately.  Continuing to send or respond to
> e-mail after receiving this message means you understand and accept this
> risk and wish to continue to communicate over unencrypted e-mail.
>

-- 

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is 
addressed.  If you believe this e-mail was sent to you in error and the e-mail 
contains patient information, please contact the Mass General Brigham 
Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline 
<https://www.massgeneralbrigham.org/complianceline> .
Please note that this e-mail is not secure (encrypted).  If you do not wish to 
continue communication over unencrypted e-mail, please notify the sender of 
this message immediately.  Continuing to send or respond to e-mail after 
receiving this message means you understand and accept this risk and wish to 
continue to communicate over unencrypted e-mail. 

Reply via email to