BIC-MNI / Display

MNI Display project, converted from CVS
Other
8 stars 4 forks source link

Feature Request: Loading of CSV and/or tabular vertex-wise data #40

Closed gdevenyi closed 8 years ago

gdevenyi commented 8 years ago

We often dump out a RMINC (or mni.vertex.statistics) data file consisting of t-values in columns for a number of predictors. In brain-view2, I can load the file and select which column to display on the surface. A similar feature in Display would be the nail in the coffin of brain-view2

rdvincent commented 8 years ago

@gdevenyi Simple enough to add. Can you provide some sample data?

gdevenyi commented 8 years ago

See email for

A mouse cortex surface model, and an output file from the R package mni.cortical.statistics

Other than the weird header (which I think is for brain-view) it's just a multi-column file with the number of columns the same as the number of vertices.

Ideally, the multi column support would handle this kind of file, as well as outputs from RMINC (which are identical except for the lack of a the header), as well as regular CSV.

It would be helpful to check the length of the vertex file and warn/error if they're a different length than the number of vertices.

rdvincent commented 8 years ago

@gdevenyi When you have a few minutes, take a look at the branch "rdv-vertex-data". This is a rough draft of the "real" vertex data support. I have been mostly testing it with the example file you sent, which had 21 columns for 9002 vertices, I believe. Here's what this version can do:

  1. For any selected surface, you can load a "vertex data" file from the File menu. The vertex data can be multi-column, separated with either tabs (with .tsv extension), commas (.csv), or spaces (anything else).
  2. The vertex data will colour-code the vertices of the surface. When first loaded, the first column will be used.
  3. A colour bar similar to the one used to manipulate the voxel colour coding will appear in the lower left corner of the 3d window. You can use this to adjust the upper and lower bounds of the colour coding. You can also shift-click in the top, center, or bottom of the colour bar to change the over colour, the colour coding type, or the under colour.
  4. Ctrl+V will display the next column - you can cycle through all the columns in this way.
  5. There are some new globals to set the default colour coding type (currently Spectral), the default under colour (currently Black), and the default over colour (currently White).

Feel free to check this out and see if it looks like it does most of what you need. My intent is that ultimately you should be able to load multiple surfaces, each with their own per-vertex data with independent colour coding, but this is not 100% there yet.

gdevenyi commented 8 years ago

The is great @rdvincent, it works exactly as expected. You have slain brain-view2, hurrah.

I tested the multi-object and it works pretty well, I had some bugs with the colourbar, which I'll discuss in #39

gdevenyi commented 8 years ago

Feature ideas for vertex-wise data: 1) Expose header names rather than "Column 1" 2) Provide an interface (similar to the object list) to graphically select column

rdvincent commented 8 years ago

Do you think it's worth copying the shift+click commands over to the slice view window?

gdevenyi commented 8 years ago

Absolutely, as a relatively newer user to Display, navigating the menus is a continual hide-and-seek to find what I want. Exposing things right on the views would help a lot.

gdevenyi commented 8 years ago

Implemented and works, will split out other issues.