[MINC-users] (no subject)

Jason Lerch minc-users@bic.mni.mcgill.ca
Wed, 21 Jan 2004 09:37:26 -0500


--Apple-Mail-1--248117349
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=ISO-8859-1;
	delsp=yes;
	format=flowed

Greetings,

I think that your problem relates to the headers in your MINC files. N3 =20=

is unfortunately a bit brain-dead at the moment about how it handles =20
those headers, and if they are too large, it will crash. This has =20
become a problem only recently since newer scanners have started adding =20=

a lot of DICOM information to their headers.

To see if this is your problem, try editing out the DICOM stuff from =20
your minc-headers. Create a script that looks something like this =20
(modified where necessary):

=3D=3D=3D begin script =3D=3D=3D

#!/usr/local/bin/perl5 -w

open IN, "$ARGV[0]";
open OUT, ">/tmp/mincedittmp_$$.txt";

while (<IN>) {
     if ($_ =3D~ /dicom_0x.+/) {
         # do nothing
     }
     else {
         print OUT $_;
     }
}

close IN;
close OUT;

system("mv /tmp/mincedittmp_$$.txt $ARGV[0]");

=3D=3D=3D end script =3D=3D=3D=3D

And use that script like so:

mincedit file.mnc script.pl

That should leave you with the same minc file you had before with the =20=

DICOM headers removed. Afterwards run N3 as you would have before and =20=

see if it works.

Then again, this might not be your problem after all ...

Jason


On Jan 20, 2004, at 2:26 PM, Nugent, Allison C. (NIH/NIMH) wrote:

> Hello,
>
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 I'm having a frustrating problem =
with the N3 package, =20
> running on solaris.=A0 Version 1.0 had previously worked fine on my =20=

> machine, then one day, it stopped.=A0 It would crash at nu_evaluate, =20=

> leaving .imp files, but not creating my n3 corrected .mnc files.=A0 It =
=20
> would give errors saying things like the temporary files had different =
=20
> image dimensions than my input file.=A0 So, instead of fixing it, I =20=

> decided it was time for an upgrade.=A0 I bogged down somewhere in =20
> getting the fortran gcc libraries, and turned things over to my system =
=20
> administrator.=A0 He's still working on the upgraded version of N3, =
but =20
> just recompiled N3 1.0.=A0 Here's the message I get when it quits:
>
> =A0
>
> [nu_evaluate] =20
> [allison@kismet:/mnt/v1280/raid1/mood/users/allison/struct_workspace/=20=

> allison_nugent] [2004-01-2014:20:29] /usr/local/bin/evaluate_field =20
> -clobber -verbose -like /tmp//template.mnc test.imp =20
> /tmp//field_volume.mnc
>
> Error: MINC file has only 0 dims, volume requires 3.
>
> Failed to read volume: /tmp//template.mnc.
>
> nu_evaluate: crashed while running evaluate_field (termination =20
> status=3D256)
>
> nu_correct: crashed while running nu_evaluate (termination status=3D256)=

>
> =A0
>
> mincinfo on the temporary file template.mnc crashes
>
> mincheader complains, but writes the header.=A0 The values for xspace, =
=20
> yspace, and zspace are given, but the full definition of the =20
> structures is missing.
>
> =A0
>
> It seems that the problem is in the writing of these temporary =20
> images.=A0 I've tried specifying a different tmp directory, but that =20=

> didn't' help.=A0
>
> =A0
>
> Can anyone please help? I'm at my wit's end with this!!
>
> =A0
>
> Allison C. Nugent, PhD
>
> MRI Physicist
>
> Mood and Anxiety Disorders Program
>
> (301)451-8863
>
> =A0

--Apple-Mail-1--248117349
Content-Transfer-Encoding: quoted-printable
Content-Type: text/enriched;
	charset=ISO-8859-1

Greetings,


I think that your problem relates to the headers in your MINC files.
N3 is unfortunately a bit brain-dead at the moment about how it
handles those headers, and if they are too large, it will crash. This
has become a problem only recently since newer scanners have started
adding a lot of DICOM information to their headers.=20


To see if this is your problem, try editing out the DICOM stuff from
your minc-headers. Create a script that looks something like this
(modified where necessary):


=3D=3D=3D begin script =3D=3D=3D


#!/usr/local/bin/perl5 -w


open IN, "$ARGV[0]";

open OUT, ">/tmp/mincedittmp_$$.txt";


while (<<IN>) {

    if ($_ =3D~ /dicom_0x.+/) {

        # do nothing

    }

    else {

        print OUT $_;

    }

}


close IN;

close OUT;


system("mv /tmp/mincedittmp_$$.txt $ARGV[0]");


=3D=3D=3D end script =3D=3D=3D=3D


And use that script like so:


mincedit file.mnc script.pl


That should leave you with the same minc file you had before with the
DICOM headers removed. Afterwards run N3 as you would have before and
see if it works.


Then again, this might not be your problem after all ...


Jason



On Jan 20, 2004, at 2:26 PM, Nugent, Allison C. (NIH/NIMH) wrote:


=
<excerpt><fontfamily><param>Arial</param><x-tad-bigger>Hello,</x-tad-bigge=
r></fontfamily>


<fontfamily><param>Arial</param><x-tad-bigger>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0 I'm having a
frustrating problem with the N3 package, running on solaris.=A0 Version
1.0 had previously worked fine on my machine, then one day, it
stopped.=A0 It would crash at nu_evaluate, leaving .imp files, but not
creating my n3 corrected .mnc files.=A0 It would give errors saying
things like the temporary files had different image dimensions than my
input file.=A0 So, instead of fixing it, I decided it was time for an
upgrade.=A0 I bogged down somewhere in getting the fortran gcc
libraries, and turned things over to my system administrator.=A0 He's
still working on the upgraded version of N3, but just recompiled N3
1.0.=A0 Here's the message I get when it =
quits:</x-tad-bigger></fontfamily>


=
<fontfamily><param>Arial</param><x-tad-bigger>=A0</x-tad-bigger></fontfami=
ly>


<fontfamily><param>Arial</param><x-tad-bigger>[nu_evaluate]
=
[allison@kismet:/mnt/v1280/raid1/mood/users/allison/struct_workspace/allis=
on_nugent]
[2004-01-2014:20:29] /usr/local/bin/evaluate_field -clobber -verbose
-like /tmp//template.mnc test.imp =
/tmp//field_volume.mnc</x-tad-bigger></fontfamily>


<fontfamily><param>Arial</param><x-tad-bigger>Error: MINC file has
only 0 dims, volume requires 3.</x-tad-bigger></fontfamily>


<fontfamily><param>Arial</param><x-tad-bigger>Failed to read volume:
/tmp//template.mnc.</x-tad-bigger></fontfamily>


<fontfamily><param>Arial</param><x-tad-bigger>nu_evaluate: crashed
while running evaluate_field (termination =
status=3D256)</x-tad-bigger></fontfamily>


<fontfamily><param>Arial</param><x-tad-bigger>nu_correct: crashed
while running nu_evaluate (termination =
status=3D256)</x-tad-bigger></fontfamily>


=
<fontfamily><param>Arial</param><x-tad-bigger>=A0</x-tad-bigger></fontfami=
ly>


<fontfamily><param>Arial</param><x-tad-bigger>mincinfo on the
temporary file template.mnc crashes</x-tad-bigger></fontfamily>


<fontfamily><param>Arial</param><x-tad-bigger>mincheader complains,
but writes the header.=A0 The values for xspace, yspace, and zspace are
given, but the full definition of the structures is =
missing.</x-tad-bigger></fontfamily>


=
<fontfamily><param>Arial</param><x-tad-bigger>=A0</x-tad-bigger></fontfami=
ly>


<fontfamily><param>Arial</param><x-tad-bigger>It seems that the
problem is in the writing of these temporary images.=A0 I've tried
specifying a different tmp directory, but that didn't' =
help.=A0</x-tad-bigger></fontfamily>


=
<fontfamily><param>Arial</param><x-tad-bigger>=A0</x-tad-bigger></fontfami=
ly>


<fontfamily><param>Arial</param><x-tad-bigger>Can anyone please help?
I'm at my wit's end with this!!</x-tad-bigger></fontfamily>


=
<fontfamily><param>Arial</param><x-tad-bigger>=A0</x-tad-bigger></fontfami=
ly>


<fontfamily><param>Arial</param><bigger><bigger>Allison C. Nugent, =
PhD</bigger></bigger></fontfamily>


<fontfamily><param>Arial</param><bigger><bigger>MRI =
Physicist</bigger></bigger></fontfamily>


<fontfamily><param>Arial</param><bigger><bigger>Mood and Anxiety
Disorders Program</bigger></bigger></fontfamily>


=
<fontfamily><param>Arial</param><bigger><bigger>(301)451-8863</bigger></bi=
gger></fontfamily>


<fontfamily><param>Times New =
Roman</param><bigger><bigger>=A0</bigger></bigger></fontfamily>

</excerpt>=

--Apple-Mail-1--248117349--