Re: [Freesurfer] tksurfer curvature and overlay displays

2014-11-25 Thread Graham Wideman
At 11/24/2014 08:23 AM, Bruce Fischl wrote:
>Hi Graham
>
>have you tried freeview? We stopped development on the tktools some time 
>ago.
>
>cheers
>Bruce

Hi Bruce, thanks for replying.

Yes, I did proceed to try the same task in Freeview (which in general has a 
nicer UI, to be sure). Some notes:

Test case: For subject bert, display principal curvature k1 (of smoothwm) on 
smoothwm and on inflated. Using Freeview latest version, in Linux Mint 15.

Freeview Problems/Bugs
---
1. The Threshold frequency histogram widget with color adjustment handles is a 
great idea, but has several problems.

a. Horizontal range of the freq hist defaults to entire range of the variable, 
which, for k1, is one to two orders of magnitude larger than the range of the 
bulk of the data. Consequence: the bulk of the data appears compressed to a 
tiny range near zero, in a tiny number of bins, and it's impossible to set the 
adjustment handles. 

This mechanism needs to accept manual upper and lower limits (and options to 
clip outliers to that value, or exclude them).

b. The "Use percentile" checkbox doesn't seem to do anything that I could 
discover.

c. The mouse hit detection for selecting and dragging the color adjustment 
handles often doesn't work. This is some combination of:

-- The target area of the handles is too small.

-- Clicking the handle but missing instead moves some other handle to the 
clicked location

-- Sometimes the hit detection seems to think you're pressing/clicking on the 
mirror-image side of the graph. Press at +10, and it's like you pressed at -10.

2. It would be great to be able to clone (or save/load) display settings 
associated with one surface onto another. This way, time spent configuring the 
display of a particular variable on, say, smoothwm, would not have to be redone 
(inevitably imperfectly) to display the same variable on another surface like 
inflated, which is a frequent need.

mris_convert
-
3. crv->text, text->crv.  I didn't find a tool that would convert between crv 
and text format and back, to make it easy to use some other tool to clip k1 to 
tractable limits. 

Maybe mris_convert does this, but if so, the help for that program could use 
some revision:
---
Usage: mris_convert [options]  
...
-c   input is scalar curv overlay file (must still specify surface)
---

a. 'curv' perhaps also includes 'crv'?

b. Why is 'surface' needed? The curv/crv files contain everything they need for 
conversion. Requiring surface makes it seem like the conversion is going to do 
something more elaborate than just convert binary <--> text.

c. And does 'surface' mean just an argument like 'orig' or 'pial', or the name 
of a surface file? Perhaps it just means that mris_convert still looks for an 
 argument, but doesn't use it?

Anyhow, I didn't trust that this was going to do what I intended.
 
---
I DID end up getting the display I wanted: I inspected a k1.crv file in a hex 
editor, discovered it was the same as old "new" .curv format, and wrote some 
python code to read/write/filter such a file. With this I could produce a 
clipped version of k1, which did work tractably in Freeview and produced a nice 
display.

-- Graham

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



Re: [Freesurfer] tksurfer curvature and overlay displays

2014-11-24 Thread Bruce Fischl
Hi Graham

have you tried freeview? We stopped development on the tktools some time 
ago.

cheers
Bruce

On Fri, 21 Nov 2014, Graham Wideman wrote:

> Hi all,
>
> I'm having some issues (some possibly mine, some possibly tksurfer's) getting 
> tksurfer (5.3c6) to display curvature the way I think it should be able to.  
> I am using the bert sample data.
>
> The Curvature display
> -
> If I use the Show Curvature button in the UI control panel, I get the 
> familiar gyrus=green; sulcus=red pattern applied to the displayed brain.
>
> The Configure Curvature Display is a bit of a shambles, and I think should be 
> fixed. First, it is virtually impossible to set midpoint using the slider, 
> because the values it pushes to the adjacent textbox are way too coarse. 
> Typing values into the midpoint textbox works, in that it affects the balance 
> of red and green in the display.  However the textbox does not affect the 
> position of the slider, suggesting that it actually does not work.
>
> That said, there's no actual adjustment of the threshold size. Indeed, it's 
> not clear that there actually IS a threshold -- perhaps there isn't. Maybe 
> "threshold midpoint" just sets the midpoint of the color range?
>
> And then there's a a textbox labeled "threshold slope". I'm pretty sure 
> that's nonsensical phrase. What this box appears to do is set the ratio of 
> color to curvature value. Ie: "Color intensity".
>
> Bottom line -- this dialog only partially fits the purpose at hand, and is so 
> confusingly wording that ones attempts to use it are pretty much random. It 
> may even be that some UI elements or functionality that was once there has 
> gone missing accidentally?
>
> Finally, I wanted a colorbar for the curvature display, and so far as I can 
> tell there isn't one. I can turn on a colorbar, but it's the one for overlays.
>
> Using a Curvature variable as an overlay
> 
> I next tried to read in the k1.crv variable as an overlay. This sort of 
> works, but gives a very mottled display (except using "heat map" color 
> scheme), I think because even in definite sulcus and gyrus regions, the 
> curvature values straddle the border of the grey range of color, and I'm not 
> sure how to adjust it sensibly.
>
> -- I couldn't figure out how to set the overall color range, that is to say 
> the extremes of the colorbar. These seem stubbornly stuck at 5.0 and -5.0. In 
> particular, the Theshhold Max setting doesn't seem to affect the extremes of 
> the color range.
>
> -- I couldn't figure out how to eliminate the large grey range in the middle 
> of the color range. I noted that the Threshhold Min setting can be used to 
> make the grey range larger, but setting Min below 1.5 (for example, zero) 
> does not eliminate the grey between 0 and +/-1.5.
>
> 
>
> Anybody have any helpful clues on these items!
>
> Thanks!
>
> -- Graham
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>
>
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



[Freesurfer] tksurfer curvature and overlay displays

2014-11-21 Thread Graham Wideman
Hi all,

I'm having some issues (some possibly mine, some possibly tksurfer's) getting 
tksurfer (5.3c6) to display curvature the way I think it should be able to.  I 
am using the bert sample data.

The Curvature display
-
If I use the Show Curvature button in the UI control panel, I get the familiar 
gyrus=green; sulcus=red pattern applied to the displayed brain. 

The Configure Curvature Display is a bit of a shambles, and I think should be 
fixed. First, it is virtually impossible to set midpoint using the slider, 
because the values it pushes to the adjacent textbox are way too coarse. Typing 
values into the midpoint textbox works, in that it affects the balance of red 
and green in the display.  However the textbox does not affect the position of 
the slider, suggesting that it actually does not work. 

That said, there's no actual adjustment of the threshold size. Indeed, it's not 
clear that there actually IS a threshold -- perhaps there isn't. Maybe 
"threshold midpoint" just sets the midpoint of the color range?

And then there's a a textbox labeled "threshold slope". I'm pretty sure that's 
nonsensical phrase. What this box appears to do is set the ratio of color to 
curvature value. Ie: "Color intensity".

Bottom line -- this dialog only partially fits the purpose at hand, and is so 
confusingly wording that ones attempts to use it are pretty much random. It may 
even be that some UI elements or functionality that was once there has gone 
missing accidentally?

Finally, I wanted a colorbar for the curvature display, and so far as I can 
tell there isn't one. I can turn on a colorbar, but it's the one for overlays.

Using a Curvature variable as an overlay

I next tried to read in the k1.crv variable as an overlay. This sort of works, 
but gives a very mottled display (except using "heat map" color scheme), I 
think because even in definite sulcus and gyrus regions, the curvature values 
straddle the border of the grey range of color, and I'm not sure how to adjust 
it sensibly.

-- I couldn't figure out how to set the overall color range, that is to say the 
extremes of the colorbar. These seem stubbornly stuck at 5.0 and -5.0. In 
particular, the Theshhold Max setting doesn't seem to affect the extremes of 
the color range.

-- I couldn't figure out how to eliminate the large grey range in the middle of 
the color range. I noted that the Threshhold Min setting can be used to make 
the grey range larger, but setting Min below 1.5 (for example, zero) does not 
eliminate the grey between 0 and +/-1.5.



Anybody have any helpful clues on these items!

Thanks!

-- Graham


___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.