Hi, everyone, I have been using the CPR method in my project but I got some problem of its inverse. According to the document, the transformation is invertible when there is no self-cross. But the curve I want to process will cause this problem. I am wondering if there is some way to solve this problem?
I have tryed to modity the curved factors and the slicer spacing, but it seems the matrix is still not invertible. Since the forward transformation perform well even encounting the intercross of slices, if there any possibility to create a inverse displacement transformation rather than use the invert. I try to do this, but find that the forward transformation uses a sparse matrix for tranformation with a shape like (n,2,2) controling the corner of each slice. But this seems not applicable for the inverse tranformation.
Is there any possible solution I can try with to solve this problem? Thanks.
I have make some progress, I am not quite familar with 3d Slicer but getting used to it. When I apply the Invert, which is a vtkGridTransfotm as used in the CPR methods, it show in 3d formate correct but went wrong when I want to harden it. Why such problem will happen?
I think the general problem is that crossing planes in CPR creates a one-to-many mapping (a voxel location at the intersection of two slicing planes ends up present on two different slices in the reformat), but such a transformation is not smoothly invertible. The inverse would be many-to-one, which is problematic. I imagine there may be ways people have tried to work around this, but I think this is why there isn’t an easy/obvious general solution.
The CPR transforms are typically invertible over a defined area, such as close to the centerline but then become singular as you get further away (i.e. you are good at the teeth but not at the center of the tongue).
@mikebind and @pieper are exactly right. I’ve also explained this in detail, with illustrations, with description of what parameters to change to avoid the ambiguous mapping in the module’s documentation.
Thank you all for your kind replies and valuable insights.
I have already adjusted the parameters, but I am still encountering the issue. Since I am working with the colon, which has a highly curved and complex structure, the problem during the inverse transformation seems inevitable.
I have come up with a possible method, although I am not entirely sure if it is correct. I process the cpr slice by slice, ensuring the transformation is invertible at each slice (although this may slightly affect the quality by adjusting the slice corners). I found that, in some cases, this approach allows the inverse transformation to correctly align with the ground truth in 3D display.
However, the problem arises when I try to harden the transform: the corrected structure disappears. In my current method, I try to fix the problem within each individual slice, the transform is a vtkGridTransform with a shape of (2,2,2,3). I suspect this is due to many-to-one causing the harden incorrect, since before the harden it is still connect with the transform but resampling will be done after the harden.
Does anyone have experience with this kind of issue or insights into why the hardening step might cause the corrected volume become wrong? The two images is the inverse transform before the harden which seem correct.
Ambiguity in the displacement field can be always avoided by modifying the two parameters as described in the module documentation.
It should be no problem at all to compute inverse for the colon, as long as you keep the slice size small enough. There is no need for guessing, if you visualize the displacement field as described in the module documentation then you can see exactly what’s happening in your grid transform.
When you harden a transform, the extents of the transformed volume is computed based on sparse sampling on the volume’s bounding box. In this very special case this sparse sampling may not end up capturing the entire volume extent, so you may need to do the resampling manually using Resample Scalar/Vector/DWI Volume module, using the original CT as reference volume.
Hi, I also have a problem with the inverse of the CPR. I’m measuring muscles along the cervical spine of horses and because I can’t align the anatomy with the scan, my segmentations end up in multiple slices making them inaccurate and jagged. My solution to this was to use CPR and do the segmentation and then I wanted to reverse the CPR it so I can use it for an AI learning system. My problem is that I can’t reverse the CPR. The lines are not crossing, it’s only a slight curve.
@Mimi1 You can fix the inversion problem by reducing the Slice size and/or slightly increase the Curve resolution value. If you still have any issues then please post some more details, screenshots, and visualization of the deformed grid in slice and 3D views as shown in the module documentation.