Hi all,
I want to save the tiffs of different views automatically. I am trying to use tcl script to do it. My problem is that I need to pass the file's name that is being displayed in the tksurfer window to the tiff file that I want to save to.
For example,
I am running
tksurfer -f $surface_file -tcl my_script.tcl
In my_script.tcl, I have the following command:
save_tiff ${file_name}-lateral.tiff
How can I pass the $surface_file in my command to ${file_name} in my_scripts.tcl?
Thanks.
Yang
Hi Yang, there is not a way to pass it from the tksurfer command line. What I've done in the past is to write another script to which I pass these types of arguments. This scripts constructs the tcl script then runs tksurfer with the appropriate arguments.
doug
On 4/26/11 4:58 PM, Yang Liu wrote:
Hi all,
I want to save the tiffs of different views automatically. I am trying to use tcl script to do it. My problem is that I need to pass the file's name that is being displayed in the tksurfer window to the tiff file that I want to save to.
For example,
I am running tksurfer -f $surface_file -tcl my_script.tcl
In my_script.tcl, I have the following command:
save_tiff ${file_name}-lateral.tiff
How can I pass the $surface_file in my command to ${file_name} in my_scripts.tcl?
Thanks.
Yang
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
the easiest way is probably to use an environment variable, which you can access in tcl with $env(VAR_NAME) I think
cheers Bruce
On Tue, 26 Apr 2011, Yang Liu wrote:
Hi all,
I want to save the tiffs of different views automatically. I am trying to use tcl script to do it. My problem is that I need to pass the file's name that is being displayed in the tksurfer window to the tiff file that I want to save to.
For example,
I am running
tksurfer -f $surface_file -tcl my_script.tcl
In my_script.tcl, I have the following command:
save_tiff ${file_name}-lateral.tiff
How can I pass the $surface_file in my command to ${file_name} in my_scripts.tcl?
Thanks.
Yang
Hi Bruce,
Thanks for your suggestion. I actually solved the problem by creating a new tcl script for each look.
Yang
On Tue, Apr 26, 2011 at 8:16 PM, Bruce Fischl fischl@nmr.mgh.harvard.eduwrote:
the easiest way is probably to use an environment variable, which you can access in tcl with $env(VAR_NAME) I think
cheers Bruce
On Tue, 26 Apr 2011, Yang Liu wrote:
Hi all,
I want to save the tiffs of different views automatically. I am trying to use tcl script to do it. My problem is that I need to pass the file's name that is being displayed in the tksurfer window to the tiff file that I want to save to.
For example,
I am running
tksurfer -f $surface_file -tcl my_script.tcl
In my_script.tcl, I have the following command:
save_tiff ${file_name}-lateral.tiff
How can I pass the $surface_file in my command to ${file_name} in my_scripts.tcl?
Thanks.
Yang
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 Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
freesurfer@nmr.mgh.harvard.edu