[MINC-users] using pyminc to convert a philips/ugm file

Jason Lerch jason at phenogenomics.ca
Sun Sep 18 11:50:33 EDT 2011


I've never tried this with pyminc, and never had the occasion to given the data I use. It should be quite doable though, and if it isn't then it's a bug to be fixed. Could you make a (ideally small) volume accessible that shows the outcome you would like and maybe provide some pseudo-code describing how you would like to create that kind of a volume in pyminc?

Thanks!

Jason

On 2011-09-16, at 12:57 AM, Graeme O'Keefe wrote:

> thanks Andrew,
> 
> for now, my workaround is to use rawtominc.
> 
> ie. something like this.
> 
> cat p2151s0_VAL_PIBdy28.raw | rawtominc -float -ofloat -xstep 2 -ystep 2 -zstep 2 -xstart -128 -ystart -128 -zstart -45 p2151s0_VAL_PIBdy28.mnc 28 90 128 128 -frame_widths "30,30,30,30,60,60,60,60,60,60,60,60,60,180,180,180,300,300,300,300,300,300,300,300,300,300,600,600" -frame_times "0,30,60,90,120,180,240,300,360,420,480,540,600,660,840,1020,1200,1500,1800,2100,2400,2700,3000,3300,3600,3900,4200,4800"
> 
> regards,
> 
> Graeme
> 
> On 15/09/2011, at 10:52 AM, Andrew Janke wrote:
> 
>> Hi Graeme,
>> 
>> On 14 September 2011 21:25, Graeme O'Keefe
>> <graeme.okeefe at petnm.unimelb.edu.au> wrote:
>>> I'm trying to use pyminc to convert a dynamic PET scan in Philips format (UGM) to minc2.
>>> 
>>> The time-step is not constant.
>>> 
>>> Would anyone be able to tell me how I would save a "tspace" vector containing the times of each frame using volumeFromDescription?
>> 
>> I can't answer for pyminc but see you don't have an answer yet the
>> pyminc types so in the meantime this might work for you as a hack
>> solution via a system() call. From the command line you would do this:
>> 
>>  mincinfo -varvalue time out.mnc
>> 
>> This will return a newline separated vector, providing that
>> 
>>  mincinfo -attvalue time:spacing out.mnc
>> 
>> returns 'irregular'.
>> 
>> 
>> 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



More information about the MINC-users mailing list