[MINC-users] dynamic masking problem

Andrew Janke rotor@iinet.net.au
Thu Oct 28 17:10:04 2004


On Tue, 26 Oct 2004, Christopher Bailey wrote:

> mincmath (v. 1.2) is behaving badly (towards me, anyway). Attached is a
> perl script that compiles fine and does what it's supposed to do: Take
> in a 3D mask and a dynamic (PET) file, concatenate the 3D mask to 4D
> (duplicate), use to mask the dynamic file. I take the (irregular) times
> and time-widths from the dynamic and give them to mincconcat, no
> problem. The 4D mask has exactly the same dimensions and coordinates as
> the dynamic file.
>
> I then give the new 4D mask and dynamic file to mincmath for
> multiplication. Everything goes fine, a file is produced that looks
> exactly as expected. My problem is that the time-width field doesn't
> appear in the outputted masked image. The time does, and is correct
> (same as dynamic). Where could it dissappear in the mincmath:ing?

Chris,

I think you need to change this line (near the end of your script) from

    $cmd = "mincmath $outtype -mult $tempname $dynamic $outname -clobber";

to

    $cmd = "mincmath $outtype -mult $dynamic $tempname $outname -clobber";

What is copied of the header is taken from the first file on the C/L.  To 
include the irregular time widths, you may need to add a -copy_header to the 
mincmath command.  (see man mincmath for the details.)

--
Andrew Janke (andrew_janke@iinet.net DOT au || www.cmr.uq.edu.au/~rotor) 
Australia->Brisbane            H: +61 7 3879 0374  || M: +61 4 2138 8581