Git Product home page Git Product logo

Comments (11)

CYB3RL1F3 avatar CYB3RL1F3 commented on August 18, 2024 2

No effort then from the maintainers of the library

from cornerstone3d.

CYB3RL1F3 avatar CYB3RL1F3 commented on August 18, 2024 1

Personally & honestly I'm tired to try to fix this library while I don't have time for that and don't know this one as well as the official developers of this one. So, nop... Sorry... I'm tired! I prefer to stay stuck at the latest functional version instead of updating to a shit version!

from cornerstone3d.

Sanoj-thomas avatar Sanoj-thomas commented on August 18, 2024 1

@sedghi

Apologies for the delayed response.

While the error message may appear similar, the code snippet provided may not address the underlying cause of this bug. Also I am not certain about the steps that led to this issue.

However, I've created a new bug (#1270) that can be resolved using the proposed modification mentioned earlier. I'd appreciate it if you could review it and let me know your thoughts. If you agree with the modification, I can proceed to create a merge request.

from cornerstone3d.

sedghi avatar sedghi commented on August 18, 2024 1

@Sanoj-thomas I will check it in the other issue thanks

from cornerstone3d.

heyflynn avatar heyflynn commented on August 18, 2024 1

@Sanoj-thomas I will check it in the other issue thanks

Hi @sedghi,

I recently updated from 1.4x cornerstone and this bug breaks our implementation of cornerstone. The problem is in update 1.71.5 when getFrameOfReferenceId function was changed to include getImagePlaneReferenceData.

/**
* Returns the frame of reference UID, if the image doesn't have imagePlaneModule
* metadata, it returns undefined, otherwise, frameOfReferenceUID is returned.
* @returns frameOfReferenceUID : string representing frame of reference id
*/
public getFrameOfReferenceUID = (sliceIndex?: number): string =>
this.getImagePlaneReferenceData(sliceIndex)?.FrameOfReferenceUID;

The documentation indicates when an image doesn't have imagePlaneModule metadata, it returns undefined. This is not true anymore and breaks existing implementations.

  /**
   * Returns the frame of reference UID, if the image doesn't have imagePlaneModule
   * metadata, it returns undefined, otherwise, frameOfReferenceUID is returned.
   * @returns frameOfReferenceUID : string representing frame of reference id
   */

I created a pull request that checks if imagePlaneModule metadata exists and exits without trying to destructure an undefined imagePlaneModule.

#1291

if you have time, would you mind reviewing or providing feedback to get this issue resolved.

it should resolve this issue along with #1272 , #1270

from cornerstone3d.

canon-cmre-russell-hung avatar canon-cmre-russell-hung commented on August 18, 2024

Hi, I have the same issue, have you found a solution?

from cornerstone3d.

canon-cmre-russell-hung avatar canon-cmre-russell-hung commented on August 18, 2024

Thanks for the reply. Guess I'll stick to the lower version, hope that doesn't cause problems down the line.

from cornerstone3d.

sedghi avatar sedghi commented on August 18, 2024

You need to provide more info, screenshot, video or anything else other than (load dicom)

from cornerstone3d.

Sanoj-thomas avatar Sanoj-thomas commented on August 18, 2024

@sedghi
Could you please confirm whether we need a null/undefined check here .

Current code:

    const imagePlaneModule = metaData.get(MetadataModules.IMAGE_PLANE, imageId);
    const { imagePositionPatient, frameOfReferenceUID: FrameOfReferenceUID } = imagePlaneModule;

Modified code

    const imagePlaneModule = metaData.get(MetadataModules.IMAGE_PLANE, imageId);
    if(!imagePlaneModule){
        return;
    }
    const { imagePositionPatient, frameOfReferenceUID: FrameOfReferenceUID } = imagePlaneModule;

If somehow 'IMAGE_PLANE' metadata is missing while fetching the frameOfReferenceUID following error may be logged.

Cannot destructure property 'imagePositionPatient' of 'imagePlaneModule' as it is undefined.

Please confirm.

from cornerstone3d.

sedghi avatar sedghi commented on August 18, 2024

@Sanoj-thomas is this related to this issue number 1174?

from cornerstone3d.

sedghi avatar sedghi commented on August 18, 2024

Thanks @heyflynn I merged your PR, so I will close this issue

from cornerstone3d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.