roryt
Well-known member
Vacations starting tomorrow, but without the ability to carry telescopes/equipment with me (lack of space in the car :sad: )
Nevertheless, time for learning PJSR Never coded Javascript, but what the heck how difficult can be, 15-10 years before I used to made my leaving coding in C / C++ , Delphi, Perl, TCL/TK , assembly, even Cobol, and more....
Already read older scripts, sticky threads, a few older threads, but (due to lack of documentation) a have a couple of quick questions that I need a few quick answers (or hints where on other scripts I can find the answers), because I do not have the time before I leave to search the forum and most probably I won't have Internet access.
1) Currently I write my script inside script editor (or on my favorite programmer's editor) and then I press F9 on an image. How do I include it in my PI menus ? I saved mine in the same directory as all the others, used #feature-id and #feature-info and tried to "Regenerate" "Feature Scripts", but still I can not see it in the menu.
2) How do I put a "New Instance" triangle and a "Apply (F5)" rectangle on my dialog? I see that many scripts specify with drop-down lists on which image(s) they should apply, but is there a way a PJSR script to follow the same elegant triangle/rectangle schema ?
3) Let say that I modify an image using beginProcess(); / endProcess(); . How do I specify a more descriptive name so that the history browser shows this name and not just "Script" ?
4) Let me see if I got this right, if I want to use an external object on an image (eg HistogramTransformation) , I create a new instance of it and then I use the executeOn ( view ) method, right ? not the other way round (ie apply the external object on the view via any view's method) ?
eg
var p = new HistogramTransformation;
------ manipulation of H etc etc ----
var window = ImageWindow.activeWindow;
if ( window.isNull )
throw new Error( "No active image" );
var view = window.currentView;
p.executeOn( view);
5) and in the above case I DO NOT use beginProcess(); / endProcess(); right ?
6) How do I use Image.FFT, or as the matter of fact, any other FFT method, to produce the FFT (or the reverse) of an image ? It replies that it requires a complex number ??? ? I lack the theoretical background on this, but I thought that FFT is something that you can just pop from any image (based on ImageJ's equivelant function)
thanks in advance
Nevertheless, time for learning PJSR Never coded Javascript, but what the heck how difficult can be, 15-10 years before I used to made my leaving coding in C / C++ , Delphi, Perl, TCL/TK , assembly, even Cobol, and more....
Already read older scripts, sticky threads, a few older threads, but (due to lack of documentation) a have a couple of quick questions that I need a few quick answers (or hints where on other scripts I can find the answers), because I do not have the time before I leave to search the forum and most probably I won't have Internet access.
1) Currently I write my script inside script editor (or on my favorite programmer's editor) and then I press F9 on an image. How do I include it in my PI menus ? I saved mine in the same directory as all the others, used #feature-id and #feature-info and tried to "Regenerate" "Feature Scripts", but still I can not see it in the menu.
2) How do I put a "New Instance" triangle and a "Apply (F5)" rectangle on my dialog? I see that many scripts specify with drop-down lists on which image(s) they should apply, but is there a way a PJSR script to follow the same elegant triangle/rectangle schema ?
3) Let say that I modify an image using beginProcess(); / endProcess(); . How do I specify a more descriptive name so that the history browser shows this name and not just "Script" ?
4) Let me see if I got this right, if I want to use an external object on an image (eg HistogramTransformation) , I create a new instance of it and then I use the executeOn ( view ) method, right ? not the other way round (ie apply the external object on the view via any view's method) ?
eg
var p = new HistogramTransformation;
------ manipulation of H etc etc ----
var window = ImageWindow.activeWindow;
if ( window.isNull )
throw new Error( "No active image" );
var view = window.currentView;
p.executeOn( view);
5) and in the above case I DO NOT use beginProcess(); / endProcess(); right ?
6) How do I use Image.FFT, or as the matter of fact, any other FFT method, to produce the FFT (or the reverse) of an image ? It replies that it requires a complex number ??? ? I lack the theoretical background on this, but I thought that FFT is something that you can just pop from any image (based on ImageJ's equivelant function)
thanks in advance