From mishkind at gmail.com Thu Feb 5 17:32:16 2009 From: mishkind at gmail.com (Mishkin Derakhshan) Date: Thu, 5 Feb 2009 17:32:16 -0500 Subject: [MINC-users] label from 2 objects Message-ID: <9c5abb60902051432s1f23db4emb8f44f62073be59b@mail.gmail.com> Hi, I have two .obj files, and I'm assuming one is completely contained within the other. For example, a white matter surface and a grey matter surface for a single hemisphere. I'm interested in obtaining a mnc file that is a binary label that contains all the voxels between the two surfaces. My first attempt was to load things up in Display, scan the objects to volume and then use 3D Fill to get all the voxels in between, however, because the scanned objects sometimes touch on the volume, the 3D fill area, is not contiguous ie. i have lots of holes that i would need to fill manually. My next idea is to resample my volume to a 0.1 mm^3 grid and then try again, but I'm wondering if anyone has done something like this before and has a better solution. thanks, mishkin From mishkind at gmail.com Thu Feb 5 17:57:09 2009 From: mishkind at gmail.com (Mishkin Derakhshan) Date: Thu, 5 Feb 2009 17:57:09 -0500 Subject: [MINC-users] label from 2 objects In-Reply-To: <200902052247.n15MlFqa023426@grumio.bic.mni.mcgill.ca> References: <9c5abb60902051432s1f23db4emb8f44f62073be59b@mail.gmail.com> <200902052247.n15MlFqa023426@grumio.bic.mni.mcgill.ca> Message-ID: <9c5abb60902051457h586cd546n991dcc0289ebace7@mail.gmail.com> Thanks Claude, Right after I sent the email I figured out in Display that I should 3D Fill each surface separately and then do some mincmath magic, but now I can automate the whole thing. thanks, mishkin On Thu, Feb 5, 2009 at 5:47 PM, Claude LEPAGE wrote: > Hi Mishkin, > > Try this: > > scarus /home/claude > surface_mask2 -help > Command-specific options: > > Output options: > -binary_mask: Create a binary output. > Generic options for all commands: > -help: Print summary of command-line options and abort > -version: Print version number of program and exit > > Usage: surface_mask2 in_volume.mnc surface.obj output.mnc > > Use the -binary_mask switch; repeat for the two surfaces. The > in_volume.mnc is your volume template for which you'd like the > voxelized surface to look like (use t1 image, for example). > Then use a little minccalc -expression ... to identify the region > in between. Of course, there are interpolation errors, but this > is as good as you can get. Beware that surfaces may intersect > or be very close to one another, possibly giving some holes in > the cortex sheet. > > Claude > >> >> Hi, >> I have two .obj files, and I'm assuming one is completely contained >> within the other. For example, a white matter surface and a grey >> matter surface for a single hemisphere. >> I'm interested in obtaining a mnc file that is a binary label that >> contains all the voxels between the two surfaces. >> My first attempt was to load things up in Display, scan the objects to >> volume and then use 3D Fill to get all the voxels in between, however, >> because the scanned objects sometimes touch on the volume, the 3D fill >> area, is not contiguous ie. i have lots of holes that i would need to >> fill manually. >> My next idea is to resample my volume to a 0.1 mm^3 grid and then try >> again, but I'm wondering if anyone has done something like this before >> and has a better solution. >> >> thanks, >> mishkin >> _______________________________________________ >> MINC-users at bic.mni.mcgill.ca >> http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users >> > From se at hst.aau.dk Fri Feb 6 03:34:54 2009 From: se at hst.aau.dk (Simon Fristed Eskildsen) Date: Fri, 6 Feb 2009 09:34:54 +0100 (CET) Subject: [MINC-users] label from 2 objects In-Reply-To: <9c5abb60902051457h586cd546n991dcc0289ebace7@mail.gmail.com> Message-ID: <947230635.296781233909294584.JavaMail.root@zimbra-store01.hst.aau.dk> Hi Mishkin, If interested, I have some code that calculates the inside fraction of every voxel w.r.t. some closed object. I.e. the output is fuzzy (or you may say PVE-like) hopefully solving the problems where the two surfaces are very close. The code is very beta, so no guarantees on the stability. Simon ----- "Mishkin Derakhshan" wrote: > Thanks Claude, > Right after I sent the email I figured out in Display that I should > 3D > Fill each surface separately and then do some mincmath magic, but now > I can automate the whole thing. > thanks, > mishkin > > > On Thu, Feb 5, 2009 at 5:47 PM, Claude LEPAGE > wrote: > > Hi Mishkin, > > > > Try this: > > > > scarus /home/claude > surface_mask2 -help > > Command-specific options: > > > > Output options: > > -binary_mask: Create a binary output. > > Generic options for all commands: > > -help: Print summary of command-line options and abort > > -version: Print version number of program and exit > > > > Usage: surface_mask2 in_volume.mnc surface.obj output.mnc > > > > Use the -binary_mask switch; repeat for the two surfaces. The > > in_volume.mnc is your volume template for which you'd like the > > voxelized surface to look like (use t1 image, for example). > > Then use a little minccalc -expression ... to identify the region > > in between. Of course, there are interpolation errors, but this > > is as good as you can get. Beware that surfaces may intersect > > or be very close to one another, possibly giving some holes in > > the cortex sheet. > > > > Claude > > > >> > >> Hi, > >> I have two .obj files, and I'm assuming one is completely > contained > >> within the other. For example, a white matter surface and a grey > >> matter surface for a single hemisphere. > >> I'm interested in obtaining a mnc file that is a binary label that > >> contains all the voxels between the two surfaces. > >> My first attempt was to load things up in Display, scan the objects > to > >> volume and then use 3D Fill to get all the voxels in between, > however, > >> because the scanned objects sometimes touch on the volume, the 3D > fill > >> area, is not contiguous ie. i have lots of holes that i would need > to > >> fill manually. > >> My next idea is to resample my volume to a 0.1 mm^3 grid and then > try > >> again, but I'm wondering if anyone has done something like this > before > >> and has a better solution. > >> > >> thanks, > >> mishkin > >> _______________________________________________ > >> MINC-users at bic.mni.mcgill.ca > >> http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users > >> > > > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users From nikelski at bic.mni.mcgill.ca Mon Feb 9 15:13:03 2009 From: nikelski at bic.mni.mcgill.ca (EJ Nikelski) Date: Mon, 9 Feb 2009 15:13:03 -0500 Subject: [MINC-users] ecattominc and minc2 Message-ID: Hi All, Has anyone encountered problems with ecattominc writing minc2 volumes? When I try it, I get an error ... --------------------- Reading headers. ncdimdef: ncid 67108864: NetCDF: Not a valid ID --------------------------------------------------------------------- When I turn off minc2 (MINC_FORCE_V2=0), it works just fine. All other minc2-writing on my system works flawlessly. Is this a known problem? Cheers, -Jim From mishkind at gmail.com Tue Feb 10 23:07:58 2009 From: mishkind at gmail.com (Mishkin Derakhshan) Date: Tue, 10 Feb 2009 23:07:58 -0500 Subject: [MINC-users] label from 2 objects In-Reply-To: <947230635.296781233909294584.JavaMail.root@zimbra-store01.hst.aau.dk> References: <9c5abb60902051457h586cd546n991dcc0289ebace7@mail.gmail.com> <947230635.296781233909294584.JavaMail.root@zimbra-store01.hst.aau.dk> Message-ID: <9c5abb60902102007l13c57052v7b628a0c7063cfbc@mail.gmail.com> Hi Simon, Indeed I would be interested (I am on a 64 bit machine). Claude, do you happen to know how surface_mask2 handles voxels that are not completely bounded by the surface? is it a binary decision, or is there a threshold set somewhere? thanks, mishkin On Fri, Feb 6, 2009 at 3:34 AM, Simon Fristed Eskildsen wrote: > Hi Mishkin, > If interested, I have some code that calculates the inside fraction of every voxel w.r.t. some closed object. I.e. the output is fuzzy (or you may say PVE-like) hopefully solving the problems where the two surfaces are very close. The code is very beta, so no guarantees on the stability. > > Simon > ----- "Mishkin Derakhshan" wrote: > >> Thanks Claude, >> Right after I sent the email I figured out in Display that I should >> 3D >> Fill each surface separately and then do some mincmath magic, but now >> I can automate the whole thing. >> thanks, >> mishkin >> >> >> On Thu, Feb 5, 2009 at 5:47 PM, Claude LEPAGE >> wrote: >> > Hi Mishkin, >> > >> > Try this: >> > >> > scarus /home/claude > surface_mask2 -help >> > Command-specific options: >> > >> > Output options: >> > -binary_mask: Create a binary output. >> > Generic options for all commands: >> > -help: Print summary of command-line options and abort >> > -version: Print version number of program and exit >> > >> > Usage: surface_mask2 in_volume.mnc surface.obj output.mnc >> > >> > Use the -binary_mask switch; repeat for the two surfaces. The >> > in_volume.mnc is your volume template for which you'd like the >> > voxelized surface to look like (use t1 image, for example). >> > Then use a little minccalc -expression ... to identify the region >> > in between. Of course, there are interpolation errors, but this >> > is as good as you can get. Beware that surfaces may intersect >> > or be very close to one another, possibly giving some holes in >> > the cortex sheet. >> > >> > Claude >> > >> >> >> >> Hi, >> >> I have two .obj files, and I'm assuming one is completely >> contained >> >> within the other. For example, a white matter surface and a grey >> >> matter surface for a single hemisphere. >> >> I'm interested in obtaining a mnc file that is a binary label that >> >> contains all the voxels between the two surfaces. >> >> My first attempt was to load things up in Display, scan the objects >> to >> >> volume and then use 3D Fill to get all the voxels in between, >> however, >> >> because the scanned objects sometimes touch on the volume, the 3D >> fill >> >> area, is not contiguous ie. i have lots of holes that i would need >> to >> >> fill manually. >> >> My next idea is to resample my volume to a 0.1 mm^3 grid and then >> try >> >> again, but I'm wondering if anyone has done something like this >> before >> >> and has a better solution. >> >> >> >> thanks, >> >> mishkin >> >> _______________________________________________ >> >> MINC-users at bic.mni.mcgill.ca >> >> http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users >> >> >> > >> _______________________________________________ >> MINC-users at bic.mni.mcgill.ca >> http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From a.janke at gmail.com Wed Feb 11 00:45:41 2009 From: a.janke at gmail.com (Andrew Janke) Date: Wed, 11 Feb 2009 16:45:41 +1100 Subject: [MINC-users] Updated MINC 2.0.17 packages for Ubuntu Hardy Message-ID: Are available here: http://packages.bic.mni.mcgill.ca/ubuntu-hardy/ Let me know if they break things. a From jween at klaru-baycrest.on.ca Wed Feb 11 20:09:58 2009 From: jween at klaru-baycrest.on.ca (Jon Erik Ween) Date: Wed, 11 Feb 2009 20:09:58 -0500 Subject: [MINC-users] dyld errors Message-ID: Friends I just migrated from Linux to OS X 10.5, but can't figure out how to set the dynamic linker variables correctly to link to libs in /usr/ local and so forth. Starting Display etc gives dyld errors about netpbm that I used to fix by setting LD_LIBRARY_PATH in Linux, but this doesn't work in OS X . Hardwiring DYLD_LIBRARY_PATH doesn't help, one only gets other dyld errors. I've tried to use fink to install the various packages, hoping that fink ill set the environment variables, but that did not work either. I'm sure I'm missing something stupid here. Thanks for any help. Jon Soli Deo Gloria Jon Erik Ween, MD, MS Scientist, Kunin-Lunenfeld Applied Research Unit Director, Stroke Clinic, Brain Health Clinic, Baycrest Centre Assistant Professor, Dept. of Medicine, Div. of Neurology University of Toronto Faculty of Medicine Kimel Family Building, 6th Floor, Room 644 Baycrest Centre 3560 Bathurst Street Toronto, Ontario M6A 2E1 Canada Phone: 416-785-2500 x3648 Fax: 416-785-2484 Email: jween at klaru-baycrest.on.ca Confidential: This communication and any attachment(s) may contain confidential or privileged information and is intended solely for the address(es) or the entity representing the recipient(s). If you have received this information in error, you are hereby advised to destroy the document and any attachment(s), make no copies of same and inform the sender immediately of the error. Any unauthorized use or disclosure of this information is strictly prohibited. From a.janke at gmail.com Wed Feb 11 20:21:52 2009 From: a.janke at gmail.com (Andrew Janke) Date: Thu, 12 Feb 2009 12:21:52 +1100 Subject: [MINC-users] dyld errors In-Reply-To: References: Message-ID: Hi Jon, 2009/2/12 Jon Erik Ween : > Friends Romans... ? > I just migrated from Linux to OS X 10.5, but can't figure out how to > set the dynamic linker variables correctly to link to libs in /usr/ > local and so forth. Hrm. Have you got the fink'ish stuff in your .bashrc? . /sw/bin/init.sh -- Andrew Janke (a.janke at gmail.com || http://a.janke.googlepages.com/) Canberra->Australia +61 (402) 700 883 From a.janke at gmail.com Wed Feb 11 22:12:02 2009 From: a.janke at gmail.com (Andrew Janke) Date: Thu, 12 Feb 2009 14:12:02 +1100 Subject: [MINC-users] ecattominc and minc2 In-Reply-To: References: Message-ID: Hi Jim, > Has anyone encountered problems with ecattominc writing minc2 > volumes? When I try it, I get an error ... I certainly haven't. > --------------------- > Reading headers. > ncdimdef: ncid 67108864: NetCDF: Not a valid ID > --------------------------------------------------------------------- But this looks suspiciously like a MINC2 program being linked against a MINC1 library. I will have a big of a dig around in ecattominc and see what I can find WRT linking. -- Andrew Janke (a.janke at gmail.com || http://a.janke.googlepages.com/) Canberra->Australia +61 (402) 700 883 From jween at klaru-baycrest.on.ca Thu Feb 12 08:01:28 2009 From: jween at klaru-baycrest.on.ca (Jon Erik Ween) Date: Thu, 12 Feb 2009 08:01:28 -0500 Subject: [MINC-users] dyld errors In-Reply-To: References: Message-ID: <500994CB-D506-4A18-B74B-975817271080@klaru-baycrest.on.ca> Countrymen I do indeed have fink set up with .bashrc initializing it. Jon Soli Deo Gloria On 11-Feb-09, at 8:21 PM, Andrew Janke wrote: > Hi Jon, > > 2009/2/12 Jon Erik Ween : >> Friends > > Romans... ? > >> I just migrated from Linux to OS X 10.5, but can't figure out how to >> set the dynamic linker variables correctly to link to libs in /usr/ >> local and so forth. > > Hrm. Have you got the fink'ish stuff in your .bashrc? > > . /sw/bin/init.sh > > > -- > Andrew Janke > (a.janke at gmail.com || http://a.janke.googlepages.com/) > Canberra->Australia +61 (402) 700 883 > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From a.janke at gmail.com Tue Feb 17 19:37:36 2009 From: a.janke at gmail.com (Andrew Janke) Date: Wed, 18 Feb 2009 11:37:36 +1100 Subject: [MINC-users] dyld errors In-Reply-To: <500994CB-D506-4A18-B74B-975817271080@klaru-baycrest.on.ca> References: <500994CB-D506-4A18-B74B-975817271080@klaru-baycrest.on.ca> Message-ID: Hrm, When you say you hardwire DYLD_LIBRARY_PATH I presume you mean something like this in your .bashrc/.bash_profile export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/bic/lib -- Andrew Janke (a.janke at gmail.com || http://a.janke.googlepages.com/) Canberra->Australia +61 (402) 700 883 2009/2/13 Jon Erik Ween : > Countrymen > > I do indeed have fink set up with .bashrc initializing it. > > Jon > > Soli Deo Gloria From se at hst.aau.dk Thu Feb 19 10:36:23 2009 From: se at hst.aau.dk (Simon Fristed Eskildsen) Date: Thu, 19 Feb 2009 16:36:23 +0100 (CET) Subject: [MINC-users] label from 2 objects In-Reply-To: <1886664625.783421235057690846.JavaMail.root@zimbra-store01.hst.aau.dk> Message-ID: <1044135250.783441235057783305.JavaMail.root@zimbra-store01.hst.aau.dk> Hi Mishkin, I have put a 64 bit version here: http://www.hst.aau.dk/~se/software/scan_surface_to_volume.bin64 It is dynamically linked to: libhdf5-1.6.5.so.0 => /usr/lib/libhdf5-1.6.5.so.0 (0x00002b3c150c0000) libnetcdf.so.3 => /usr/lib/libnetcdf.so.3 (0x00002b3c153e3000) libm.so.6 => /lib/libm.so.6 (0x00002b3c15632000) libc.so.6 => /lib/libc.so.6 (0x00002b3c158b4000) libpthread.so.0 => /lib/libpthread.so.0 (0x00002b3c15c06000) libz.so.1 => /usr/lib/libz.so.1 (0x00002b3c15e21000) /lib64/ld-linux-x86-64.so.2 (0x00002b3c14ea3000) If it doesn't work I can try a static linking. It only reads triangular polymeshes. It only evaluates the voxels touched by the mesh faces. I.e. you would probably combine it with surface_mask2 and minccalc to get a solid component with fuzzy edges. Simon ----- "Mishkin Derakhshan" wrote: > Hi Simon, > Indeed I would be interested (I am on a 64 bit machine). > Claude, do you happen to know how surface_mask2 handles voxels that > are not completely bounded by the surface? is it a binary decision, > or > is there a threshold set somewhere? > thanks, > mishkin > > > > On Fri, Feb 6, 2009 at 3:34 AM, Simon Fristed Eskildsen > wrote: > > Hi Mishkin, > > If interested, I have some code that calculates the inside fraction > of every voxel w.r.t. some closed object. I.e. the output is fuzzy (or > you may say PVE-like) hopefully solving the problems where the two > surfaces are very close. The code is very beta, so no guarantees on > the stability. > > > > Simon > > ----- "Mishkin Derakhshan" wrote: > > > >> Thanks Claude, > >> Right after I sent the email I figured out in Display that I > should > >> 3D > >> Fill each surface separately and then do some mincmath magic, but > now > >> I can automate the whole thing. > >> thanks, > >> mishkin > >> > >> > >> On Thu, Feb 5, 2009 at 5:47 PM, Claude LEPAGE > >> wrote: > >> > Hi Mishkin, > >> > > >> > Try this: > >> > > >> > scarus /home/claude > surface_mask2 -help > >> > Command-specific options: > >> > > >> > Output options: > >> > -binary_mask: Create a binary output. > >> > Generic options for all commands: > >> > -help: Print summary of command-line options and abort > >> > -version: Print version number of program and exit > >> > > >> > Usage: surface_mask2 in_volume.mnc surface.obj output.mnc > >> > > >> > Use the -binary_mask switch; repeat for the two surfaces. The > >> > in_volume.mnc is your volume template for which you'd like the > >> > voxelized surface to look like (use t1 image, for example). > >> > Then use a little minccalc -expression ... to identify the > region > >> > in between. Of course, there are interpolation errors, but this > >> > is as good as you can get. Beware that surfaces may intersect > >> > or be very close to one another, possibly giving some holes in > >> > the cortex sheet. > >> > > >> > Claude > >> > > >> >> > >> >> Hi, > >> >> I have two .obj files, and I'm assuming one is completely > >> contained > >> >> within the other. For example, a white matter surface and a > grey > >> >> matter surface for a single hemisphere. > >> >> I'm interested in obtaining a mnc file that is a binary label > that > >> >> contains all the voxels between the two surfaces. > >> >> My first attempt was to load things up in Display, scan the > objects > >> to > >> >> volume and then use 3D Fill to get all the voxels in between, > >> however, > >> >> because the scanned objects sometimes touch on the volume, the > 3D > >> fill > >> >> area, is not contiguous ie. i have lots of holes that i would > need > >> to > >> >> fill manually. > >> >> My next idea is to resample my volume to a 0.1 mm^3 grid and > then > >> try > >> >> again, but I'm wondering if anyone has done something like this > >> before > >> >> and has a better solution. > >> >> > >> >> thanks, > >> >> mishkin > >> >> _______________________________________________ > >> >> MINC-users at bic.mni.mcgill.ca > >> >> http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users > >> >> > >> > > >> _______________________________________________ > >> MINC-users at bic.mni.mcgill.ca > >> http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > _______________________________________________ > > MINC-users at bic.mni.mcgill.ca > > http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users From nikelski at bic.mni.mcgill.ca Thu Feb 19 16:48:36 2009 From: nikelski at bic.mni.mcgill.ca (EJ Nikelski) Date: Thu, 19 Feb 2009 16:48:36 -0500 Subject: [MINC-users] Blurring a 4D minc volume? Message-ID: Hi All, I seem to have hit a wall, and need some suggestions. I have a 4D volume (time * z * y * x) which I need to blur. No problem, I think. So, I do the following: (1) mincreshape to split the 4D volume into a series of 3D volumes (2) mincblur each separately (3) mincconcat to slap it all together again Here's the problem: mincreshape actually produces a 4D volume with "time" the slowest varying dimension and equal to 1. This is precisely what I want, since this preserves my time data (eg, time start, time-width). This is important, since my times are *not* fixed. mincblur then comes along and, more or less, corrupts the volume in that the time dimension is still in the header -- but it's now as the fastest varying dimension, and all of its variable info has been removed. At this point, the mincconcat stage is pointless, in that I have now lost my time info. What's the best way to get around this, while retaining my "irregular" time information? Suggestions? Ideas? -Jim -- ================================= Jim Nikelski, Ph.D. Postdoctoral Research Fellow Bloomfield Centre for Research in Aging Lady Davis Institute for Medical Research Sir Mortimer B. Davis - Jewish General Hospital McGill University From mferre at bic.mni.mcgill.ca Thu Feb 19 17:08:04 2009 From: mferre at bic.mni.mcgill.ca (Michael Ferreira) Date: Thu, 19 Feb 2009 17:08:04 -0500 Subject: [MINC-users] Blurring a 4D minc volume? In-Reply-To: References: Message-ID: <499DD844.5050607@bic.mni.mcgill.ca> Hi Jim, Have you tried fmr_preprocess? It's not part of the standard MINC install, but it is available on most BIC machines. We normally use it to motion-correct and blur fMRI data. But you can turn off the alignment part with the -noalign option, and specify the amount of blurring in millimeters with the -fwhm option: /usr/local/mni/bin/fmr_preprocess -noalign -fwhm 6 input.mnc This script should preserve the time info. Nonetheless, you should verify the output. Regards, mike EJ Nikelski wrote: > Hi All, > > I seem to have hit a wall, and need some suggestions. I have a 4D > volume (time * z * y * x) which I need to blur. No problem, I think. > So, I do the following: > > (1) mincreshape to split the 4D volume into a series of 3D volumes > (2) mincblur each separately > (3) mincconcat to slap it all together again > > Here's the problem: mincreshape actually produces a 4D volume with > "time" the slowest varying dimension and equal to 1. This is > precisely what I want, since this preserves my time data (eg, time > start, time-width). This is important, since my times are *not* > fixed. mincblur then comes along and, more or less, corrupts the > volume in that the time dimension is still in the header -- but it's > now as the fastest varying dimension, and all of its variable info has > been removed. At this point, the mincconcat stage is pointless, in > that I have now lost my time info. > > What's the best way to get around this, while retaining my "irregular" > time information? Suggestions? Ideas? > > > -Jim > From mishkind at gmail.com Thu Feb 19 18:11:19 2009 From: mishkind at gmail.com (Mishkin Derakhshan) Date: Thu, 19 Feb 2009 18:11:19 -0500 Subject: [MINC-users] label from 2 objects In-Reply-To: <1044135250.783441235057783305.JavaMail.root@zimbra-store01.hst.aau.dk> References: <1886664625.783421235057690846.JavaMail.root@zimbra-store01.hst.aau.dk> <1044135250.783441235057783305.JavaMail.root@zimbra-store01.hst.aau.dk> Message-ID: <9c5abb60902191511hc922d6enef96e504b4955ef9@mail.gmail.com> Thanks Simon, Unfortunately I get a seg fault. opus[/tmp]$ scan_surface_to_volume.bin64 lh.pial.obj orig.mnc out.mnc WARNING! create_triangle_lookup_table(): Not enough memory allocated for the lookup table! (static_vertex_pr_cell = 50) #DEBUG: LUT freed ok! Segmentation fault I tried lowering the -vertices_pr_voxel but that didn't work either. I'm not sure if it is a library problem so here is my ldd output. opus[/tmp]$ ldd ~/bin/scan_surface_to_volume.bin64 linux-vdso.so.1 => (0x00007fff7e3fe000) libhdf5-1.6.5.so.0 => /usr/lib/libhdf5-1.6.5.so.0 (0x00007f4975d68000) libnetcdf.so.3 => /usr/lib/libnetcdf.so.3 (0x00007f4975b2a000) libm.so.6 => /lib/libm.so.6 (0x00007f49758a9000) libc.so.6 => /lib/libc.so.6 (0x00007f4975547000) libpthread.so.0 => /lib/libpthread.so.0 (0x00007f497532b000) libz.so.1 => /usr/lib/libz.so.1 (0x00007f4975114000) /lib64/ld-linux-x86-64.so.2 (0x00007f497607f000) On Thu, Feb 19, 2009 at 10:36 AM, Simon Fristed Eskildsen wrote: > Hi Mishkin, > I have put a 64 bit version here: > http://www.hst.aau.dk/~se/software/scan_surface_to_volume.bin64 > It is dynamically linked to: > libhdf5-1.6.5.so.0 => /usr/lib/libhdf5-1.6.5.so.0 (0x00002b3c150c0000) > libnetcdf.so.3 => /usr/lib/libnetcdf.so.3 (0x00002b3c153e3000) > libm.so.6 => /lib/libm.so.6 (0x00002b3c15632000) > libc.so.6 => /lib/libc.so.6 (0x00002b3c158b4000) > libpthread.so.0 => /lib/libpthread.so.0 (0x00002b3c15c06000) > libz.so.1 => /usr/lib/libz.so.1 (0x00002b3c15e21000) > /lib64/ld-linux-x86-64.so.2 (0x00002b3c14ea3000) > > If it doesn't work I can try a static linking. > > It only reads triangular polymeshes. It only evaluates the voxels touched by the mesh faces. I.e. you would probably combine it with surface_mask2 and minccalc to get a solid component with fuzzy edges. > > Simon > ----- "Mishkin Derakhshan" wrote: > >> Hi Simon, >> Indeed I would be interested (I am on a 64 bit machine). >> Claude, do you happen to know how surface_mask2 handles voxels that >> are not completely bounded by the surface? is it a binary decision, >> or >> is there a threshold set somewhere? >> thanks, >> mishkin >> >> >> >> On Fri, Feb 6, 2009 at 3:34 AM, Simon Fristed Eskildsen >> wrote: >> > Hi Mishkin, >> > If interested, I have some code that calculates the inside fraction >> of every voxel w.r.t. some closed object. I.e. the output is fuzzy (or >> you may say PVE-like) hopefully solving the problems where the two >> surfaces are very close. The code is very beta, so no guarantees on >> the stability. >> > >> > Simon >> > ----- "Mishkin Derakhshan" wrote: >> > >> >> Thanks Claude, >> >> Right after I sent the email I figured out in Display that I >> should >> >> 3D >> >> Fill each surface separately and then do some mincmath magic, but >> now >> >> I can automate the whole thing. >> >> thanks, >> >> mishkin >> >> >> >> >> >> On Thu, Feb 5, 2009 at 5:47 PM, Claude LEPAGE >> >> wrote: >> >> > Hi Mishkin, >> >> > >> >> > Try this: >> >> > >> >> > scarus /home/claude > surface_mask2 -help >> >> > Command-specific options: >> >> > >> >> > Output options: >> >> > -binary_mask: Create a binary output. >> >> > Generic options for all commands: >> >> > -help: Print summary of command-line options and abort >> >> > -version: Print version number of program and exit >> >> > >> >> > Usage: surface_mask2 in_volume.mnc surface.obj output.mnc >> >> > >> >> > Use the -binary_mask switch; repeat for the two surfaces. The >> >> > in_volume.mnc is your volume template for which you'd like the >> >> > voxelized surface to look like (use t1 image, for example). >> >> > Then use a little minccalc -expression ... to identify the >> region >> >> > in between. Of course, there are interpolation errors, but this >> >> > is as good as you can get. Beware that surfaces may intersect >> >> > or be very close to one another, possibly giving some holes in >> >> > the cortex sheet. >> >> > >> >> > Claude >> >> > >> >> >> >> >> >> Hi, >> >> >> I have two .obj files, and I'm assuming one is completely >> >> contained >> >> >> within the other. For example, a white matter surface and a >> grey >> >> >> matter surface for a single hemisphere. >> >> >> I'm interested in obtaining a mnc file that is a binary label >> that >> >> >> contains all the voxels between the two surfaces. >> >> >> My first attempt was to load things up in Display, scan the >> objects >> >> to >> >> >> volume and then use 3D Fill to get all the voxels in between, >> >> however, >> >> >> because the scanned objects sometimes touch on the volume, the >> 3D >> >> fill >> >> >> area, is not contiguous ie. i have lots of holes that i would >> need >> >> to >> >> >> fill manually. >> >> >> My next idea is to resample my volume to a 0.1 mm^3 grid and >> then >> >> try >> >> >> again, but I'm wondering if anyone has done something like this >> >> before >> >> >> and has a better solution. >> >> >> >> >> >> thanks, >> >> >> mishkin >> >> >> _______________________________________________ >> >> >> MINC-users at bic.mni.mcgill.ca >> >> >> http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users >> >> >> >> >> > >> >> _______________________________________________ >> >> MINC-users at bic.mni.mcgill.ca >> >> http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users >> > _______________________________________________ >> > MINC-users at bic.mni.mcgill.ca >> > http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users >> > >> >> _______________________________________________ >> MINC-users at bic.mni.mcgill.ca >> http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From nikelski at bic.mni.mcgill.ca Thu Feb 19 18:36:16 2009 From: nikelski at bic.mni.mcgill.ca (EJ Nikelski) Date: Thu, 19 Feb 2009 18:36:16 -0500 Subject: [MINC-users] Blurring a 4D minc volume? In-Reply-To: <499DD844.5050607@bic.mni.mcgill.ca> References: <499DD844.5050607@bic.mni.mcgill.ca> Message-ID: Hi Mike (and minc-users List), Thanks for the suggestion, but as luck would have it, Yup -- I've already tried fmr_preprocess. It seems to preserve the time dimension info well, however, it loses the time-width variable. The time-width variable contains the irregular frame durations (I'm working with multi-frame PET volumes), and is something that I need to preserve. Now, I've heard that there may be multiple versions of fmr_preprocess kicking around, so this may simply be a short-coming of the version that I'm using. If you were to point me to the best and coolest version, I would certainly be prepared to give that a shot as well. Thanks, -Jim On Thu, Feb 19, 2009 at 5:08 PM, Michael Ferreira wrote: > Hi Jim, > > Have you tried fmr_preprocess? It's not part of the standard MINC > install, but it is available on most BIC machines. We normally use it > to motion-correct and blur fMRI data. But you can turn off the > alignment part with the -noalign option, and specify the amount of > blurring in millimeters with the -fwhm option: > > /usr/local/mni/bin/fmr_preprocess -noalign -fwhm 6 input.mnc > > This script should preserve the time info. Nonetheless, you should > verify the output. > > Regards, > > mike > > > > EJ Nikelski wrote: >> Hi All, >> >> I seem to have hit a wall, and need some suggestions. I have a 4D >> volume (time * z * y * x) which I need to blur. No problem, I think. >> So, I do the following: >> >> (1) mincreshape to split the 4D volume into a series of 3D volumes >> (2) mincblur each separately >> (3) mincconcat to slap it all together again >> >> Here's the problem: mincreshape actually produces a 4D volume with >> "time" the slowest varying dimension and equal to 1. This is >> precisely what I want, since this preserves my time data (eg, time >> start, time-width). This is important, since my times are *not* >> fixed. mincblur then comes along and, more or less, corrupts the >> volume in that the time dimension is still in the header -- but it's >> now as the fastest varying dimension, and all of its variable info has >> been removed. At this point, the mincconcat stage is pointless, in >> that I have now lost my time info. >> >> What's the best way to get around this, while retaining my "irregular" >> time information? Suggestions? Ideas? >> >> >> -Jim >> > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users > -- ================================= Jim Nikelski, Ph.D. Postdoctoral Research Fellow Bloomfield Centre for Research in Aging Lady Davis Institute for Medical Research Sir Mortimer B. Davis - Jewish General Hospital McGill University Tel: (514) 340-8222 x 2298 Fax: (514) 340-8295 From nikelski at bic.mni.mcgill.ca Fri Feb 20 13:35:06 2009 From: nikelski at bic.mni.mcgill.ca (EJ Nikelski) Date: Fri, 20 Feb 2009 13:35:06 -0500 Subject: [MINC-users] Blurring a 4D minc volume? In-Reply-To: References: <499DD844.5050607@bic.mni.mcgill.ca> Message-ID: Hi List, OK, I've got a work-around, which I shall document for google posterity (and for whomever else runs into this). The solution looks like this (a la Wittgenstein): 1.0 Understand that ripping a 4D volume apart loses you stuff 1.1 Prior to dismembering your 4D volume, have your script save the important stuff (etc, time, time-width,etc) 1.2 Dismember (mincreshape, why not?) 2.0 blur 3.0 recombine with mincconcat, paying special attention to the -coordlist and -widthlist arguments. That's all. Pretty simple, if you go to sleep thinking of mincconcat switches ... and if you realize that -coordlist is really all about frame start times, when dealing with time as your 4th dimension. Cheers, -Jim On Thu, Feb 19, 2009 at 6:36 PM, EJ Nikelski wrote: > Hi Mike (and minc-users List), > > Thanks for the suggestion, but as luck would have it, Yup -- I've > already tried fmr_preprocess. It seems to preserve the time dimension > info well, however, it loses the time-width variable. The time-width > variable contains the irregular frame durations (I'm working with > multi-frame PET volumes), and is something that I need to preserve. > > Now, I've heard that there may be multiple versions of > fmr_preprocess kicking around, so this may simply be a short-coming of > the version that I'm using. If you were to point me to the best and > coolest version, I would certainly be prepared to give that a shot as > well. > > Thanks, > > -Jim > > > On Thu, Feb 19, 2009 at 5:08 PM, Michael Ferreira > wrote: >> Hi Jim, >> >> Have you tried fmr_preprocess? It's not part of the standard MINC >> install, but it is available on most BIC machines. We normally use it >> to motion-correct and blur fMRI data. But you can turn off the >> alignment part with the -noalign option, and specify the amount of >> blurring in millimeters with the -fwhm option: >> >> /usr/local/mni/bin/fmr_preprocess -noalign -fwhm 6 input.mnc >> >> This script should preserve the time info. Nonetheless, you should >> verify the output. >> >> Regards, >> >> mike >> >> >> >> EJ Nikelski wrote: >>> Hi All, >>> >>> I seem to have hit a wall, and need some suggestions. I have a 4D >>> volume (time * z * y * x) which I need to blur. No problem, I think. >>> So, I do the following: >>> >>> (1) mincreshape to split the 4D volume into a series of 3D volumes >>> (2) mincblur each separately >>> (3) mincconcat to slap it all together again >>> >>> Here's the problem: mincreshape actually produces a 4D volume with >>> "time" the slowest varying dimension and equal to 1. This is >>> precisely what I want, since this preserves my time data (eg, time >>> start, time-width). This is important, since my times are *not* >>> fixed. mincblur then comes along and, more or less, corrupts the >>> volume in that the time dimension is still in the header -- but it's >>> now as the fastest varying dimension, and all of its variable info has >>> been removed. At this point, the mincconcat stage is pointless, in >>> that I have now lost my time info. >>> >>> What's the best way to get around this, while retaining my "irregular" >>> time information? Suggestions? Ideas? >>> >>> >>> -Jim >>> >> _______________________________________________ >> MINC-users at bic.mni.mcgill.ca >> http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users >> > > > > -- > ================================= > Jim Nikelski, Ph.D. > Postdoctoral Research Fellow > Bloomfield Centre for Research in Aging > Lady Davis Institute for Medical Research > Sir Mortimer B. Davis - Jewish General Hospital > McGill University > Tel: (514) 340-8222 x 2298 > Fax: (514) 340-8295 > -- ================================= Jim Nikelski, Ph.D. Postdoctoral Research Fellow Bloomfield Centre for Research in Aging Lady Davis Institute for Medical Research Sir Mortimer B. Davis - Jewish General Hospital McGill University Tel: (514) 340-8222 x 2298 Fax: (514) 340-8295 From se at hst.aau.dk Fri Feb 20 13:55:11 2009 From: se at hst.aau.dk (Simon Fristed Eskildsen) Date: Fri, 20 Feb 2009 19:55:11 +0100 (CET) Subject: [MINC-users] label from 2 objects In-Reply-To: <9c5abb60902191511hc922d6enef96e504b4955ef9@mail.gmail.com> Message-ID: <2057198290.809211235156111208.JavaMail.root@zimbra-store01.hst.aau.dk> Hi Mishkin, Is it a very dense object, i.e lots of vertices? If so, the vertices per voxel (VPV) should be increased, not decreased. It's simply the maximum number of vertices you would expect within a single voxel of the input volume in order to make a static allocation. I know it's ugly, but this limits the memory usage and runs in linear time. 50 VPV seem to work for most of my surfaces. You could try setting it to 100 or higher. Watch the memory usage, though. Simon ----- "Mishkin Derakhshan" wrote: > Thanks Simon, > Unfortunately I get a seg fault. > > opus[/tmp]$ scan_surface_to_volume.bin64 lh.pial.obj orig.mnc out.mnc > WARNING! create_triangle_lookup_table(): Not enough memory allocated > for the lookup table! (static_vertex_pr_cell = 50) > #DEBUG: LUT freed ok! > Segmentation fault > > I tried lowering the -vertices_pr_voxel but that didn't work either. > I'm not sure if it is a library problem so here is my ldd output. snip