Author Topic: ProcessContainer with different masks for every new image in a batch  (Read 2246 times)

Offline peresanz

  • Newcomer
  • Posts: 19
Hi,

 I'm processing a milky way time lapse consisting of 580 images. I've created a ProcessContainer with all the process steps involved and am planning to apply it to all the images. One of the processes is a Morphological Transformation used to dim and reduce the stars size. The process includes a StarMask which is particular for every new image in the batch because each image is different from each other. When I run the ProcessContainer to the ImageContainner that contains all the images I find that every new Mask created for the new image gets a new Id (e.g Mask1, then Mask2, and so on, instead of replacing the original one), in such a way that the first Mask applies to all the images producing bizarre results. Is short, How can I create a new StarMask from scratch that replaces the previous one for every new image in the ImageContainer?

Thanks for helping!

Offline peresanz

  • Newcomer
  • Posts: 19
Re: ProcessContainer with different masks for every new image in a batch
« Reply #1 on: 2015 September 26 07:39:49 »
Hi,

 Just to make clear my problem above: I'm applying a ProcessContainer to a set of images included in an ImageContainer. At instance 3 (see image attached) a StarMask process is applied and a Mask named "star_mask" is generated which is used in the next step through a MorphologicalTranformation process. When the ProcessContainer runs on the next image of the ImageContainer, as long as the previous mask is still open, the new mask generated upon applying instance 3  will have the name "star_mask1". This means that step 4 of the ProcessContainer applies to the new image with the incorrect mask "star_mask" instead of "star_mask1" which is the one that corresponds to this image.

Pere

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: ProcessContainer with different masks for every new image in a batch
« Reply #2 on: 2015 September 26 07:47:55 »
Pere

You need a step after the MorphologicalTransformation that deletes the star mask. Then the next image run would create a new star mask with the name star_mask. I don't know of a tool or a script currently that does that. I think a script would need to be written. I'm sure that is a very simple script and someone from the script community can help.


Mike

Offline peresanz

  • Newcomer
  • Posts: 19
Re: ProcessContainer with different masks for every new image in a batch
« Reply #3 on: 2015 September 26 11:50:18 »
Mike,

That's what I was thinking too. My problem now is that I don't know how to close/delete the existing mask :-(   Any help from the script guys? Thanks!

Pere