Page 1 of 1

Visualizaion and MultiScaleHighPass from script

Posted: 24 Jun 2024, 03:48
by Rudi
I have made a macro to run with the following lines:

Code: Select all

   Visualization(0, 65535)
   MultiscalehighPass(5, 6, 2, 1.46)
This works great, but I would like to automate it a bit more and run it from a script.
Are the above two functions available as script functions?
Or is it perhaps possible to run a macro from a script?

Code: Select all

fitsFiles = FindFiles(folder, "*.tif")
N = Count(fitsFiles)
for i = 1 to N
   Image.Open(folder + fitsFiles{i})

   ' this does not work:  Visualization(0, 65535)
   ' this does not work:  MultiScaleHighPass(5, 6, 2, 1.46)

   Image.SaveView(folder + "Scaled_and_MultiScaleHighPass\" + fitsFiles{i} + ".tiff")
   Image.Close
next i

Re: Visualizaion and MultiScaleHighPass from script

Posted: 24 Jun 2024, 03:52
by Rudi
Sorry for the trouble. Found the solution here, after some more Googling after some new keywords :oops: : viewtopic.php?t=440
Image.Macro(n)

Code: Select all

fitsFiles = FindFiles(folder, "*.tif")
N = Count(fitsFiles)
for i = 1 to N
   Image.Open(folder + fitsFiles{i})

   'Visualization(0, 65535)
   'MultiScaleHighPass(5, 6, 2, 1.46)
   'The above is in Macro #2
   Image.Macro(2) ' call Marco(2)

   Image.SaveView(folder + "Scaled_and_MultiScaleHighPass\" + fitsFiles{i} + ".tiff")
   Image.Close
next i