From andrew at biospective.com Wed Sep 4 21:43:56 2013 From: andrew at biospective.com (Andrew Wood) Date: Wed, 4 Sep 2013 21:43:56 -0400 Subject: [MINC-users] Usage of mincconcat Message-ID: Hi All, I'm trying to use mincconcat to stitch some images together. For example, I have A.mnc: dimension name length step start -------------- ------ ---- ----- yspace 1 0.1 -5.7 zspace 750 0.00295238 15.5531 xspace 750 -0.00295238 33.3619 and B.mnc: dimension name length step start -------------- ------ ---- ----- yspace 1 0.1 -5.7 zspace 750 0.00295238 15.5531 xspace 750 -0.00295238 31.1476 I've tried concating them along x with something like this: mincconcat -concat_dimension xspace A.mnc B.mnc C.mnc This comes back with an error: "Don't use an image dimension as a loop dimension." Is there a way to concat these images to make one image with xspace:length=1500? Thanks, Andrew From a.janke at gmail.com Wed Sep 4 23:02:28 2013 From: a.janke at gmail.com (Andrew Janke) Date: Thu, 5 Sep 2013 13:02:28 +1000 Subject: [MINC-users] Usage of mincconcat In-Reply-To: References: Message-ID: Hi Andrew, > I'm trying to use mincconcat to stitch some images together. > > For example, I have A.mnc: > > dimension name length step start > -------------- ------ ---- ----- > yspace 1 0.1 -5.7 > zspace 750 0.00295238 15.5531 > xspace 750 -0.00295238 33.3619 > > and B.mnc: > dimension name length step start > -------------- ------ ---- ----- > yspace 1 0.1 -5.7 > zspace 750 0.00295238 15.5531 > xspace 750 -0.00295238 31.1476 > > I've tried concating them along x with something like this: > > mincconcat -concat_dimension xspace A.mnc B.mnc C.mnc > > This comes back with an error: > "Don't use an image dimension as a loop dimension." > > Is there a way to concat these images to make one image with > xspace:length=1500? Indeed there is. mincconcat in general will only work if you are concat'ing on the slowest varying dimension of a file. Thus before you concat do this: mincreshape -dimorder xspace,yspace,zspace A.mnc A_res.mnc mincreshape -dimorder xspace,yspace,zspace B.mnc B_res.mnc At which point: mincconcat -concat_dimension xspace A_res.mnc B_res.mnc C.mnc Should get you what you are after. a From andrew at biospective.com Thu Sep 5 08:50:09 2013 From: andrew at biospective.com (Andrew Wood) Date: Thu, 5 Sep 2013 08:50:09 -0400 Subject: [MINC-users] Usage of mincconcat In-Reply-To: References: Message-ID: Hi Andrew, Thanks for that. What I've actually done is split a large image into tiles or cubes for processing. Now that I've got processed hyperslabs, I'm stitching them back together. From what you described, I'll have to reshape the slabs for concatting into rows, then reshape the rows for concatting into slices, then reshape the slices for concatting back to the full volume. I suppose there's no way to stitch them without taking a big reshaping I/O hit? Thanks, Andrew On Wed, Sep 4, 2013 at 11:02 PM, Andrew Janke wrote: > Hi Andrew, > > > I'm trying to use mincconcat to stitch some images together. > > > > For example, I have A.mnc: > > > > dimension name length step start > > -------------- ------ ---- ----- > > yspace 1 0.1 -5.7 > > zspace 750 0.00295238 15.5531 > > xspace 750 -0.00295238 33.3619 > > > > and B.mnc: > > dimension name length step start > > -------------- ------ ---- ----- > > yspace 1 0.1 -5.7 > > zspace 750 0.00295238 15.5531 > > xspace 750 -0.00295238 31.1476 > > > > I've tried concating them along x with something like this: > > > > mincconcat -concat_dimension xspace A.mnc B.mnc C.mnc > > > > This comes back with an error: > > "Don't use an image dimension as a loop dimension." > > > > Is there a way to concat these images to make one image with > > xspace:length=1500? > > Indeed there is. mincconcat in general will only work if you are > concat'ing on the slowest varying dimension of a file. Thus before you > concat do this: > > mincreshape -dimorder xspace,yspace,zspace A.mnc A_res.mnc > mincreshape -dimorder xspace,yspace,zspace B.mnc B_res.mnc > > At which point: > > mincconcat -concat_dimension xspace A_res.mnc B_res.mnc C.mnc > > Should get you what you are after. > > > > a > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From jason at mouseimaging.ca Thu Sep 5 09:18:25 2013 From: jason at mouseimaging.ca (Jason Lerch) Date: Thu, 5 Sep 2013 09:18:25 -0400 Subject: [MINC-users] Usage of mincconcat In-Reply-To: References: Message-ID: <230AC546-0D8A-4D52-A39C-EA9E45E8693F@mouseimaging.ca> This sounds like a fairly easy roll-your-own task, especially if your tiles are not overlapping and you don't have to figure out how they stitch together. Some pseudo python code: from pyminc.volumes.factory import * from optparse import OptionParser, OptionGroup if __name__ == "__main__": # argument parsing bits as needed, but I'm feeling lazy (options, args) = parser.parse_args() # construct volume # need to know the number of slices output_filename = args.pop() n_slices = len(args) vol = volumeFromDescription(output_filename, options.dimorder, sizes=(n_slices,output_size[0],output_size[1]), starts=(0,0,0), steps=(options.slice_gap, options.output_resolution, # specify as options - I'm too lazy to add the opt parse bits above :) options.output_resolution), volumeType='ushort') for i in range(n_slices): # assuming that it's one slice per tile - modify as necessary inslice = volumeFromFile(args[i]) vol.data[i,:,:] = inslice.data vol.writeFile() vol.closeVolume() Jason On 2013-09-05, at 8:50 AM, Andrew Wood wrote: > Hi Andrew, > > Thanks for that. What I've actually done is split a large image into tiles > or cubes for processing. Now that I've got processed hyperslabs, I'm > stitching them back together. From what you described, I'll have to reshape > the slabs for concatting into rows, then reshape the rows for concatting > into slices, then reshape the slices for concatting back to the full volume. > > I suppose there's no way to stitch them without taking a big reshaping I/O > hit? > > Thanks, > Andrew > > > On Wed, Sep 4, 2013 at 11:02 PM, Andrew Janke wrote: > >> Hi Andrew, >> >>> I'm trying to use mincconcat to stitch some images together. >>> >>> For example, I have A.mnc: >>> >>> dimension name length step start >>> -------------- ------ ---- ----- >>> yspace 1 0.1 -5.7 >>> zspace 750 0.00295238 15.5531 >>> xspace 750 -0.00295238 33.3619 >>> >>> and B.mnc: >>> dimension name length step start >>> -------------- ------ ---- ----- >>> yspace 1 0.1 -5.7 >>> zspace 750 0.00295238 15.5531 >>> xspace 750 -0.00295238 31.1476 >>> >>> I've tried concating them along x with something like this: >>> >>> mincconcat -concat_dimension xspace A.mnc B.mnc C.mnc >>> >>> This comes back with an error: >>> "Don't use an image dimension as a loop dimension." >>> >>> Is there a way to concat these images to make one image with >>> xspace:length=1500? >> >> Indeed there is. mincconcat in general will only work if you are >> concat'ing on the slowest varying dimension of a file. Thus before you >> concat do this: >> >> mincreshape -dimorder xspace,yspace,zspace A.mnc A_res.mnc >> mincreshape -dimorder xspace,yspace,zspace B.mnc B_res.mnc >> >> At which point: >> >> mincconcat -concat_dimension xspace A_res.mnc B_res.mnc C.mnc >> >> Should get you what you are after. >> >> >> >> a >> _______________________________________________ >> MINC-users at bic.mni.mcgill.ca >> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users >> > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users From a.janke at gmail.com Thu Sep 5 08:58:03 2013 From: a.janke at gmail.com (Andrew Janke) Date: Thu, 5 Sep 2013 22:58:03 +1000 Subject: [MINC-users] Usage of mincconcat In-Reply-To: References: Message-ID: On 5 September 2013 22:50, Andrew Wood wrote: > Thanks for that. What I've actually done is split a large image into tiles > or cubes for processing. Now that I've got processed hyperslabs, I'm > stitching them back together. From what you described, I'll have to reshape > the slabs for concatting into rows, then reshape the rows for concatting > into slices, then reshape the slices for concatting back to the full volume. > > I suppose there's no way to stitch them without taking a big reshaping I/O > hit? This is only the case if you are concatenating along a dimension that is already in the file(s). If when you reshape you do this: mincreshape -dimrange yspace=100,0 3d.mnc y-100.mnc to pull out y slice #100 you will remove the y dimension. Then you can concat with: mincconcat -concay_dimension yspace y-100.mnc .... 3d.mnc Note that in the above you will have to manually store the starts, steps and direction cosines. Or, just bash the volume back together ignoring start/step/etc and use minccopy to overwrite the data in a copy of the original file. a From andrew at biospective.com Thu Sep 5 12:04:26 2013 From: andrew at biospective.com (Andrew Wood) Date: Thu, 5 Sep 2013 12:04:26 -0400 Subject: [MINC-users] Usage of mincconcat In-Reply-To: References: Message-ID: Jason's Python solution is quite attractive to me, because my "processing step" is a Python script. I should be able to adapt that and embed it right in the processing routine. My motivation for tiling/concating was driven by having images that are too big to fit in memory, so I don't think the issue is completely solved. I can extract the tiles as pyminc hyperslabs, but am I able to write back the processed hyperslabs without loading the entire destination image? That is, am I right that this loads vol's entire data block, despite only needing to modify part of it?: vol.data[i,:,:] = myslab Thanks, Andrew On Thu, Sep 5, 2013 at 8:58 AM, Andrew Janke wrote: > On 5 September 2013 22:50, Andrew Wood wrote: > > Thanks for that. What I've actually done is split a large image into > tiles > > or cubes for processing. Now that I've got processed hyperslabs, I'm > > stitching them back together. From what you described, I'll have to > reshape > > the slabs for concatting into rows, then reshape the rows for concatting > > into slices, then reshape the slices for concatting back to the full > volume. > > > > I suppose there's no way to stitch them without taking a big reshaping > I/O > > hit? > > This is only the case if you are concatenating along a dimension that > is already in the file(s). If when you reshape you do this: > > mincreshape -dimrange yspace=100,0 3d.mnc y-100.mnc > > to pull out y slice #100 you will remove the y dimension. > > Then you can concat with: > > mincconcat -concay_dimension yspace y-100.mnc .... 3d.mnc > > Note that in the above you will have to manually store the starts, > steps and direction cosines. > > Or, just bash the volume back together ignoring start/step/etc and use > minccopy to overwrite the data in a copy of the original file. > > > a > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From jason at mouseimaging.ca Thu Sep 5 12:36:57 2013 From: jason at mouseimaging.ca (Jason Lerch) Date: Thu, 5 Sep 2013 12:36:57 -0400 Subject: [MINC-users] Usage of mincconcat In-Reply-To: References: Message-ID: On 2013-09-05, at 12:04 PM, Andrew Wood wrote: > Jason's Python solution is quite attractive to me, because my "processing > step" is a Python script. I should be able to adapt that and embed it right > in the processing routine. My motivation for tiling/concating was driven by > having images that are too big to fit in memory, so I don't think the issue > is completely solved. I can extract the tiles as pyminc hyperslabs, but am > I able to write back the processed hyperslabs without loading the entire > destination image? > > That is, am I right that this loads vol's entire data block, despite only > needing to modify part of it?: > vol.data[i,:,:] = myslab You are right. In pyminc the data is not loaded upon opening the volume, but is loaded the first time the .data element is accessed. The way to work around that is to create the volumes as before, but never directly access the .data bit and instead use the getHyperslab and setHyperslab methods. That should do the trick for you, I think. Jason > > Thanks, > Andrew > > > On Thu, Sep 5, 2013 at 8:58 AM, Andrew Janke wrote: > >> On 5 September 2013 22:50, Andrew Wood wrote: >>> Thanks for that. What I've actually done is split a large image into >> tiles >>> or cubes for processing. Now that I've got processed hyperslabs, I'm >>> stitching them back together. From what you described, I'll have to >> reshape >>> the slabs for concatting into rows, then reshape the rows for concatting >>> into slices, then reshape the slices for concatting back to the full >> volume. >>> >>> I suppose there's no way to stitch them without taking a big reshaping >> I/O >>> hit? >> >> This is only the case if you are concatenating along a dimension that >> is already in the file(s). If when you reshape you do this: >> >> mincreshape -dimrange yspace=100,0 3d.mnc y-100.mnc >> >> to pull out y slice #100 you will remove the y dimension. >> >> Then you can concat with: >> >> mincconcat -concay_dimension yspace y-100.mnc .... 3d.mnc >> >> Note that in the above you will have to manually store the starts, >> steps and direction cosines. >> >> Or, just bash the volume back together ignoring start/step/etc and use >> minccopy to overwrite the data in a copy of the original file. >> >> >> a >> _______________________________________________ >> MINC-users at bic.mni.mcgill.ca >> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users >> > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users From andrew at biospective.com Tue Sep 17 12:07:35 2013 From: andrew at biospective.com (Andrew Wood) Date: Tue, 17 Sep 2013 12:07:35 -0400 Subject: [MINC-users] Jacobian-modulated Resampling Message-ID: Hi All, I'd like to study the effects of modulating data that goes though non-linear spacial normalization. Before I possibly reinvent the wheel, does anybody know of code out there that turns the process into a black box? I can imagine a script that takes a volume and an xfm as input, and outputs a deformed/modulated volume. Thanks, Andrew From jason at mouseimaging.ca Tue Sep 17 14:35:56 2013 From: jason at mouseimaging.ca (Jason Lerch) Date: Tue, 17 Sep 2013 14:35:56 -0400 Subject: [MINC-users] Jacobian-modulated Resampling In-Reply-To: References: Message-ID: <251F445A-0D35-4982-8BDB-1A92D580F38C@mouseimaging.ca> I for one don't understand the question. To me the answer to the question: > a script that takes a volume and an xfm as input, and > outputs a deformed/modulated volume. is mincresample, but I must be missing something ? Jason On 2013-09-17, at 12:07 PM, Andrew Wood wrote: > Hi All, > > I'd like to study the effects of modulating data that goes though > non-linear spacial normalization. Before I possibly reinvent the wheel, > does anybody know of code out there that turns the process into a black > box? I can imagine a script that takes a volume and an xfm as input, and > outputs a deformed/modulated volume. > > Thanks, > Andrew > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users From vladimir.fonov at gmail.com Tue Sep 17 15:00:03 2013 From: vladimir.fonov at gmail.com (Vladimir S. FONOV) Date: Tue, 17 Sep 2013 15:00:03 -0400 Subject: [MINC-users] Jacobian-modulated Resampling In-Reply-To: <251F445A-0D35-4982-8BDB-1A92D580F38C@mouseimaging.ca> References: <251F445A-0D35-4982-8BDB-1A92D580F38C@mouseimaging.ca> Message-ID: <5238A6B3.6050602@gmail.com> Hello, I suppose this code will do the trick for optimized VBM: https://github.com/vfonov/bic-pipelines/blob/master/bin/pipeline_smooth.pl On 13-09-17 02:35 PM, Jason Lerch wrote: > I for one don't understand the question. To me the answer to the question: >> a script that takes a volume and an xfm as input, and >> outputs a deformed/modulated volume. > > is mincresample, but I must be missing something ? > > Jason > > On 2013-09-17, at 12:07 PM, Andrew Wood wrote: > >> Hi All, >> >> I'd like to study the effects of modulating data that goes though >> non-linear spacial normalization. Before I possibly reinvent the wheel, >> does anybody know of code out there that turns the process into a black >> box? I can imagine a script that takes a volume and an xfm as input, and >> outputs a deformed/modulated volume. -- Best regards, Vladimir S. FONOV ~ vladimir.fonov gmail.com From andrew at biospective.com Tue Sep 17 15:43:11 2013 From: andrew at biospective.com (Andrew Wood) Date: Tue, 17 Sep 2013 15:43:11 -0400 Subject: [MINC-users] Jacobian-modulated Resampling In-Reply-To: <5238A6B3.6050602@gmail.com> References: <251F445A-0D35-4982-8BDB-1A92D580F38C@mouseimaging.ca> <5238A6B3.6050602@gmail.com> Message-ID: Thanks, Vladimir. I think that's exactly what I wanted. ICYI, here is a description of what I meant by Jacobian modulation: http://dbm.neuro.uni-jena.de/vbm/segmentation/modulation/ - Andrew On Tue, Sep 17, 2013 at 3:00 PM, Vladimir S. FONOV wrote: > Hello, > > I suppose this code will do the trick for optimized VBM: > https://github.com/vfonov/bic-**pipelines/blob/master/bin/** > pipeline_smooth.pl > > > > On 13-09-17 02:35 PM, Jason Lerch wrote: > >> I for one don't understand the question. To me the answer to the question: >> >>> a script that takes a volume and an xfm as input, and >>> outputs a deformed/modulated volume. >>> >> >> is mincresample, but I must be missing something ? >> >> Jason >> >> On 2013-09-17, at 12:07 PM, Andrew Wood wrote: >> >> Hi All, >>> >>> I'd like to study the effects of modulating data that goes though >>> non-linear spacial normalization. Before I possibly reinvent the wheel, >>> does anybody know of code out there that turns the process into a black >>> box? I can imagine a script that takes a volume and an xfm as input, and >>> outputs a deformed/modulated volume. >>> >> > > -- > Best regards, > > Vladimir S. FONOV ~ vladimir.fonov gmail.com > ______________________________**_________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/**mailman/listinfo/minc-users > From zijdenbos at gmail.com Tue Sep 17 15:46:37 2013 From: zijdenbos at gmail.com (Alex Zijdenbos) Date: Tue, 17 Sep 2013 15:46:37 -0400 Subject: [MINC-users] Jacobian-modulated Resampling In-Reply-To: <5238A6B3.6050602@gmail.com> References: <251F445A-0D35-4982-8BDB-1A92D580F38C@mouseimaging.ca> <5238A6B3.6050602@gmail.com> Message-ID: Hi Jason, mincresample will deform, but not modulate - the idea being to modulate the resampled data using the Jacobian determinant of the deformation (signal increases or decreases under compression/expansion). Vlad's script does the right thing it seems, although to classified data - but same idea. I've often wondered if this actually shouldn't be an option to mincresample; but I suspect that might go against Peter's original concept of "pure" resampling (by the same token mincresample doesn't blur when downsampling). -- A On Tue, Sep 17, 2013 at 3:00 PM, Vladimir S. FONOV wrote: > Hello, > > I suppose this code will do the trick for optimized VBM: > https://github.com/vfonov/bic-pipelines/blob/master/bin/pipeline_smooth.pl > > > > On 13-09-17 02:35 PM, Jason Lerch wrote: >> >> I for one don't understand the question. To me the answer to the question: >>> >>> a script that takes a volume and an xfm as input, and >>> outputs a deformed/modulated volume. >> >> >> is mincresample, but I must be missing something ? >> >> Jason >> >> On 2013-09-17, at 12:07 PM, Andrew Wood wrote: >> >>> Hi All, >>> >>> I'd like to study the effects of modulating data that goes though >>> non-linear spacial normalization. Before I possibly reinvent the wheel, >>> does anybody know of code out there that turns the process into a black >>> box? I can imagine a script that takes a volume and an xfm as input, and >>> outputs a deformed/modulated volume. > > > > -- > Best regards, > > Vladimir S. FONOV ~ vladimir.fonov gmail.com > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From a.janke at gmail.com Tue Sep 17 18:13:38 2013 From: a.janke at gmail.com (Andrew Janke) Date: Tue, 17 Sep 2013 18:13:38 -0400 Subject: [MINC-users] Jacobian-modulated Resampling In-Reply-To: References: <251F445A-0D35-4982-8BDB-1A92D580F38C@mouseimaging.ca> <5238A6B3.6050602@gmail.com> Message-ID: On 17 September 2013 15:46, Alex Zijdenbos wrote: > I've often wondered if this actually shouldn't be an option to > mincresample; but I suspect that might go against Peter's original > concept of "pure" resampling (by the same token mincresample doesn't > blur when downsampling). Indeed it shouldn't be as this would then special case mincresample to only work on 3D files. But I'm all for someone wrapping up the mincresample, mincblob -determinant, minccalc and second mincresample call. a From michal.povazan at meduniwien.ac.at Tue Sep 24 06:24:14 2013 From: michal.povazan at meduniwien.ac.at (Michal Povazan) Date: Tue, 24 Sep 2013 12:24:14 +0200 Subject: [MINC-users] DICOM to MINC Message-ID: <5241684E.4080207@meduniwien.ac.at> Hi all, I would like to ask a question concerning the coordinate systems and transformation from DICOM to MINC We are trying to transform the DICOM patient coordinate system into MINC world coordinates (our actual task is the creation of metabolic maps in MINC format from 3D CSI Siemens DICOM data). How is this transformation carried out in MINC converter (dcm2mnc), or in other words how to transform the DICOM`s positions, sliceNormalVector and InPlaneRotation parameters to direction cosines and start values in MINC? We were able to compute correct direction cosines, however, the start values are wrong for z direction. we have used the following code as an inspiration: from dicom_read.c (dcm2mnc) /for (ivolume=0; ivolume < VOL_NDIMS; ivolume++) {// //// // if (found_coordinate && // // found_dircos[VSLICE] && // // found_dircos[VROW] &&// // found_dircos[VCOLUMN]) {// // starts[ivolume] = // // coordinate[XCOORD] * dircos[ivolume][XCOORD] +// // coordinate[YCOORD] * dircos[ivolume][YCOORD] +// // coordinate[ZCOORD] * dircos[ivolume][ZCOORD];// // }// // else {// // starts[ivolume] = 0.0;// // }// // }// // // /and for the coordinates we have used (from siemens_to_dicom.c) for (i = 0; i < WORLD_NDIMS; i++) { coord[i] -= pixel_spacing[0] * ((double) ncolumns - 1.0) / 2.0 * row[i] + pixel_spacing[1] * ((double) nrows - 1.0) / 2.0 * column[i]; } The problem is, if I understand it correctly, this piece of code compute the coordinates just for slice and since we have 3D datasets, this can`t work properly. What is the correct formula for computation of start values from position and direction cosines? I hope my description is understandable. thank you for any help Michal Povazan From andrew at biospective.com Tue Sep 24 14:02:31 2013 From: andrew at biospective.com (Andrew Wood) Date: Tue, 24 Sep 2013 14:02:31 -0400 Subject: [MINC-users] Missing 'time' dimension in Dicom to Minc conversion Message-ID: Hi All, I'm trying to convert some 4D PET data from Dicom to Minc, and the time dimension is disappearing. Here's tail of the output from dcm2mnc from the minctools develop branch (I have the same problem with various releases). 0. Slice axis length 109 1. Echo axis length 1 2. Time axis length 6 3. Phase axis length 1 4. ChmSh axis length 1 0. Z axis length 1 step 2.027, start 189.011, cosines 0.000,0.000,1.000 1. Y axis length 336 step -1.018, start 353.003, cosines 0.000,1.000,-0.000 2. X axis length 336 step -1.018, start 170.771, cosines 1.000,0.000,-0.000 SOP Class UID: 1.2.840.10008.5.1.4.1.1.128 Images in acquisition: -1 Acquisitions in series: -1 3D raw partitions: -1 Pixel minimum -32768.0000000000 maximum 32767.0000000000 Window minimum 0.0000000000 maximum 15283.7890625000 Directory /data/scratch/andrew/235108_20130620_144450 exists... MINC file name: /data/scratch/andrew/235108_20130620_144450/235108_20130620_144450_3d1_pet.mnc Patient name: 235108 Study ID: 20130620.144450 Acquisition ID: 3 Registration date: 20130620 Registration time: 144450.234 Rows 336 columns 336 slices 109/109 Time axis length: 1/6 Writing 654 images to MINC file Created minc file /data/scratch/andrew/235108_20130620_144450/235108_20130620_144450_3d1_pet.mnc. Done processing files. It correctly identified that there are 6 time frames, however: mincinfo /data/scratch/andrew/235108_20130620_144450/235108_20130620_144450_3d1_pet.mnc image: signed__ short -32768 to 32767 image dimensions: zspace yspace xspace dimension name length step start -------------- ------ ---- ----- zspace 109 2.027 189.011 yspace 336 -1.01821 353.003 xspace 336 -1.01821 170.771 Has anyone run into this before? Thanks, Andrew From jon at pipitone.ca Thu Sep 26 02:19:27 2013 From: jon at pipitone.ca (Jon Pipitone) Date: Thu, 26 Sep 2013 02:19:27 -0400 Subject: [MINC-users] MINC tools for diffusion weighted images Message-ID: <20130926061926.GA28198@kensho.slice> Hi all, What sorts of tools are there for working with diffusion weighted images in MINC? Specifically, my wish list includes tools enabling me to: 1. convert the DWI from our raw dicoms to minc format preserving diffusion parameters 2. merge multiple DWI acquisitions for single subject 3. perform registration of the DWI image to a structural scan (updating directions) 4. estimate a diffusion tensor 5. export the DWI (and DTI) volume to other well-known formats (nifti or NRRD mostly) for further processing. >From my searching so far it looks like there is a toolkit[1] for MINC that should do most of the above, but I'm not sure if it is a) still maintained, or b) available to the public (seems one must have a BIC username to check out the source?). There is also the mincdti program[2] but I believe that only estimates a tensor. What are my other options? With the minc integration into ITK are there perhaps ITK-based toolkits you could recommend? Thanks! Jon. [1] http://www.bic.mni.mcgill.ca/~ilana/diffusion/diffusion_tools.html [2] Mentioned here: http://en.wikibooks.org/wiki/MINC/Reference/MINC2.0_Users_Guide From a.janke at gmail.com Fri Sep 27 02:16:21 2013 From: a.janke at gmail.com (Andrew Janke) Date: Fri, 27 Sep 2013 16:16:21 +1000 Subject: [MINC-users] MINC tools for diffusion weighted images In-Reply-To: <20130926061926.GA28198@kensho.slice> References: <20130926061926.GA28198@kensho.slice> Message-ID: Hi Jon, > What sorts of tools are there for working with diffusion weighted images > in MINC? > > Specifically, my wish list includes tools enabling me to: > 1. convert the DWI from our raw dicoms to minc format preserving > diffusion parameters dcm2mnc should preserve this for you. Take a look at the GIT history of dcm2mnc and you will see a lot of commits around this from Bruce Pikes group. > 2. merge multiple DWI acquisitions for single subject Depends on what level. But no pre-canned methods in MINC that I know of for public download. > 3. perform registration of the DWI image to a structural scan (updating > directions) Not that I know of. But again, this depends on the method, are you correcting the raw data or the first order tensor approximation? if the raw data, I can't imagine this being too hard to do with a few judicious calls to minccalc, when doing this are you also planning on doing some form of mass preservation for nonlinear deformations? If so this can be achieved by using mincblob -determinant on the resulting field and multiplying the result with the resampled volume. But again, no pre-canned tool but something that could be simply scripted using python/perl. Jason will no doubt point you to pyminc! > 4. estimate a diffusion tensor The code I released for this many years ago when first order tensor approximations were all the rage (mincdti) is still there and works. Others have matlab toolboxes and other things around this, I don't know of a public release of these though. Perhaps they can chime in here. (Illana and Jennifer come to mind). > 5. export the DWI (and DTI) volume to other well-known formats (nifti > or NRRD mostly) for further processing. No idea on that one. > From my searching so far it looks like there is a toolkit[1] for MINC > that should do most of the above, but I'm not sure if it is a) still > maintained, or b) available to the public (seems one must have a BIC > username to check out the source?). There is also the mincdti > program[2] but I believe that only estimates a tensor. Correct, only a first order tensor, and then FA, ISO, etc from that. > What are my other options? With the minc integration into ITK are there > perhaps ITK-based toolkits you could recommend? ITK is probably a good vector. a