neurosynth / nsviewer

Neurosynth viewer
28 stars 22 forks source link

Allow users to set colormap thresholds when loading images #11

Closed mwaskom closed 11 years ago

mwaskom commented 11 years ago

Currently there's no option for passing a threshold to viewer.loadImages.

tyarkoni commented 11 years ago

You can now specify 'positiveThreshold' and 'negativeThreshold' properties in Image objects.

mwaskom commented 11 years ago

Excellent! It works nicely, except for one thing. Is there a way to force the text input linked to the slider, e.g.

viewer.addSlider('pos-threshold', '.slider#pos-threshold', 'horizontal',  0, 1, 0, 0.01, null, '#pos-threshold-text');
<input class="slider-text" id="pos-threshold-text" />
<div class="slider layer_settings" id='pos-threshold'></div>

to update when the image loads?

tyarkoni commented 11 years ago

I think I just fixed this in my last push. Try and see. If it still doesn't work, let me know. As a workaround, you can always do Viewer.selectLayer(0), which should activate the 0th layer and update the view accordingly.

mwaskom commented 11 years ago

hmm, it doesn't seem to work for me with the new nsviewer pull or with your workaround (calling viewer.selectLayer(0) right after viewer.loadImages(images) )

maybe I have the text box declared wrong? if I just nudge the slider, it displays the right value.

mwaskom commented 11 years ago

in case it's useful for debugging, i'm serving my app here for the time being: http://stanford.io/17mMW8t

On Thu, Aug 1, 2013 at 1:38 PM, Michael Waskom michael.l.waskom@gmail.comwrote:

hmm, it doesn't seem to work for me with the new nsviewer pull or with your workaround (calling viewer.selectLayer(0) right after viewer.loadImages(images) )

maybe I have the text box declared wrong? if I just nudge the slider, it displays the right value.

tyarkoni commented 11 years ago

Should work now.

mwaskom commented 11 years ago

still seems broken on my end :/. am i missing something?

On Thu, Aug 1, 2013 at 2:05 PM, Tal Yarkoni notifications@github.comwrote:

Should work now.

— Reply to this email directly or view it on GitHubhttps://github.com/neurosynth/nsviewer/issues/11#issuecomment-21969601 .

mwaskom commented 11 years ago

cool, seems to work now. maybe it was a caching issue? anyway, thanks!

On Thu, Aug 1, 2013 at 2:12 PM, Michael Waskom michael.l.waskom@gmail.comwrote:

still seems broken on my end :/. am i missing something?

On Thu, Aug 1, 2013 at 2:05 PM, Tal Yarkoni notifications@github.comwrote:

Should work now.

— Reply to this email directly or view it on GitHubhttps://github.com/neurosynth/nsviewer/issues/11#issuecomment-21969601 .