Author Topic: Need some Insight... :)  (Read 2968 times)

Offline KenCooper

  • Newcomer
  • Posts: 2
Need some Insight... :)
« on: 2016 July 24 10:02:56 »
I have 300 tif images to process.

Did a test using just 2 - and it didn't work correctly.

1) Opened a tif, run RangeSelection = got the settings the way I wanted for the Mask.
2) Closed the tif.
3) Made a Process Icon instance of the RangeSelection - on the workspace.
4) Dragged the RangeSelection instance to the ProcessContainer.
5) Dragged the MultiscaleLinearTransform saved instance - with desired setting, to the ProcessContainer.
6) Run ImageContainer and loaded 2 images.
7) Drag ImageContainer instance to ProcessContainer.
8) Processing task occurs...
9) I ended up with 2 masks on the workspace.
10) The Output files were processed by MLT - over the entire image.
11) The Mask never got applied to the original tifs.
12) How should I combine a tif with its Mask, then run MLT on that combination?

Ken Cooper
Calgary

Offline chris.bailey

  • PixInsight Addict
  • ***
  • Posts: 235
Re: Need some Insight... :)
« Reply #1 on: 2016 July 24 10:52:21 »
It requires a slight different approach as all RangeSelection does is create the Range Mask, not apply it.

https://pixinsight.com/forum/index.php?topic=8276.0
may help

Offline KenCooper

  • Newcomer
  • Posts: 2
Re: Need some Insight... :)
« Reply #2 on: 2016 July 24 20:57:36 »
Chris,

Thanks for the link. Upon reading and trying several methods, I got the process to work...

1) Load the 0001.tif image.
2) Apply the RangeMask with previously determined settings.
3) The background is now masked out.
4) Apply HDRMultiScale to foreground.
5) Apply MLT to the foreground.
6) Invert the mask.
7) Apply TGV to the background.

8) Open a new ProcessContainer.
9) From the History Explorer, drag the blue New Instance icon - and drop it into ProcessContainer.
10) Open ImageContainer and load in the 300 tif images.
11) Drag that blue New Instance icon - to the bottom edge of the ProcessContainer.
12) Processing of images now starts - and takes a while... :)

13) Rendered images look good.

***

The next step I would like to try - perhaps after step #7 above - is to take each generated RangeMask image and copy it to that tif's alpha channel.

This way, each tif image will contain its own mask. I think PixelMath is the tool to use, but after hours of searching, I wasn't able
to find any examples of how this can be done...

Is this possible...?

Ken Cooper

Offline oldwexi

  • PixInsight Guru
  • ****
  • Posts: 627
    • Astronomy Pages G.W.
Re: Need some Insight... :)
« Reply #3 on: 2016 July 26 10:37:23 »
Hi Ken!
To solve your and my issue how to use different range_masks created in an process Container
from different Images in an imageContainer i wrote a little script  "closeFile.js"

This script closes simply the existing(!) view "range_mask" before running the
RangeSelection process. So each RangeSelection generates always a "range_mask" file
and not "range_mask1", "range_mask2", etc...
Afterwards the MLT process uses always a "range_mask" view, but this view
is always a new one createt from the next Image in the ImageContainer.

Find a screenshot below which shows the simple und unprofessional
2 line script code which closes the "range_mask" view.
Also see the process Container etc.  For me it works.
Maybe it is an idea how to solve your request.
For sure this can be solved more elegant but i dont know how...
http://www.werbeagentur.org/oldwexi/close_rangemask_view_before_rangemask_process.jpg
Gerald

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: Need some Insight... :)
« Reply #4 on: 2016 July 26 12:12:57 »
Gerald

Thanks for your little 2 line bit of code. I have been needing that for other problems with some of my process containers. :smiley: :smiley: :smiley:


Mike