enthought / ensemble

High-level widgets for building Python applications
Other
4 stars 7 forks source link

Filtering 3D viewer: phase 1 #46

Open pberkes opened 9 years ago

pberkes commented 9 years ago

We need to add a "Color by:" dropbox on the histogram that controls what is displayed in the histogram and the 3D viewer. By default, the dropbox is going to contain "CT" (i.e., the original data).

Values in the dropbox are given by a list of Filter objects that have a name (to be displayed in the dropbox) and a function, filter, that takes the 3D volume data and return a new 3D array with the same shape and potentially new data.

The output of the Filter object is used to compute a new histogram, and to update the content of the 3D view.

Things we need to care about:

jwiggins commented 9 years ago

Can this be thought of as a generalization of the volume masking feature?

dmsurti commented 9 years ago

@pberkes The implementation details have changed. Please refer to https://github.com/enthought/ensemble/pull/48.

We have a VolumeFilter class which has a filter method to transform the volume data's raw_data.

VolumeData has a VolumeFilter instance, which when set will apply the transform on the `raw_data1.

pberkes commented 9 years ago

@jwiggins it could, but we will want to filter (including transforming the values) and mask (e.g. with the cylindrical mask) at the same time

dmsurti commented 9 years ago

@jwiggins @pberkes Looking at _prepare_data (https://github.com/enthought/ensemble/blob/add-data-filters/ensemble/volren/volume_data.py#L143), this could be the possible refactors:

Also the above refactors seem to point to VolumeFilter as just a data transformation filter, more suitably named DataFilter if one were to implement as above.

OTOH, I think all this is an overkill? Thoughts?

pberkes commented 9 years ago

While I see the appeal of having a whole visualization pipeline, I do think that it would be overkill given what we are trying to accomplish: given resampled, masked data, we want the user to be able to use different filters to color the result.

jwiggins commented 9 years ago

What do you mean by "color the result"? The color is being generated by the transfer function.

pberkes commented 9 years ago

Bad wording: what I mean is that the content of the histogram and the displayed values are from the filtered data.