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

Some images of serie do not display the reference lines. #64

Open
sokmenserkan opened this issue May 22, 2023 · 3 comments
Open

Some images of serie do not display the reference lines. #64

sokmenserkan opened this issue May 22, 2023 · 3 comments

Comments

@sokmenserkan
Copy link

sokmenserkan commented May 22, 2023

Although I have tried the latest version, there is no reference line, but it works fine in Radiant Viewer.
There is no referenceLine in the first six images.
image

Files here:

reflineSample.zip

@IT-Highmore
Copy link

IT-Highmore commented Sep 26, 2023

I also have the same question. After some research, I found the key point , but I'm not sure if it's correct.

The code in cornerstoneMatch/src/Line3.js
if (s > 1.0 || isNaN(s)) { return; }

The code in cornerstoneTools/src/util/pointProjector.js

export function planePlaneIntersection(targetImagePlane, referenceImagePlane) {

...
...
 const intersections = lineRectangleIntersection(line, rect);
if (intersections.length !== 2) {
    return;
  }

  return {
    start: intersections[0],
    end: intersections[1],
  };
}

In some cases,s > 1.0 , intersections.length < 2, so reference lines don't show.
If you change 1.0 to 1.1,you reference lines might show.
but the algorithm requires that the value of s is between 0-1, so i don't know is this a solution?

At the same time I found another problem,In sometimes, There is some offset in the reference line.

1

The red line is the actual position which have a certain offset between the displayed green line when s < 0 or s > 1.
I'm not sure if there's something missing from the algorithm in function intersectLine or the originDirection is not quite right.
algorithm

Is there anyone tell me how to fix this or the reason? Thanks.

@IT-Highmore
Copy link

@ssMeta Have you solved the related issues?

@LukasSteinerDedalus
Copy link

@IT-Highmore we solved this issue in our fork of cornerstoneTools by replacing the lineRectangleIntersection in pointProjector with a 2D version of a line-axis aligned bounding box-intersection algorithm which works more robust. Please give it a try: cornerstonejs/cornerstoneTools@b26278c
Will try to contribute this to the original repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants