R: [MINC-users] Windows-UNIX problems with Display

Anna Caroli minc-users@bic.mni.mcgill.ca
Wed May 4 03:25:05 2005


Thanks Bert!
Anna 

> -----Messaggio originale-----
> Da: minc-users-admin@bic.mni.mcgill.ca 
> [mailto:minc-users-admin@bic.mni.mcgill.ca] Per conto di 
> Robert VINCENT
> Inviato: marted́ 3 maggio 2005 17.42
> A: MINC list
> Oggetto: Re: [MINC-users] Windows-UNIX problems with Display
> 
> Hi Anna,
> 
> I'm pretty certain this has to do with the differing newline 
> conventions in text files in Windows and UNIX.  On Windows 
> and MS-DOS, there is typically an extra character placed at 
> the end of each text file line.
> The library is not written to properly discard this extra 
> character when it is encountered in a tag point file.  So 
> neither program is happy with the files produced by the other.
> 
> There are a couple of workarounds for this that I can 
> implement.  It will be relatively easy to fix Register or 
> Display for UNIX variants, but fixing the Windows version may 
> take somewhat longer.
> 
> In the meantime, if I am correct, it should be fairly easy to 
> convert the files you import from Windows to UNIX using the 
> "tr" command:
> 
> tr -d "\r" < file-win.tag > file-unix.tag
> 
> To go the other way, try this:
> 
> perl -ne '$_ =~ s/\n/\r\n/; print $_;' < file-unix.tag > file-win.tag
> 
> I know this isn't ideal but it should work.
> 
> 	-bert
> 
> On Tue, 3 May 2005, Anna Caroli wrote:
> 
> > Hi all,
> > I have labels drawn using Display for Windows, and I need 
> to use them 
> > on a SUN machine, because I need to process them with other 
> MNI tools 
> > (labels are drawn over linearly registered images, and I 
> need to apply 
> > a back transformation to have labels in the native space).
> >
> > The problem is I can't open with SUN and SGI machines 
> labels.tag drawn 
> > using Display for Windows... What I get is the following 
> error message:
> >  input_tag_points(): invalid header in file.
> > (I have the same problem the other way around: when I have a label 
> > drawn over a UNIX machine, saved as filename.tag and I try 
> to open it 
> > over a Windows machine, I can't)
> >
> > Using Display for Windows I also tried to open the label 
> filename.tag 
> > and save it as filename.mnc to export it to the SUN (I don't have 
> > problems in importing/exporting and opening files.mnc): what I get 
> > from the correct file.tag is a file where all the drawn 
> structures are 
> > labelled as "structure 1", irrespectively...
> >
> > Has anybody of you had the same problems? Can you please help me in 
> > overcoming them?
> > Thanks a lot for your help and have a nice day!
> >
> > Anna
> >
> > Laboratory of Epidemiology, Neuroimaging & Telemedicine IRCCS San 
> > Giovanni di Dio FBF The National Center for Research and Care of 
> > Alzheimer's Disease via Pilastroni 4, 25125 - Brescia, Italy
> > Tel: +39 030 3501 361, Fax: +39 02 700 435 727 
> www.centroAlzheimer.it
> >
> > _______________________________________________
> > MINC-users@bic.mni.mcgill.ca
> > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
> >
> 
> 
> 
> _______________________________________________
> MINC-users@bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>