Front Page Forums BioMap Mapping mz values in t2m files to img intensities

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1301
    Matt Greving
    Participant

    I’m writing software to extract ion intensities for many thousand mz values from an MSI experiment.

    I don’t understand the mapping of the mz values in the t2m file to the intensities in the img file. When I load these files, the t2m file produces a vector with 82692 elements (mz values) but the dimensions of the img data are [17156, 326,213,1] (from the hdr file). I initially thought that the intensity dimension in the img data should have the same length as the vector contained in the t2m spectral data file. This doesn’t appear to be the case.

    How do I map a mz value in the t2m file, to the corresponding intensity data in the img data?

    I appreciate any help with this.

    #1304
    Markus Stoeckli
    Moderator

    If the t2m file contains valid data, the size should be 4 times the size of the data dimension, since the m/z values are stored as single precission floats.

    markus

    #1313
    Ralf Tautenhahn
    Participant

    I am having the same problem. I cannot find out the how to match the t2m to the image dimensions.
    The 4800 imaging tool was used.

    In my example, the filesize is
    10412992256

    Image dimension as reported by nifti-tools are:

    $ nifti_tool -disp_hdr -infiles img.hdr
    name offset nvals values
    ——————- —— —– ——
    ..
    dim 40 8 4 15250 424 152 1 0 0 0
    ..
    datatype 70 1 4

    The number of values int the t2m file is 80786 (file size 323144).

    So the number of values is the t2m is 80786/15250 = 5.297443 times higher than the data dimension.

    The datatype is 4 = signed short = 2 bytes
    According to the file size 10412992256 / (424 * 152) / 2 bytes = 80786

    So it looks like the data dimension is 80786 (and not 15250), which would make sense with the t2m file. I understand that dimensionfor the ANALYZE format is limited to 32768 and it therefore shows a different value in the header.

    But how can datatype 4,signed short, 2 bytes (2^16=65536) address 80786 m/z indices ?
    I guess, binning is used ?
    How can I find out the binning details (offset, bin size) ?

    Thank you for your help!

    Ralf.

    PS: Is there any plan to support imzML as an output format for the imaging tools ?
    That would be really helpful and get rid of all these limitations of the ANALYZE file format.

    #1314
    Markus Stoeckli
    Moderator

    [b]Ralf wrote:[/b]
    [quote]So it looks like the data dimension is 80786 (and not 15250), which would make sense with the t2m file. I understand that dimensionfor the ANALYZE format is limited to 32768 and it therefore shows a different value in the header.[/quote]

    Yes, your observation is correct. When importing in BioMap/TissueView, the routine checks for the file size and uses this to calculate the dimensions if it’s above 2^16. The import filter then allows to select a reduced mass range or to bin data points. This is annoying, but the MRI guys did not think that we’d ever need more values 😉 . This is one of the reasons why we came up with imzML.

    [quote]Is there any plan to support imzML as an output format for the imaging tools?[/quote]

    Yes, we are currently building a tool for the FlashQuant systems which will output imzML. This code might then be ported to the 4000 Series software, if there should be a demand…

    Markus

    #1315
    Kenneth Chan
    Participant

    Markus wrote:
    [quote]Yes, we are currently building a tool for the FlashQuant systems which will output imzML. This code might then be ported to the 4000 Series software, if there should be a demand…[/quote]
    demand! We actually consider FlashQuant for imaging, but didn’t have money + it will eat up time on our one and only 4000 trap. That said, we will have to port some of our ANALYZE codes:(

    KC

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.