[MINC-users] Error when calling the function "bestlinreg_s"

Qingyang Li congel at gmail.com
Mon Jul 29 14:05:45 EDT 2013


Dear Andrew and Simon

Thank you very much for your help!!

Yang

------
Qingyang Li

Balance and focus.


On Sat, Jul 27, 2013 at 12:00 PM, <minc-users-request at bic.mni.mcgill.ca>wrote:

> Send MINC-users mailing list submissions to
>         minc-users at bic.mni.mcgill.ca
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
> or, via email, send a message with subject or body 'help' to
>         minc-users-request at bic.mni.mcgill.ca
>
> You can reach the person managing the list at
>         minc-users-owner at bic.mni.mcgill.ca
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of MINC-users digest..."
>
>
> Today's Topics:
>
>    1. Error when calling the function "bestlinreg_s" (Qingyang Li)
>    2. minclookup unexpected behaviour (Paul GRAVEL)
>    3. Re: minclookup unexpected behaviour (Andrew Janke)
>    4. Re: Error when calling the function "bestlinreg_s" (Andrew Janke)
>    5. Re: Error when calling the function "bestlinreg_s"
>       (Simon Eskildsen)
>    6. Re: Error when calling the function "bestlinreg_s" (Andrew Janke)
>    7. Re: Error when calling the function "bestlinreg_s"
>       (Simon Eskildsen)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 26 Jul 2013 16:05:37 -0400
> From: Qingyang Li <congel at gmail.com>
> To: minc-users at bic.mni.mcgill.ca
> Subject: [MINC-users] Error when calling the function "bestlinreg_s"
> Message-ID:
>         <CA+RFavVn3+6QX7Sv94yWU4DfkjaNiPKMk9=
> fq-mex48AOjMPSQ at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi all,
>
> I am new to MINC tool kit so please bear with my with my naive question.
>
> I was recommended to using  BEaST for brain extraction, and BEaST calls
> some functions from MINC tool kit for some normalization steps required
> before the extraction steps. But I encounter an error which I don't know
> how to get around.
>
> The command I ran was
> beast_normalize anatomical_head.mnc anatomical_head_mni.nmc
> mnc_anat_to_mni.xfm -modeldir
> /home2/data/PublicProgram/Atlas/mni_icbm152_t1_tal_nlin_sym_09c/
>
> The error message I got was :
>
> Can't use string ("-est_translations") as an ARRAY ref while "strict refs"
> in use at /opt/minc/bin/bestlinreg_s line 299.
>
> I took a look at the program "bestlinreg_s" and it's a perl code. I don't
> know perl at all so I have no idea how to trouble-shoot and solve this
> problem. Could you please help?
>
> I am using Ubuntu-10.04 and Perl v5.10.1 (*) built for
> x86_64-linux-gnu-thread-multi.
>
> Thanks,
>
> Yang
>
> ------
> Qingyang Li
>
> Balance and focus.
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 26 Jul 2013 17:22:45 -0400 (EDT)
> From: Paul GRAVEL <pgravel at bic.mni.mcgill.ca>
> To: MINC users mailing list <minc-users at bic.mni.mcgill.ca>
> Cc: Paul Gravel - McGill Account <paul.gravel2 at mail.mcgill.ca>
> Subject: [MINC-users] minclookup unexpected behaviour
> Message-ID:
>         <Pine.LNX.4.64.1307261715440.14701 at agrippa.bic.mni.mcgill.ca>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
>
> Dear All,
>
> I have this odd behaviour when I run minclookup to extract labels passed
> as a for loop variable (actually the variable is label_no). Basically, I
> did echo my command line with the linux variables inserted to ensure the
> single quotes were properly placed, i.e.:
>
> echo-ing command (were label_no is set to 85):
> echo minclookup -discrete -lut_string "'$label_no $label_no'"
> $source_dir/$subject/'qfal_'$subject'_OFC_and_PFC_ROIs_dynPET1_space.mnc'
>
> $source_dir/$subject/'qfal_'$subject'_OFC_and_PFC_ROIs_dynPET1_space_label_no'$label_no'_tmp.mnc'
>
> Output:
> minclookup -discrete -lut_string '85 85'
>
> /hrrt/hrrt5/pgravel/Studies/Qfal/017/qfal_017_OFC_and_PFC_ROIs_dynPET1_space.mnc
>
> /hrrt/hrrt5/pgravel/Studies/Qfal/017/qfal_017_OFC_and_PFC_ROIs_dynPET1_space_label_no85_tmp.mnc
>
>
> So, if I copy/paste this output directly in linux, it does work fine.
> However, when I call the command directly without echo-ing, which is the
> whole purpose of this exercise ;-), i.e.:
>
> minclookup -discrete -lut_string "'$label_no $label_no'"
> $source_dir/$subject/'qfal_'$subject'_OFC_and_PFC_ROIs_dynPET1_space.mnc'
>
> $source_dir/$subject/'qfal_'$subject'_OFC_and_PFC_ROIs_dynPET1_space_label_no'$label_no'_tmp.mnc'
>
> I get the following error:
> First line has fewer than 2 values.
>
> which I can't figure out... am I missing something?
>
> As always, any help will be greatly appreciated!
>
> Best Regards,
>
> Paul
>
>
> ------------------------------
>
> Message: 3
> Date: Sat, 27 Jul 2013 18:40:27 +1000
> From: Andrew Janke <a.janke at gmail.com>
> To: MINC users mailing list <minc-users at bic.mni.mcgill.ca>
> Cc: Paul Gravel - McGill Account <paul.gravel2 at mail.mcgill.ca>
> Subject: Re: [MINC-users] minclookup unexpected behaviour
> Message-ID:
>         <CAG0CB21YXArdY_J+vVyq+Tqs8en2DRpidkOWVqoO=
> L-9K6Xv7w at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi Paul,
>
> > I have this odd behaviour when I run minclookup to extract labels passed
> as
> > a for loop variable (actually the variable is label_no).
> >
> > echo minclookup -discrete -lut_string "'$label_no $label_no'"
>
> Without testing, I think you just want this:
>
>    minclookup -discrete -lut_string "$label_no $label_no" ...
>
> in your shell script.
>
>
> a
>
>
> ------------------------------
>
> Message: 4
> Date: Sat, 27 Jul 2013 18:42:08 +1000
> From: Andrew Janke <a.janke at gmail.com>
> To: MINC users mailing list <minc-users at bic.mni.mcgill.ca>
> Subject: Re: [MINC-users] Error when calling the function
>         "bestlinreg_s"
> Message-ID:
>         <
> CAG0CB20WCJX9U49aHX3OH_Y+vmQqTBLctbUfVv31ocCkDBkRgA at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi Yang
>
> On 27 July 2013 06:05, Qingyang Li <congel at gmail.com> wrote:
> > The command I ran was
> > beast_normalize anatomical_head.mnc anatomical_head_mni.nmc
> > mnc_anat_to_mni.xfm -modeldir
> > /home2/data/PublicProgram/Atlas/mni_icbm152_t1_tal_nlin_sym_09c/
> >
> > The error message I got was :
> >
> > Can't use string ("-est_translations") as an ARRAY ref while "strict
> refs"
> > in use at /opt/minc/bin/bestlinreg_s line 299.
>
> I'm not entirely familiar with BEAST but it appears to have a bug, if
> you look at the start of the perl script and remove the line
>
>    use strict;
>
> does it run?
>
> Thanks
>
>
> a
>
>
> ------------------------------
>
> Message: 5
> Date: Sat, 27 Jul 2013 10:50:25 +0200
> From: Simon Eskildsen <eskild at gmail.com>
> To: MINC users mailing list <minc-users at bic.mni.mcgill.ca>
> Subject: Re: [MINC-users] Error when calling the function
>         "bestlinreg_s"
> Message-ID:
>         <
> CAD3v437+xmW5-a2TZzDUa2Gtt47J_0TQUqpUmbCgeVa1SF9L3Q at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi Yang,
>
> This is actually something I stumbled upon earlier.
>
> Try Andrew's suggestion or fix the problem by changing line 30 of the
> bestlinreg_s script:
>
>     trans       => qw/-est_translations/,
>
> becomes:
>
>     trans       => [qw/-est_translations/],
>
>
> I would be happy if someone could make the change in the repository.
>
> Simon
>
>
> On Fri, Jul 26, 2013 at 10:05 PM, Qingyang Li <congel at gmail.com> wrote:
>
> > Hi all,
> >
> > I am new to MINC tool kit so please bear with my with my naive question.
> >
> > I was recommended to using  BEaST for brain extraction, and BEaST calls
> > some functions from MINC tool kit for some normalization steps required
> > before the extraction steps. But I encounter an error which I don't know
> > how to get around.
> >
> > The command I ran was
> > beast_normalize anatomical_head.mnc anatomical_head_mni.nmc
> > mnc_anat_to_mni.xfm -modeldir
> > /home2/data/PublicProgram/Atlas/mni_icbm152_t1_tal_nlin_sym_09c/
> >
> > The error message I got was :
> >
> > Can't use string ("-est_translations") as an ARRAY ref while "strict
> refs"
> > in use at /opt/minc/bin/bestlinreg_s line 299.
> >
> > I took a look at the program "bestlinreg_s" and it's a perl code. I don't
> > know perl at all so I have no idea how to trouble-shoot and solve this
> > problem. Could you please help?
> >
> > I am using Ubuntu-10.04 and Perl v5.10.1 (*) built for
> > x86_64-linux-gnu-thread-multi.
> >
> > Thanks,
> >
> > Yang
> >
> > ------
> > Qingyang Li
> >
> > Balance and focus.
> > _______________________________________________
> > MINC-users at bic.mni.mcgill.ca
> > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
> >
>
>
> ------------------------------
>
> Message: 6
> Date: Sat, 27 Jul 2013 20:55:34 +1000
> From: Andrew Janke <a.janke at gmail.com>
> To: MINC users mailing list <minc-users at bic.mni.mcgill.ca>
> Subject: Re: [MINC-users] Error when calling the function
>         "bestlinreg_s"
> Message-ID:
>         <CAG0CB22cSCy=xn4A-V-=hA5yy-arqf7ML=
> SbRk5uarCqKGxMJQ at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi Simon,
>
> On 27 July 2013 18:50, Simon Eskildsen <eskild at gmail.com> wrote:
> >     trans       => [qw/-est_translations/],
> >
> >
> > I would be happy if someone could make the change in the repository.
>
> Seems that this is already done in Vlad's develop branch.
>
>    https://github.com/BIC-MNI/EZminc/blob/develop/scripts/bestlinreg_s#L30
>
>
> a
>
>
> ------------------------------
>
> Message: 7
> Date: Sat, 27 Jul 2013 13:32:11 +0200
> From: Simon Eskildsen <eskild at gmail.com>
> To: MINC users mailing list <minc-users at bic.mni.mcgill.ca>
> Subject: Re: [MINC-users] Error when calling the function
>         "bestlinreg_s"
> Message-ID:
>         <CAD3v434jtMC_5NjRPufU=
> 4Cra0+a7OhKjGfQpxefXfT01ogK2g at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi Andrew,
>
> You're right. Eventually this will find its way to a release. Until then,
> Yang, you can either correct your own copy or switch to the github code
> development branch.
>
> Simon
>
>
> On Sat, Jul 27, 2013 at 12:55 PM, Andrew Janke <a.janke at gmail.com> wrote:
>
> > Hi Simon,
> >
> > On 27 July 2013 18:50, Simon Eskildsen <eskild at gmail.com> wrote:
> > >     trans       => [qw/-est_translations/],
> > >
> > >
> > > I would be happy if someone could make the change in the repository.
> >
> > Seems that this is already done in Vlad's develop branch.
> >
> >
> https://github.com/BIC-MNI/EZminc/blob/develop/scripts/bestlinreg_s#L30
> >
> >
> > a
> > _______________________________________________
> > MINC-users at bic.mni.mcgill.ca
> > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
> >
>
>
> ------------------------------
>
> _______________________________________________
> MINC-users mailing list
> MINC-users at bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>
>
> End of MINC-users Digest, Vol 96, Issue 8
> *****************************************
>


More information about the MINC-users mailing list