[MINC-users] dynamic masking problem

Christopher Bailey cjb@pet.auh.dk
Wed Oct 27 04:01:06 2004


Thank you Andrew,

mincmath -copy_header ...

did it. Changing the order in the multiplication didn't, which is not so
surprising, since I did manage to give the 4D mask file the same time
coordinates as the dynamic (with mincconcat). So the mincmath -mult of 2
files with identical time and time-width variables generates a file with
time-width missing... Strange.

Anyhoot, I'm happy with -copy_header, thanks again!

-Chris



On Tue, 2004-10-26 at 15:57, Andrew Janke wrote:
> 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