I saw the ImageCPRMapper example vtk.js
The example uses vtkHttpDataSetReader, and I converted the data through itk’s readImageDICOMFileSeries and convertItkToVtkImage, but it cannot be rendered.The problem is that reader.getOutputPort() is used here.
You might want to check the content of the read image data.
Maybe the problem does not come from the ImageCPRMapper.
One way to check is to pipe it with a vtkXMLImageDataWriter to see what it writes.
After trying multiple image sequences, I found that the same examination type is CT, the torso part, why some sequences can be rendered, while some sequences are rendered with offset positions, and cannot achieve the example effect? I converted the data through itk without any processing, and MPR can render normally. I believe that there should be no problem with data conversion. What is the reason why some images are not rendered at all and the positions are changed? Do I need to set any parameters separately? Or is there something wrong with my dicom image? I can’t render CPR normally, and no errors are thrown. I want help
The CPR of these 150 images did not render anything, but the MPR rendered normally.
The position in the world of the CPR is abritrary. This is because you display on a place something that is not planar in the real world (i.e. a spline).
If I remember correctly, the CPR mapper was rendering the output plane at the origin (0,0,0).
You can apply a transform to the associated actor if you want it elsewhere. You might want to look at the example.
Hello, I’m here to ask again. I’ve set the coordinates of the source point through the data converted by itk.js.
imageData.setOrigin([0,0,0]);
After that, the image is loaded, but the image effect is not as good as the ImageCPRMapper example. 1. The aorta and spine are not displayed; 2. The image is reversed, the head should be on top, and the CPR thumbnail is not rendered according to the original orientation of the image.
I just copied the example code and did not modify the rendering logic. I just changed the vtkImage data source. What should I do? Can the .vti file in the example be rendered? Can the vti file be processed and used directly? Do I need to do anything with the data after itk converts the data?
I also tried to set actor.setUserMatrix, but it didn’t work very well. Please help me,Thanks again
Are the two json files aorta_centerline.json and spine_centerline.json used for all images, or does each image need to calculate its own centerline coordinate points? How should I calculate the centerline coordinate points of the aorta and spine?
You need a tool that let’s you know what are the coordinates of a point under the mouse cursor.
You can typically do that with the VTK.js pickers or you can do it with third-party software. We used 3D Slicer to find the point coordinates in an image (warning, there might be some X,Y coordinate switch in Slicer)
Hello Julien.
I may not have described the clearing correctly, what I want to ask is whether these two json files are applicable to all patients’ images?
Those files work only with the volume from the example.
If you want to display a different volume, you need to create your own JSon file. To do so, you need to follow the technique I mentionned in my previous post.
Thank you for your reply. I currently use vtkPaintWidget to draw lines or points on the sagittal plane to obtain the coordinate points of the spine, and then give them to centerline. The spine can be reconstructed normally, but I feel that the operation of the CPR reconstruction function is a bit cumbersome. Can I get the position coordinate points of the spine and aorta through calculation?