BrownBiomechanics / SlicerAutoscoperM

This 3D Slicer extension enables users to perform image registration.
https://autoscoperm.slicer.org
MIT License
0 stars 3 forks source link

Transform Voxel Size Mismatch #56

Closed jdholt04 closed 3 months ago

jdholt04 commented 9 months ago

Transform output by pre-processing module is giving voxel and slice dimensions not shown in Slicer.

I have included screenshots showing the Volume information for the femur and tibia in Slicer as well as the transforms that were output. There is a scaling in the z-axis (1.599 vs 1).

@NicerNewerCar @amymmorton Fem_VolumeInfo Tib_VolumeInfo Fem_Transform Tib_Transform

NicerNewerCar commented 9 months ago

A couple of notes on the partial volume transform output.

@amymmorton Could you confirm that the desired transform should be of the form:

I can update the transform writer & PV loader to account for these changes.

amymmorton commented 9 months ago

The directionality is not significant- CT-> AUT vs AUT ->CT (as they are matrix transposes of each other ) As is is ok (documented in readthe docs https://autoscoper.readthedocs.io/en/latest/tutorials/pre-processing-module.html#partial-volume-cropping-and-extraction ?)

If a transform is required to load the tiff stack into slicer- (much like we need the resolution details in cfg file for autoscoper) perhaps we need two transform files output? What do you mean tiff stacks preserve x.y spacing? is there a pixel spacing metadata written into the tiffstack file? SIze of the tiff stack should be a subvolume of voxels from original dicom

On Mon, Sep 25, 2023 at 4:16 PM Anthony Lombardi @.***> wrote:

A couple of notes on the partial volume transform output.

  • These transforms are in the form Autoscoper -> CT
  • Since TIFF stacks don't preserve Z-spacing (just X and Y) this needs to be accounted for when we want to load the volumes back into Slicer.
    • Although I am not sure why we aren't seeing the correct Z-spacing -> currently investigating this.

@amymmorton https://github.com/amymmorton Could you confirm that the desired transform should be of the form:

  • CT -> Autoscoper
  • 1.0 uniform scaling

I can update the transform writer & PV loader to account for these changes.

— Reply to this email directly, view it on GitHub https://github.com/BrownBiomechanics/SlicerAutoscoperM/issues/56#issuecomment-1734402251, or unsubscribe https://github.com/notifications/unsubscribe-auth/APUUPFUPLKOPRALLV2V3XTLX4HRDRANCNFSM6AAAAAA5GUBQ2Y . You are receiving this because you were mentioned.Message ID: @.***>

--

Amy Morton, MSc

Sr. Research Engineer, Bioengineering Lab, Department of Orthopaedic Research The Warren Alpert Medical School of Brown University and Rhode Island Hospital 1 Hoppin Street, CORO West, Ste. 404, Providence, RI 02903

NicerNewerCar commented 9 months ago

What do you mean tiff stacks preserve x.y spacing? is there a pixel spacing metadata written into the tiffstack file?

Yes exactly, if you think about the TIFF stacks as a set of z 2d images, each 2d image has pixel spacing metadata. However there is no z-direction pixel spacing metadata.

amymmorton commented 5 months ago

suggestion: save tiff as 1:1:1 voxels and retain all spatial transform in tfm file.

This is causing me some issues in 3d ct post processing

amymmorton commented 3 months ago

@NicerNewerCar , The spatial reference into .tfm (and out of tiff) image changes are not available in slicer 5.6.1 V9950058(2024-03-29)

@jdholt04 is trying to do some partial volume processing and requires this commit in main. Could you please push / confirm?