@@ -222,6 +222,25 @@ protected void init() {
222222 resolveInput ("run" );
223223 snt .setCanvasLabelAllPanes ("Running " + filter + "...." );
224224 }
225+ if (ui != null && ui .isStreamMode ()) {
226+ // MEDIAN requires useLazy==false which is exactly what Stream mode. Prune it from the choices
227+ final MutableModuleItem <String > filterItem = getInfo ().getMutableInput ("filter" , String .class );
228+ final List <String > choices = new ArrayList <>(filterItem .getChoices ());
229+ choices .remove (MEDIAN );
230+ choices .remove (NONE );
231+ filterItem .setChoices (choices );
232+ if (MEDIAN .equals (filter ) || MEDIAN_ALT .equals (filter ) || NONE .equals (filter )) {
233+ filter = TUBENESS ;
234+ filterItem .setValue (this , TUBENESS );
235+ }
236+ // "Preprocess" (LAZY_LOADING_FALSE) eagerly allocates a full-size in-RAM image and filters
237+ // the *entire* streamed dataset
238+ useLazyChoice = LAZY_LOADING_TRUE ;
239+ resolveInput ("useLazyChoice" );
240+ show = false ; // "Display image" only applies to the now-unavailable Preprocess strategy
241+ resolveInput ("show" );
242+ resolveInput ("triggerThicknessCmd" ); // Local Thickness is a traditional ImagePlus-only Fiji plugin
243+ }
225244 resolveInput ("calledFromScript" );
226245 resolveInput ("syncObject" );
227246 updatePrompt ();
@@ -317,12 +336,22 @@ private void triggerSigmaPalette() {
317336 paletteStatus = PALETTE_WAITING ;
318337 break ;
319338 case PALETTE_WAITING :
320- msg ("Click on a representative structure (e.g., branch point or neurite) on the image being "
321- + "traced. Once you have done so, a preview grid with several kernel sizes will be "
322- + "displayed, allowing you to better select the size(s) for the filtering operation.<br><br>"
323- + "If you have never used the preview grid before, you can press 'H' (<u>H</u>elp) "
324- + "once it opens to access its built-in documentation." ,//
325- "Click on a Representative Structure: How-To" );
339+ if (ui .isStreamMode ()) {
340+ msg ("Activate BDV/BVV, navigate to a representative structure (e.g., branch point or neurite), "
341+ + "hover over it, then press 'P'. Once you have done so, a preview grid with several kernel "
342+ + "sizes will be displayed, allowing you to better select the size(s) for the "
343+ + "filtering operation.<br><br>"
344+ + "If you have never used the preview grid before, you can press 'H' (<u>H</u>elp) "
345+ + "once it opens to access its built-in documentation." ,//
346+ "Pick a Representative Structure: How-To" );
347+ } else {
348+ msg ("Click on a representative structure (e.g., branch point or neurite) on the image being "
349+ + "traced. Once you have done so, a preview grid with several kernel sizes will be "
350+ + "displayed, allowing you to better select the size(s) for the filtering operation.<br><br>"
351+ + "If you have never used the preview grid before, you can press 'H' (<u>H</u>elp) "
352+ + "once it opens to access its built-in documentation." ,//
353+ "Click on a Representative Structure: How-To" );
354+ }
326355 return ;
327356 default :
328357 break ; // do nothing;
@@ -359,7 +388,10 @@ private void updatePrompt() {
359388 //mmi.setDescription("Scale(s) are being chosen in palette");
360389 break ;
361390 case PALETTE_WAITING :
362- mmi .setLabel ("Now Click on a Representative Structure..." );
391+ if (ui != null && ui .isStreamMode ())
392+ mmi .setLabel ("Press 'P' Over a Representative Structure..." );
393+ else
394+ mmi .setLabel ("Now Click on a Representative Structure..." );
363395 //mmi.setDescription("Once you click on the image, a preview of clicked neighborhood will open");
364396 break ;
365397 default :
0 commit comments