javascriptpapaya

Papaya Dicom viewer slices are showing reverse order


I'm creating the viewer for medical images.

In papaya array loading like this,

    var dcmImages = [[
        "MR.1.2.840.113619.2.244.3596.11861950.26703.1468828230.740", 
        "MR.1.2.840.113619.2.244.3596.11861950.26703.1468828230.741", 
        "MR.1.2.840.113619.2.244.3596.11861950.26703.1468828230.742", 
        "MR.1.2.840.113619.2.244.3596.11861950.26703.1468828230.743", 
        "MR.1.2.840.113619.2.244.3596.11861950.26703.1468828230.744", 
        "MR.1.2.840.113619.2.244.3596.11861950.26703.1468828230.745", 
        "MR.1.2.840.113619.2.244.3596.11861950.26703.1468828230.746", 
        "MR.1.2.840.113619.2.244.3596.11861950.26703.1468828230.747", 
        "MR.1.2.840.113619.2.244.3596.11861950.26703.1468828230.748", 
        "MR.1.2.840.113619.2.244.3596.11861950.26703.1468828230.749", 
        "MR.1.2.840.113619.2.244.3596.11861950.26703.1468828230.750", 
        "MR.1.2.840.113619.2.244.3596.11861950.26703.1468828230.751", 
        "MR.1.2.840.113619.2.244.3596.11861950.26703.1468828230.752", 
        "MR.1.2.840.113619.2.244.3596.11861950.26703.1468828230.753", 
        "MR.1.2.840.113619.2.244.3596.11861950.26703.1468828230.754", 
        "MR.1.2.840.113619.2.244.3596.11861950.26703.1468828230.755", 
    ]];

   params["images"] = dcmImages;

The problem is slices are showing in reverse order.

In papaya Dicom viewer, If the images are not ordered also they are making the order.

What I want is,

How I defined array format('.740','.741','.742','.743'), same like that images should shown in my viewer.

Thanks


Solution

  • The order of the images you specify doesn't matter. It will order them according to their metadata. You could randomize the order of the specified files and get the same outcome.

    However, I can understand if you have a preference for the direction sense of each dimension, how they are displayed on screen. If these happen to be sagittal slices and they are flipped L-R, you can use the radiological option (it defaults to false). See: https://github.com/rii-mango/Papaya/wiki/Configuration#display-parameters

    For the other two dimensions, it just seemed normal to display superior or anterior slices on top -- there's less ambiguity like L-R. But I can understand the need for an option to set a preference for the direction of any dimension. If that's what you want, please make a feature request.

    It also seems reasonable to create an option to use an explicit order instead of basing it on the metadata -- though the issue with the direction sense would still apply in that case. I would create a feature request for explicit ordering also, if that's what you need.