From minc-users@bic.mni.mcgill.ca Wed Feb 19 18:32:58 2003 From: minc-users@bic.mni.mcgill.ca (Ghassan Hamarneh) Date: Wed, 19 Feb 2003 13:32:58 -0500 (EST) Subject: [MINC-users] mincconcat question Message-ID: <20030219183258.59859.qmail@web11501.mail.yahoo.com> Hi, I tried: $ mincconcat 0a.mnc 0b.mnc 0n.mnc -concat_dimension yspace to concatenate two volumes 0a.mnc (384x183x256) to 0b.mnc (384x68x256) along the second dimension and end up with 0n.mnc (384x[183+68]x256) volume, but I am getting the message: Don't use an image dimension as a loop dimension. What's the proper way to use this command in this case? Thank you, /Ghassan -------- $ mincinfo 0a.mnc 0b.mnc file: 0a.mnc image: unsigned short 0 to 65535 image dimensions: xspace yspace zspace dimension name length step start -------------- ------ ---- ----- xspace 384 1 0 yspace 183 -1 -73 zspace 256 -1 0 file: 0b.mnc image: unsigned short 0 to 65535 image dimensions: xspace yspace zspace dimension name length step start -------------- ------ ---- ----- xspace 384 1 0 yspace 68 -1 0 zspace 256 -1 0 ______________________________________________________________________ Post your free ad now! http://personals.yahoo.ca From minc-users@bic.mni.mcgill.ca Fri Feb 21 03:15:05 2003 From: minc-users@bic.mni.mcgill.ca (Peter NEELIN) Date: Thu, 20 Feb 2003 22:15:05 -0500 Subject: [MINC-users] mincconcat question In-Reply-To: <20030219183258.59859.qmail@web11501.mail.yahoo.com> Message-ID: On Wed, 19 Feb 2003, Ghassan Hamarneh wrote: > $ mincconcat 0a.mnc 0b.mnc 0n.mnc -concat_dimension yspace > > to concatenate two volumes 0a.mnc (384x183x256) to 0b.mnc (384x68x256) along > the second dimension and end up with 0n.mnc (384x[183+68]x256) volume, but I am > getting the message: Don't use an image dimension as a loop dimension. I'm afraid that you cannot directly concatenate the files in this way. mincconcat was designed to concatenate stacks of images, but not to merge images together. Because mincconcat was built around the voxel_loop library, it is somewhat limited in its generality. If you are willing to put up with a bit of inefficiency, you can re-order the dimensions so that the dimension that you want to concatenate is the slowest varying. You can use either mincreshape or mincresample for this. I think that mincresample with the -nearest option is probably faster due to inefficiencies in netcdf of which mincreshape takes disadvantage (!). I think that the simplest set of commands would be mincresample -coronal -nearest 0a.mnc 0a_cor.mnc mincresample -coronal -nearest 0b.mnc 0b_cor.mnc mincconcat 0a_cor.mnc 0b_cor.mnc new.mnc I have not tested this and my minc is getting rusty, so you might have to adjust the options a bit. Peter ---- Peter Neelin (neelin@bic.mni.mcgill.ca)