Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LUT handling #769

Open
KenanV opened this issue Aug 21, 2020 · 1 comment
Open

LUT handling #769

KenanV opened this issue Aug 21, 2020 · 1 comment
Labels
question Further information is requested
Milestone

Comments

@KenanV
Copy link

KenanV commented Aug 21, 2020

As far as I can see the DICOM Web Viewer does not handle LUT tables such as the attribute: (0028,3006)

When the attribute is read, it is done as a String and then a data.split is performed (dwv.js line: 4855)

    else
    {
        if ( vr === "SH" || vr === "LO" || vr === "ST" ||
            vr === "PN" || vr === "LT" || vr === "UT" ) {
            data = reader.readSpecialString( offset, vl );
        } else {
            data = reader.readString( offset, vl );
        }
        offset += vl;
        data = data.split("\\");
    }

I have made a change to the following:

    else
    {
        if ( vr === "SH" || vr === "LO" || vr === "ST" ||
            vr === "PN" || vr === "LT" || vr === "UT" ) {
            data = reader.readSpecialString( offset, vl );
            } else {
       
            if (tag.name == "x00283006") {
                data = reader.readInt16Array(offset, vl);
            } else {
                data = reader.readString(offset, vl);
            }
        }
        offset += vl;
        if (tag.name != "x00283006") {
            data = data.split("\\");
        }
    }

This works for my image, but there could be other cases where additional work would be required.

@ivmartel ivmartel added the question Further information is requested label Sep 1, 2020
@ivmartel ivmartel added this to the 0.28.0 milestone Sep 1, 2020
@ivmartel
Copy link
Owner

ivmartel commented Sep 1, 2020

You are right, dwv does not use the LUT module. As far as I get it, the LUT data type is set by the other LUT attributes.

If you have data you can share, that would be of great help!

@ivmartel ivmartel modified the milestones: 0.28.0, 0.29.0 Dec 19, 2020
@ivmartel ivmartel modified the milestones: 0.29.0, 0.30.0 May 25, 2021
@ivmartel ivmartel modified the milestones: 0.30.0, 0.31.0 Nov 30, 2021
@ivmartel ivmartel modified the milestones: 0.31.0, 0.33.0 Mar 17, 2022
@ivmartel ivmartel modified the milestones: 0.33.0, Future Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants