[caret-users] Import Freesurfer flat maps into Caret?

Dickinson, Annelise (NIH/NIMH) [F] dickinsona at mail.nih.gov
Mon Nov 30 15:15:43 CST 2009


Oh wow great, thank you so much! So sorry to keep bugging you, but I hope this exchange might end up eventually helping other users as well!

Best,

Elise


On 11/30/09 3:56 PM, "Donna Dierker" <donna at brainvis.wustl.edu> wrote:

Hi Elise,

John Harwell is out of the office today, but we expect him to be in
tomorrow.  What follows is for his benefit (replicated problem on host
it.wustl.edu):

it.wustl.edu 53% gdb caret5
GNU gdb Red Hat Linux (6.3.0.0-1.153.el4_6.1rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...Using host
libthread_db library "/lib64/tls/libthread_db.so.1".

(gdb) run
Starting program: /backup/caret/bin_linux/caret5
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xffffe000
[Thread debugging using libthread_db enabled]
[New Thread 4151236320 (LWP 31521)]
[New Thread 4130765728 (LWP 31555)]
WARNING: unhandled exception.

Program received signal SIGABRT, Aborted.
[Switching to Thread 4151236320 (LWP 31521)]
0xffffe410 in __kernel_vsyscall ()
(gdb) where
#0  0xffffe410 in __kernel_vsyscall ()
#1  0x00628815 in raise () from /lib/tls/libc.so.6
#2  0x0062a279 in abort () from /lib/tls/libc.so.6
#3  0x084d0ed0 in unexpectedHandler () at
/146Gb/home/john/gcc-install/gcc-4.0.2/lib/gcc/i686-pc-linux-gnu/4.0.2/../../../../include/c++/4.0.2/bits/stl_algobase.h:211
#4  0x098c19c9 in __cxxabiv1::__unexpected ()
#5  0x098c150a in __cxa_call_unexpected ()
#6  0x08b42115 in FreeSurferSurfaceFile::readFileData () at
/usr/local/caret_libraries/source/VTK-5.0.2/Common/vtkGarbageCollector.h:196
#7  0x08a90493 in AbstractFile::readFileContents () at
/usr/local/caret_libraries/source/VTK-5.0.2/Common/vtkGarbageCollector.h:196
#8  0x08a9270f in AbstractFile::readFile () at
/usr/local/caret_libraries/source/VTK-5.0.2/Common/vtkGarbageCollector.h:196
#9  0x089f6ffb in BrainSet::importFreeSurferSurfaceFile () at
/146Gb/home/john/gcc-install/gcc-4.0.2/lib/gcc/i686-pc-linux-gnu/4.0.2/../../../../include/c++/4.0.2/bits/stl_algobase.h:211
#10 0x081771d1 in GuiDataFileOpenDialog::importFile () at
/146Gb/home/john/gcc-install/gcc-4.0.2/lib/gcc/i686-pc-linux-gnu/4.0.2/../../../../include/c++/4.0.2/bits/stl_algobase.h:300
#11 0x0818c37e in GuiDataFileOpenDialog::readFile () at
/146Gb/home/john/gcc-install/gcc-4.0.2/lib/gcc/i686-pc-linux-gnu/4.0.2/../../../../include/c++/4.0.2/bits/stl_algobase.h:300
#12 0x0818fb81 in GuiDataFileOpenDialog::done () at
/146Gb/home/john/gcc-install/gcc-4.0.2/lib/gcc/i686-pc-linux-gnu/4.0.2/../../../../include/c++/4.0.2/bits/stl_algobase.h:300
#13 0x09563940 in QDialog::accept ()
#14 0x08d4a86e in WuQFileDialog::slotAcceptPushButton () at
/usr/local/caret_libraries/source/VTK-5.0.2/Common/vtkGarbageCollector.h:196
#15 0x08d5be9f in WuQFileDialog::qt_metacall () at
/usr/local/caret_libraries/source/VTK-5.0.2/Common/vtkGarbageCollector.h:196
#16 0x084dde7f in GuiDataFileOpenDialog::qt_metacall () at
/146Gb/home/john/gcc-install/gcc-4.0.2/lib/gcc/i686-pc-linux-gnu/4.0.2/../../../../include/c++/4.0.2/bits/stl_algobase.h:211
#17 0x0981ab3f in QMetaObject::activate ()
#18 0x0981ae2f in QMetaObject::activate ()
#19 0x096878d0 in QAbstractButton::clicked ()
#20 0x094b086e in QAbstractButtonPrivate::emitClicked ()
#21 0x094b07bb in QAbstractButtonPrivate::click ()
#22 0x094b185a in QAbstractButton::mouseReleaseEvent ()
#23 0x09247e7a in QWidget::event ()
#24 0x094b16c8 in QAbstractButton::event ()
#25 0x0951354c in QPushButton::event ()
#26 0x09211b56 in QApplicationPrivate::notify_helper ()
#27 0x092109ec in QApplication::notify ()
#28 0x09807ea0 in QCoreApplication::notifyInternal ()
#29 0x0920fedc in QApplicationPrivate::sendMouseEvent ()
#30 0x0925bdb8 in QETWidget::translateMouseEvent ()
#31 0x092596d8 in QApplication::x11ProcessEvent ()
#32 0x0927db78 in QEventDispatcherX11::processEvents ()
#33 0x09806306 in QEventLoop::processEvents ()
#34 0x098063d0 in QEventLoop::exec ()
#35 0x09808358 in QCoreApplication::exec ()
#36 0x09210635 in QApplication::exec ()
#37 0x084d67fb in main () at
/146Gb/home/john/gcc-install/gcc-4.0.2/lib/gcc/i686-pc-linux-gnu/4.0.2/../../../../include/c++/4.0.2/bits/stl_algobase.h:211
(gdb) quit
The program is running.  Exit anyway? (y or n) y

Donna

On 11/30/2009 01:52 PM, Dickinson, Annelise (NIH/NIMH) [F] wrote:
> Hi Dr. Harwell,
>
> I just got back in the office and attempted to open the flat patch files using the GUI instructions:
>
>
>  1.  I opened a caret5 window, went to File-->Open Data File, selected lh.orig from my subject's surface folder, and pressed Open.
>  2.  When asked to create a Spec File, I clicked Yes and filled out the fields as can be seen in Picture 1 attached.   The Spec file was named Human.A06.L.spec.
>  3.  Then a dialogue box popped up, asking me to choose a file type (Picture 2), I selected Free Surfer Binary Surface File and clicked OK.
>  4.  Another dialogue box came up, which I completed as seen in Picture 3, structure: left, Import Topology: CLOSED, and Import Coordinates: FIDUCIAL. Clicked OK.
>  5.  The fiducial surface was shown in the Caret viewer
>  6.  Then, I went up to File-->Open Data File again, and selected my freesurfer-made patch file: lh.cort.patch.try1, and clicked Open
>  7.  A dialogue box came up (same as step 3) asking me to choose a file type for lh.cort.patch.flat.try1, I again selected FreeSurfer Binary Surface File and clicked OK
>  8.  The next dialogue box asking for structure, topology, and coordinate information which I completed and can be seen in Picture 4. Structure: left, Import Topology: CUT, Import Coordinates: FLAT.
>  9.  When I clicked OK, a window popped up with the following error message (seen in Picture 5): "Caret will be terminating due to an unexpected exception. Abort() will be called and a core file may be created. "
>  10. I clicked OK in that window, and caret5 quit itself.
>
>
>
> So then instead I tried using the command line (starting from my subject's surface directory) by typing:
>
>
>> caret_command -file-convert -sc -is FSS lh.orig -os CARET fiducial.coord closed.topo FIDUCIAL CLOSED -spec file.spec -struct LEFT
>>
>
> This seemed to run OK. Then I typed:
>
>
>> caret_command -file-convert -sc -is FSP lh.cort.patch.flat.try1 lh.orig -os CARET flat.coord cut.topo FLAT CUT -spec file.spec -struct LEFT -outtext
>>
>
> And I got:
>
> WARNING: caret_command will be terminating due to an unexpected exception.
> abort() will be called and a core file may be created.
> Abort
>
>
> Aargh. What am I doing wrong? I attach the screenshots of the GUI windows and the FreeSurfer lh.orig and lh.cort.patch.flat.try1 files that I am trying to open.
>
> Please let me know if you might be able to help, and thank you so so much!
>
> Best,
>
> Elise
>
>
> On 11/25/09 12:50 PM, "John Harwell" <john at brainvis.wustl.edu> wrote:
>
> Hi Elsie,
>
> Yes Caret5 can read FreeSurfer files.  You will need to know if the
> file is ASCII (usually ends with "asc") or binary.  You will also need
> to know if the file is a "patch" file which usually has "patch" in its
> name.  If the file is a patch file, you must open it AFTER opening a
> non-patch file such as an "orig" file.
>
> In Caret5:
> * Select File Menu->Open Data File.
> * Set the File Type to "Free Surfer Ascii Surface File" or "Free
> Surfer Binary Surface File".  Select your file and press the Open
> Button.
>
> On the command line, using caret_command (run caret_command -file-
> convert for help information):
>
>              Convert the free surfer surface into closed topology and
> fiducial
>              coordinate files.  Create a spec file for a left cortex.
>                  -file-convert -sc -is FSS lh.orig.asc -os CARET
> fiducial.coord \
>                       closed.topo FIDUCIAL CLOSED -spec file.spec -
> struct LEFT
>
>              Convert the free surfer patch into cut topology and flat
>              coordinate files.  Create or add to the spec file as left
> cortex.
>              Write the coord and topo files in text format.
>                  -file-convert -sc -is FSP lh.oc.flat.asc lh.orig.asc \
>                       -os CARET flat.coord cut.topo FLAT CUT -spec
> file.spec \
>                       -struct LEFT -outtext
>
>
>
>
> By the way, there is a committee (GIFTI, www.nitrc.org/projects/gifti)
> that has developed a common surface file format for neuroimaging file
> formats.  Both Caret and FreeSurfer are part of this committee.  In
> the not too distant future you, and others, should be able to use the
> GIFTI format for your data and move between different neuroimaging
> software applications without having to do any file format conversion.
>
> -----------------------------------
> John Harwell
> john at brainvis.wustl.edu
>
> Department of Anatomy and Neurobiology
> Washington University School of Medicine
> 660 S. Euclid Ave   Box 8108
> Saint Louis, MO 63110
>
>
>
>
> On Nov 25, 2009, at 10:34 AM, Dickinson, Annelise (NIH/NIMH) [F] wrote:
>
>
>> Hello,
>>
>> Sorry in advance if the answer to this question is already up
>> somewhere!
>>
>> I was just wondering if there is any way to import flat maps made in
>> Freesurfer into Caret for viewing and editing? If so, how would this
>> process be carried out?
>>
>> Please let me know, thanks so much and happy Thanksgiving!
>>
>> Best,
>>
>> Elsie
>>
>> *****************************************************
>> Annelise Dickinson
>> Post-Bac IRTA
>> Laboratory of Brain and Cognition, NIMH/NIH/DHHS
>> Building 10, Room 4C212
>> 10 CENTER DR MSC 1366
>> BETHESDA  MD  20892-1366
>> *****************************************************
>> Phone: (301) 435-4941
>> FAX:   (301) 402-0921
>> E-Mail : dickinsona at mail.nih.gov
>>
>> _______________________________________________
>> caret-users mailing list
>> caret-users at brainvis.wustl.edu
>> http://brainvis.wustl.edu/mailman/listinfo/caret-users
>>
>>
>
> _______________________________________________
> caret-users mailing list
> caret-users at brainvis.wustl.edu
> http://brainvis.wustl.edu/mailman/listinfo/caret-users
>
>
> *****************************************************
> Annelise Dickinson
> Post-Bac IRTA
> Laboratory of Brain and Cognition, NIMH/NIH/DHHS
> Building 10, Room 4C212
> 10 CENTER DR MSC 1366
> BETHESDA  MD  20892-1366
> *****************************************************
> Phone: (301) 435-4941
> FAX:   (301) 402-0921
> E-Mail : dickinsona at mail.nih.gov
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> caret-users mailing list
> caret-users at brainvis.wustl.edu
> http://brainvis.wustl.edu/mailman/listinfo/caret-users
>

_______________________________________________
caret-users mailing list
caret-users at brainvis.wustl.edu
http://brainvis.wustl.edu/mailman/listinfo/caret-users


*****************************************************
Annelise Dickinson
Post-Bac IRTA
Laboratory of Brain and Cognition, NIMH/NIH/DHHS
Building 10, Room 4C212
10 CENTER DR MSC 1366
BETHESDA  MD  20892-1366
*****************************************************
Phone: (301) 435-4941
FAX:   (301) 402-0921
E-Mail : dickinsona at mail.nih.gov




More information about the caret-users mailing list