The Final Weeks

These final weeks were mostly filled with bug fixes and improvements in my previous PRs.

Color Picker

I completed the Color Picker I talked about in the previous post. It is a rectangular color picker based on the HSV model.

It consists of a vertical bar that selects the hue and a square that selects the saturation and value for the selected hue. The horizontal direction of the square corresponds to saturation and the vertical axis to value.
There is a small ring inside the square to track the colors selected. The colors in the square get updated whenever the hue is changed.

The code for this can be found at https://github.com/nipy/dipy/pull/1615.

The Final Challenge

I was given a final task by my mentors which directly deals with brain images. For the tractogram images being generated by DIPY, I was asked to make an ROI (Region of Interest), that could filter the streamlines in the tractogram to show only those that pass through the ROI (something similar to https://vimeo.com/17680190). Tractograms can be generated using the code provided at https://github.com/nipy/dipy/blob/master/doc/examples/viz_advanced.py.

This task involves two features:

  • Filtering the streamlines to show only those that pass through the ROI.
  • Allowing the user to move and distort the ROI in real time.

For filtering polydata, vtk provides a number of filters. I looked at two of them.

  1.  vtkIntersectionPolyDataFilter: This filter takes two vtkPolyData objects and produces the intersection of the polydatas.
  2. vtkSelectEnclosedPoints: This filter takes an array of points and the polydata of a surface, and evaluates all the input points to determine whether they are enclosed by the surface. The filter produces a (0,1) mask that indicates whether points are outside (mask value=0) or inside (mask value=1) the provided surface.

This is a work in progress and there seems to be some issues in these filters. I plan to continue working on this and many other things after the GSOC period ends.

Leave a Reply

Your email address will not be published. Required fields are marked *