OpenHeartDevelopers / CemrgApp

An Interactive Medical Imaging Platform with Image Processing and Computer Vision Toolkits for Cardiovascular Research.
http://www.cemrgapp.com
BSD 3-Clause "New" or "Revised" License
18 stars 8 forks source link

Motion Quantification: Apply transform not working #61

Closed angela337 closed 10 months ago

angela337 commented 2 years ago

Prerequisites

Put an X between the brackets (without spaces [X]) on the following lines if you have done all of the following:

Description

Motion Quantification -> Step 5 Tracking -> Apply transform gives a wonky mesh up to time point 5, then stays static (out of 25 frames) The algorithm only works when you have run "Compute Deform" with the input imgTimes.lst in the following format.

dcm- .nii
0 0
1 10

For instance when your format is as follows, it assumes the time points increment in steps of 10 and then does the transform-point step wrong.

dcm- .nii
0 0
1 1

Steps to Reproduce

  1. Motion Quantification Pipeline -> Step 5: Tracking -> Compute Deform. Input imgTimes.lst file in the following format
    dcm- .nii
    0 0
    1 1
    2 2
    3 3
  2. Motion Quantification Pipeline -> Step 5: Tracking -> Apply Transform.

Expected behaviour:

Track the mesh according to the image registration across the given time frames (25) The command that should be called:
CemrgApp-Linux/bin/MLib/transform-points ${PROJECT_DIR}/LA0_smoothed_flip.vtk ${PROJECT_DIR}/transformed-1.vtk -dofin ${PROJECT_DIR}/tsffd.dof -ascii -St 1 -verbose 3 Actual behavior:

Gives a wonky mesh up to frame 7, then the mesh stops tracking. Command that is actually being called CemrgApp-Linux/bin/MLib/transform-points ${PROJECT_DIR}/LA0_smoothed_flip.vtk ${PROJECT_DIR}/transformed-1.vtk -dofin ${PROJECT_DIR}/tsffd.dof -ascii -St 10 -verbose 3

Reproduces how often:

100%

Additional Information

Given that the imgTimes.lst is used to "Compute Deform", shouldn't this same file also be given in the "Apply Transform" step. This would also be important in getting CemrgApp to work when you input a non-zero initial time, so that the time would loop back round.

angela337 commented 10 months ago

Solution:

In CemrgApp, if you don't enter in a path to an imgTimes.lst file, it will generate one automatically where the time points are multiplied by 10:

dcm- .nii
0 0
1 10
2 20

So either input an imgTimes.lst file where the time points are multiplied by 10, or just use the default one that gets generated automatically in the Motion Quantification pipeline: Step 5: Tracking -> Compute Deform -> Set Values. Just click "OK" to automatically generate the needed files.