Skip to content

add two new command lines option in mrview for tractogram#2290

Merged
jdtournier merged 3 commits intoMRtrix3:masterfrom
valeryozenne:branch_add_two_new_command_line_option
Mar 2, 2021
Merged

add two new command lines option in mrview for tractogram#2290
jdtournier merged 3 commits intoMRtrix3:masterfrom
valeryozenne:branch_add_two_new_command_line_option

Conversation

@valeryozenne
Copy link

@valeryozenne valeryozenne commented Feb 26, 2021

The pull request introduce two minor modifications of the command line of mrview related to the following discussion:

https://community.mrtrix.org/t/help-for-changing-the-colormap-of-tsf-file-in-command-line/4433
https://community.mrtrix.org/t/adding-command-line-option-to-mrview-to-set-tractography-colors/2453

  1. tractography.tsf_colourmap (allow to load a tsf file for each tractogram )
  2. tractography.colour (allow to specify the rgb value of the tractogram )

tractography.tsf_colourmap is working but the gui has not been updated
tractography.colour is half -working : if you load a second tractogram with a different color , the previous color is reset to the new one which make the option not so usefull.

The code is more a hack than a clean version. I would be interested in knowing the fix for my issue with tractography.colour

@jdtournier
Copy link
Member

Thanks for the contribution, @valeryozenne! Sorry I've been a bit slow off the mark - too much going on at the moment...

I've had a go at your branch, and it seems to me that your -tractography.colour works fine, at least in terms of setting the colour for a second tractogram? There was a glitch in the handling of colours in the [0,1) range, but that was easily fixed - see the changes on the mrview_add_two_new_command_line_option branch, and feel free to merge them into your pull request if you're happy with them.

For example, if I run this command:

./build bin/mrview && bin/mrview data/fa.nii -tractography.load data/CST_L.tck -tractography.colour 0,0,1 -tractography.load data/CST_R.tck -tractography.colour 1,0,0

this is what I get:
Screenshot from 2021-02-28 21-43-28
which is what I would have expected... (?)


Regarding your -tractography.tsf_colourmap option, I don't see a problem either - it all seems to work as expected? When you say the GUI has not been updated, are you talking about the colourmap shown on the button to change the colourmap? Because that button doesn't get updated when you change the colourmap, it always shows the hot colourmap. But when you click it, you can see that the correct colourmap is indeed showing as the selected one in the drop-down menu.

So as far as I can tell, it's more or less good to go (with minor fix I mentioned above)!

@valeryozenne
Copy link
Author

Thanks a lot, I merge your changes, and this is working. Best

@jdtournier
Copy link
Member

Good to hear. I'm guessing you'll now need to push your changes back to this pull request, and then mark it as not draft so we can merge it. 👍

@valeryozenne valeryozenne marked this pull request as ready for review March 2, 2021 11:33
@jdtournier jdtournier merged commit 534343d into MRtrix3:master Mar 2, 2021
@Lestropie
Copy link
Member

Hi @valeryozenne,

Any chance of updating your GitHub user account with a profile picture?
These appear both in the version changelog that we post on our community forum, and on the MRtrix3 website front page.

Cheers
Rob

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants