c3d -divide command inconsistencies

44 views
Skip to first unread message

Mohammad Ghorbani

unread,
Dec 4, 2024, 5:21:16 AM12/4/24
to itksnap-users

Dear Experts,

I encountered unexpected behavior with the -divide command in c3d. As per the documentation, this command should perform element-wise division of two images. However, when dividing Inphase.nii by opposite_phase.nii using:

Inphase.nii opposite_phase.nii -divide -o ratio.nii

The resulting ratio.nii values correspond to opposite_phase.nii / Inphase.nii rather than the expected Inphase.nii / opposite_phase.nii.

I reviewed the c3d manual, which confirms the command should perform division as expected. To reproduce:

  1. Use Inphase.nii and opposite_phase.nii.
  2. Run the above command.
  3. Verify ratio.nii pixel values are reversed.

I’ve attached the images for your reference.

Best regards,
Mohammad

mohammad ghorbani

unread,
Dec 4, 2024, 5:25:18 AM12/4/24
to itksnap-users
IP.nii.gz

mohammad ghorbani

unread,
Dec 4, 2024, 5:26:41 AM12/4/24
to itksnap-users
OP.nii.gz

mohammad ghorbani

unread,
Dec 4, 2024, 5:36:14 AM12/4/24
to itksnap-users
ratio.nii.gz

mohammad ghorbani

unread,
Dec 4, 2024, 5:36:41 AM12/4/24
to itksnap-users
  Since it wasn’t possible to upload all the images at once, I uploaded each one separately  
Reply all
Reply to author
Forward
0 new messages