modifying save_h3view_image visualisation by command line

60 views
Skip to first unread message

Xavreila Ng

unread,
Aug 12, 2024, 9:57:36 AM8/12/24
to DSI Studio
Hello Frank,

I'm trying to output two horizontal 3 view images (coloured by local index inc_t/dec_t and by assignment) using the following code in windows command prompt.

D:\my_directory>"C:\Program Files\dsi_studio_win\dsi_studio.exe" --action=vis --source=Age.t25.fdr0.05.t_statistics.fib.gz --tract=Age.t25.fdr0.05_sep_fdrcorr.dec.tt.gz --cmd="add_surface,Full+set_zoom,1+set_param,tract_color_style,{2/1}+save_h3view_image,my_image.h3view_image.jpg"

Q1. tract_color_style,2 would automatically render tracts by "qa". How can we render by dec_t/inc_t instead?

Q2. tract_color_style,1 would automatically assign "yellow" to all tracts. How can we assign other colours instead?

Thanks,
Xav

Frank Yeh

unread,
Aug 12, 2024, 3:32:25 PM8/12/24
to xav.n...@gmail.com, DSI Studio
Currently these features are not yet available through CLI but I am
listing them on the wish list.
Frank
> --
> You received this message because you are subscribed to the Google Groups "DSI Studio" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dsi-studio+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/dsi-studio/9c5d3231-4be7-4f8a-b022-66091c0d35d9n%40googlegroups.com.

Frank Yeh

unread,
Aug 14, 2024, 10:33:08 AM8/14/24
to xav.n...@gmail.com, DSI Studio
For Q2, you may use

load_track_color,color.txt

color.txt is a text file storing the color. You may check the format
by saving the track color in the GUI.

Xavreila Ng

unread,
Aug 15, 2024, 9:38:28 AM8/15/24
to DSI Studio
Hi Frank,

Thanks so much for the prompt reply! I've tried the solution but run into some problems.

In GUI, importing a 9-line TXT of RGB value would result in 1 colour for each of the 9 bundles (desired output), as shown below:

testing0.jpg

But with the updated command line shown below, it seems the colouring is done tube by tube and started from the last bundle in TT file, so the same TXT can only cover part of C_PHP_L which has total number of tract at 74.

D:\my_directory>"C:\Program Files\dsi_studio_win\dsi_studio.exe" --action=vis --source=t_statistics.fib.gz --tract=tracts.tt.gz --cmd="add_surface,Full+set_zoom,1+set_param,tract_color_style,2+load_track_color,colour.txt+save_h3view_image,my_image.jpg"

testing1.jpg

If I loop the RGB value until line 74, there seems to be no additional colouring. C_PHP_L remains partially coloured.

An additoinal question on GUI: after [Tracts Cluster][Sort Tracts by Name], any way to re-sort by number of tract?

Thanks,
Xav

Frank Yeh

unread,
Aug 15, 2024, 9:43:52 AM8/15/24
to xav.n...@gmail.com, DSI Studio
I will see how I can fix this and get back to you.
Frank

On Thu, Aug 15, 2024 at 9:38 AM Xavreila Ng <xav.n...@gmail.com> wrote:
>
> Hi Frank,
>
> Thanks so much for the prompt reply! I've tried the solution but run into some problems.
>
> In GUI, importing a 9-line TXT of RGB value would result in 1 colour for each of the 9 bundles (desired output), as shown below:
>
>
>
> But with the updated command line shown below, it seems the colouring is done tube by tube and started from the last bundle in TT file, so the same TXT can only cover part of C_PHP_L which has total number of tract at 74.
>
> D:\my_directory>"C:\Program Files\dsi_studio_win\dsi_studio.exe" --action=vis --source=t_statistics.fib.gz --tract=tracts.tt.gz --cmd="add_surface,Full+set_zoom,1+set_param,tract_color_style,2+load_track_color,colour.txt+save_h3view_image,my_image.jpg"
>
>
>
> To view this discussion on the web visit https://groups.google.com/d/msgid/dsi-studio/c032e8af-cbd4-4cc6-88ed-a36a243930f3n%40googlegroups.com.

Frank Yeh

unread,
Aug 27, 2024, 1:07:20 PM8/27/24
to xav.n...@gmail.com, DSI Studio
I checked the code and found the solution. You may need to specify the
cluster index to assign color to other tracts:

try adding an additional index like this
load_track_color,colour0.txt,0
load_track_color,colour1.txt,1
load_track_color,colour2.txt,2
...

Xavreila Ng

unread,
Sep 2, 2024, 7:48:49 AM9/2/24
to DSI Studio
Hi Frank,

Not sure if I've misunderstood the solution since my output images are off.

I tried calling the 9-line TXT (colour.txt) which would colour a few tracts in each bundle,
"C:\Program Files\dsi_studio_win\dsi_studio.exe" --action=vis --source=t_statistics.fib.gz --tract=tracts.tt.gz --cmd="add_surface,Full+set_zoom,1+set_param,tract_color_style,2+
load_track_color,colour.txt,0+
load_track_color,colour.txt,1+
load_track_color,colour.txt,2+
load_track_color,colour.txt,3+
load_track_color,colour.txt,4+
load_track_color,colour.txt,5+
load_track_color,colour.txt,6+
load_track_color,colour.txt,7+
load_track_color,colour.txt,8+save_h3view_image,testing4.jpg"
testing4.jpg

and calling the RGB values line by line stored in 9 TXT (colour{0...8}.txt) would colour even less tracts.
(ditto)
load_track_color,colour0.txt,0+
load_track_color,colour1.txt,1+
load_track_color,colour2.txt,2+
load_track_color,colour3.txt,3+
load_track_color,colour4.txt,4+
load_track_color,colour5.txt,5+
load_track_color,colour6.txt,6+
load_track_color,colour7.txt,7+
load_track_color,colour8.txt,8+save_h3view_image,testing5.jpg"
testing5.jpg
Reply all
Reply to author
Forward
0 new messages