Forum Replies Created

Viewing 6 posts - 226 through 231 (of 231 total)
  • Author
    Posts
  • in reply to: Analyze 7.5 #829
    Markus Stoeckli
    Moderator

    Writing files in Analyze format is extremely simple. Save your intensity data of the image point at the lower left corner to a file (*.img) as signed integers (16-bit) and append all the other points, row by row.

    The content of this file is specified by writing a header file (*.hdr). This is decribed in the [url=http://msi.stoeckli.net/forum/viewtopic.php?t=9]BioMap File Format[/url] topic.

    In order to get a mass scale in the plot window, a *.t2d file is required. Just write the m/z values as single precision floats (32-bit) to the file (just do it once, all the image points use the same m/z values).

    [b]And remember: [/b] No spaces in the file name (unix origin 🙁 ) and not more than 32768 data points in the spectrum…

    in reply to: Re: BioMap File Format #827
    Markus Stoeckli
    Moderator

    The format we are using is the Analyze (TM) 7.5 file format. It is extremely simple: the intensity data is written uncompressed in the binary format to the *.img file and the header file *.hdr specifies the content. The corresponding m/z values are saved as an array of single precision values in the *.t2m file (same for all the spectra in the image file) . We chose this format because its simplicity and because most clinical applications can import it. Below you find the type definition we used in the VB application.

    Best regards,

    Markus

    [code] Public Type uAnaHdr
    sizeof_hdr As Long ‘0+4’
    data_type As String * 10 ‘4+10′
    db_name As String * 18 ’14+18′
    extents As Long ’32+4′
    session_error As Integer ’36+2′
    regular As Byte ’38+1′
    hkey_un0 As Byte ’39+1’
    End Type ‘total 40 bytes’

    Public Type uAnaDim
    dims(7) As Integer ‘0+16′
    unused8 As Integer ’16+2′
    unused9 As Integer ’18+2′
    unused10 As Integer ’20+2′
    unused11 As Integer ’22+2′
    unused12 As Integer ’24+2′
    unused13 As Integer ’26+2′
    unused14 As Integer ’28+2′
    datatype As Integer ’30+2′
    bitpix As Integer ’32+2′
    dim_un0 As Integer ’34+2′
    pixdim(7) As Single ’36+32′
    vox_offset As Single ’68+4′
    funused1 As Single ’72+4′
    funused2 As Single ’76+4′
    funused3 As Single ’80+4′
    cal_max As Single ’84+4′
    cal_min As Single ’88+4′
    compressed As Single ’92+4′
    verified As Single ’96+4’
    glmax As Long ‘100+4’
    glmin As Long ‘104+4’
    End Type ‘total 108 bytes’

    Type uAnaHist
    descrip As String * 80 ‘0+80′
    aux_files As String * 24 ’80+24’
    orient As Byte ‘104+1’
    orginator As String * 10 ‘105+10’
    generated As String * 10 ‘115+10’
    scannum As String * 10 ‘125+10’
    patient_id As String * 10 ‘135+10’
    exp_date As String * 10 ‘145+10’
    exp_time As String * 10 ‘155+10’
    hist_un0 As String * 3 ‘165+3’
    views As Long ‘168+4’
    vols_added As Long ‘172+4’
    start_field As Long ‘176+4’
    field_skip As Long ‘180+4’
    omax As Long ‘184+4’
    omin As Long ‘188+4’
    smax As Long ‘192+4’
    smin As Long ‘196+4’
    End Type ‘total 200 bytes’

    Public Type uAnaDsr
    hk As uAnaHdr ‘0+40′
    dime As uAnaDim ’40+108’
    hist As uAnaHist ‘148+200’
    End Type ‘total 348 bytes’

    ‘Acceptable values for datatype

    Public Const DT_SIGNED_SHORT = 4
    Public Const DT_SIGNED_INT = 8
    Public Const DT_FLOAT = 16
    Public Const DT_DOUBLE = 64

    Public Sub WriteAnalyzeHeader()
    On Error Resume Next
    Dim ah As uAnaDsr
    ah.hk.sizeof_hdr = 348
    ah.hk.extents = 16384
    ah.hk.regular = Asc("r"«»)

    ah.dime.dims(0) = 4
    ah.dime.dims(1) = DPoints
    ah.dime.dims(2) = XPoints
    ah.dime.dims(3) = YPoints
    ah.dime.dims(4) = 1
    ah.dime.pixdim(0) = 1
    ah.dime.pixdim(1) = 1
    ah.dime.pixdim(1) = ImgXPoints
    ah.dime.pixdim(2) = 1
    ah.dime.pixdim(2) = ImgYPoints
    ah.dime.pixdim(3) = 1
    ah.dime.datatype = 4
    ah.dime.bitpix = 16
    End Sub[/code]

    in reply to: N parameter? #826
    Markus Stoeckli
    Moderator

    N is the scan number (data point number). By using the .t2m file this is converted into the corresponding m/z value.

    Markus

    in reply to: Image format #825
    Markus Stoeckli
    Moderator

    No. The Analyze format is fairly common and extremely simple so that you may write your own converter with little effort. Alternatively, you may extract the images in TIFF format using the export function in BioMap. Spectra can be exported from BioMap as ASCII files. These can be read by DE and other applications.

    Markus

    in reply to: 4700 Explorer Version #822
    Markus Stoeckli
    Moderator

    We have it working on version 2.0. As soon as we get a newer version of 4700 Explorer we’ll test it and adapt it if required.

    Regards,

    Markus

    [quote]What version of the 4700 Explorer is supported by the imaging tool?

    Thanks,

    Tom[/quote]

    in reply to: Data Explorer version with MMIST #821
    Markus Stoeckli
    Moderator

    I guess it will work on all the versions. We had it working on 4.3 and 4.5. As long as the same methods/properties are exposed in the COM interface of DE, everything should work well. If not, let us know an we’ll make it work…

    Cheers,

    Markus

    [quote]What version of DE is required to be used with MMIST? v4.1 or v4.3?

    Thanks,

    Tom[/quote]

Viewing 6 posts - 226 through 231 (of 231 total)