简体   繁体   中英

How to get the value with VR=FL, VM=2 in Evil DICOM

I tried to get the Tag value by using: var vSAD = sel.VirtualSourceAxisDistance.Data; I also tried var vSAD = dcm.FindAll("300A030A"); And it only returned one number (suppose to have 2).

Then I tried to read elements and save to another dicom file only and found for VR=FL , VM=2 case only one number showed up in the new file. How can I fix this to get 2 numbers? Does it mean when I use var dcm = DICOMFileReader.Read(openFileDialog1.FileName); It already return with only one number?

I saw in the FloatingPiontSingle.cs file:

public class FloatingPointSingle : AbstractElement<float?>
{
    public FloatingPointSingle() { }

    public FloatingPointSingle(Tag tag, float? data)
    {
        Tag = tag;
        Data = data;
        VR = Enums.VR.FloatingPointSingle;
    }
}

I didn't realize the FL VM could be more than one. I just looked at the DICOM specification though and realize that it is possible. It is actually an easy fix. Could you post a link to a sample (anonymized) DICOM file that contains such a value and I will patch the core framework.

FYI: To patch yourself, you would need to change the FloatingPointSingle to:

public class FloatingPointSingle : AbstractElement<float[]>
{
    public FloatingPointSingle() { }

    public FloatingPointSingle(Tag tag, float[] data)
    {    
        Tag = tag;
        Data = data;
        VR = Enums.VR.FloatingPointSingle;
    }
}

Then in the LittleEndianReader.ReadSinglePrecision() , and BigEndianReader.ReadSinglePrecision() method you will need to change out the logic to allow concatenated floating point numbers (no delimiter).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM