Git Product home page Git Product logo

Comments (16)

sedghi avatar sedghi commented on July 18, 2024 1

I tried that example and it worked locally now
Based on your error it is complaining that the init on crosshairs has not been called, which is called on active, passive, enabled modes. Maybe put a debugger at init and debug line by line to see if the toolCenter is calculated

from cornerstone3d.

sedghi avatar sedghi commented on July 18, 2024

@Celian-abd Which example are you trying to run?

from cornerstone3d.

Celian-abd avatar Celian-abd commented on July 18, 2024

I am trying the crossHairs one.

https://github.com/cornerstonejs/cornerstone3D-beta/blob/main/packages/tools/examples/crossHairs/index.ts

from cornerstone3d.

Celian-abd avatar Celian-abd commented on July 18, 2024

When I log my crosshairtool object in the console I can see the toolCenter with coordinates that are the same as my image center coordinates.

from cornerstone3d.

sedghi avatar sedghi commented on July 18, 2024

So does it actually get inside the init function? Can you provide the source code you are using?

from cornerstone3d.

Celian-abd avatar Celian-abd commented on July 18, 2024

So here you have the main code where I create the toolgroup and add it all the tools : https://github.com/Pixilib/Dat_Scan_Viewer/blob/main/datscan/src/components/ViewerVolumeRoot.js#L100

And here is my component where I activate the CrossHair : https://github.com/Pixilib/Dat_Scan_Viewer/blob/main/datscan/src/components/tools/coordsOnCursor.js#L247

from cornerstone3d.

sedghi avatar sedghi commented on July 18, 2024

you should do the toolInit before adding tools https://github.com/Pixilib/Dat_Scan_Viewer/blob/main/datscan/src/components/ViewerVolumeRoot.js#L107

from cornerstone3d.

Celian-abd avatar Celian-abd commented on July 18, 2024

Yes this was only a test, but initially the Toolinit was before adding tools and the error was the same.

from cornerstone3d.

Celian-abd avatar Celian-abd commented on July 18, 2024

I've updated my code
https://github.com/Pixilib/Dat_Scan_Viewer/blob/main/datscan/src/components/ViewerVolumeRoot.js#L99

Changing slice thickness with the crosshair is working but not rotating.

from cornerstone3d.

sedghi avatar sedghi commented on July 18, 2024

what is the recipe for running your app (project)?

from cornerstone3d.

salimkanoun avatar salimkanoun commented on July 18, 2024

Hi Alireza, it is a simple Create-React-App,
from the repository go to "datscan" folder and then npm install and npm start.

in the opening webpage you will have a drop zone to drop you dicom files to load them in the volume viewer.

thanks for you help,

Salim

from cornerstone3d.

sedghi avatar sedghi commented on July 18, 2024

@Celian-abd Is there any specific reason you are using the /dist/esm for the imports? The bundler should automatically use that and you don't need to directly import from each folder

from cornerstone3d.

Celian-abd avatar Celian-abd commented on July 18, 2024

@sedghi No specific reason, I was using a VS Code extension to automatically import but it was indeed a mistake. I just cleaned all the imports.

Code : https://github.com/Pixilib/Dat_Scan_Viewer/blob/main/datscan/src/components/ViewerVolumeRoot.js

Still did'nt find how to fix the rotation though.

from cornerstone3d.

sedghi avatar sedghi commented on July 18, 2024

I think you are not setToolEnable for crosshairs here https://github.com/Pixilib/Dat_Scan_Viewer/blob/main/datscan/src/components/ViewerVolumeRoot.js#L207

I have more time later in the week to run your code.
On a separate note, the createAndCache does not load the volume, it just allocated memory, so I don't think you should add your segmentation for

from cornerstone3d.

Celian-abd avatar Celian-abd commented on July 18, 2024

I've already tried to setToolEnable before setToolActive but the result is the same.

from cornerstone3d.

Celian-abd avatar Celian-abd commented on July 18, 2024

Solve with lastest version.

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.