Some images of serie do not display the reference lines.
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.
Files here:
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.
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.
@ssMeta Have you solved the related issues?
@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: https://github.com/cornerstonejs/cornerstoneTools/commit/b26278c0f7c6c4be37b53eb0eb7ba25ba6edb25a Will try to contribute this to the original repo