New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrating the support for the visualization in Affine registration #1594

Closed
wants to merge 21 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@parichit
Copy link
Contributor

parichit commented Jul 24, 2018

Opening the PR for the experimental visualization branch.

It currently supports,

  1. Creating the mosaic for visualizing the superimposed images.
  2. Creating a GIF animation for visualizing the progress of image registration dynamically.

Note: These additions will complement the other quantitative quality assessment measures developed for this workflow.

Future Work

  1. The GIF animation is currently experimental and therefore is integrated as a potential Proof of concept.
  2. The quality of the GIF animation needs improvement, currently, this is limited by the conventions of the GIF standard (within the context of brain images used in DIPY).

Parichit Sharma and others added some commits Jun 18, 2018

Parichit Sharma
Added the image registration workflow to the align.py and test_align.py
Since the image registration forms the part of alignment so the image registration workflow is added to the align class.

1) Added the ImageRegistrationWorkflow Class to the align.py file.
Parichit Sharma
Added a command line wrapper for the Image Registration workflow.
1) Created the separate command line script for the Image Registration workflow.
Parichit Sharma
Workflow for applying the transform on a set of images.
1)Added the function to load the saved affine matrix that needs to be applied.

2) Added the import for scipy.ndimage in the test_parzenhist.py file.

3) Added the apply_transform workflow to apply the transform.
Parichit Sharma
Added the reporting of quality metric values.
1) The distance between the images after registration is reported.
2) The metric of optiaml parameters is reported during the workflow.
3) The quality assurance metric can be saved optionally by the user.

4) Tested the workflows on simulated (coronal slice dataset) and real datasets (stanford hardi).
Parichit Sharma
Added a function for producing aligned images in align.py.
1) An image containing the slices from static and moving images with different colur channel
is produced.
Parichit Sharma
Testing with different visualisation outputs.
1) Created a function for playing the png of slices after registration.
2) Testing the conversion between the VTK and numpy format.
Parichit Sharma
Modified the code to create animation in correct orientation.
1) Renamed the functions properly.
2) Orientation is corrected by extracting the individual slices slices.
3) Animation is done using the Matplotlib's native functionality.

Future Work
1) Try to create the animation for different views (saggittal and coronal)
2) Try to create a grid of animated plots showing the registration progress in different views.
Parichit Sharma
Updated the functions for producing the mosaic and animations with ge…
…neral parameters.

1) Removed the hard coded values (from earlier testing).
2) Made the code more generalized to accept the parameters from the user.
3) Slightly, modified the overlay_slices routine (from regtools.py) to return the
apprpriate slice to be used in the animation.
Parichit Sharma
Commit for the stable version of the visualisation code
List of changes

1) An additional function(s) are integrated with the affine registration worklfow.
2) The creation of mosaic is separate from the creation of the GIF animation.
3) The animation creation is currently experimental with additional support for the
animating the slices in different planes.
4) The workflow is made generic to handle user requests by providing command line parameters.
@pep8speaks

This comment has been minimized.

Copy link

pep8speaks commented Jul 24, 2018

Hello @parichit, Thank you for updating !

Line 634:1: E402 module level import not at top of file

Comment last updated on July 24, 2018 at 23:33 Hours UTC
Parichit Sharma
Modifications:
1) Copied changes from the files (local files on the system, not part of the branch) to the align.py file.
2) Updated the options for selecting a specific type of slice from indixes to strings (for user=friendliness).
3) Added another function (still under experimentation) to use the renderer for creating the animation.
4) Checked the correct orientation when creating the animation via the renderer.
5) Made minor change to the native window.py file to renturn the array if filename is None. This saves
extra processing in creating and handling the VTK writer object.
@parichit

This comment has been minimized.

Copy link
Contributor

parichit commented Jul 24, 2018

The modules for the visualization need to be isolated into a separate workflow. I will close this PR and open a different one with a new workflow that only visualization modules.

@parichit parichit closed this Jul 25, 2018

@parichit

This comment has been minimized.

Copy link
Contributor

parichit commented Jul 25, 2018

Moving all the visualization related modules to the visualisation_modules branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment