Author Topic: PropagatePreviews V2  (Read 8715 times)

Offline bitli

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 513
PropagatePreviews V2
« on: 2014 May 17 10:08:28 »
It is often very convenient to use previews as ROI (region of interest), for example to mark the problematic area in a Blink of the raw data and then check that it is well corrected in the final image.  I used PropagatePreviews for this purpose, but it did not always did all what I wanted.
With the authorization of Enzo, the original author, I added some function (and eventually changed the code quite a bit). I propose this version for evaluation. If it works well I will propose it for standard distribution if Juan agrees.
It works slightly differently than the original one:
  • You select the source view and call the script, it will allow you to copy the source previews to one or more target windows.
  • You can also save the selected previews to a script process icon using standard PI method. Then you can recreate the previews by dragging the icon to the target image (very convenient if you want to examine the result of various reject algorithms)
  • The script supports scaling the previews so that they can be applied to binned variants of the same image (it works also in the other direction, applying the preview of a binned image to the larger original). This is very convenient to compare details between L and binned RGB.

This is a version for test and feedback, I intend to test and clean it up a little bit more before an "official" release and I will update the present post with the latest version. It was tested on 1.8 1092 only but should probably work on some previous versions of PI.
The only documentation are the tool tips. See results in the log.

-- UPDATE Dec 14, 2014
Version 2.1 attached - added option to delete all previews on selected images
-- bitli
« Last Edit: 2014 December 14 09:40:46 by bitli »

Offline troypiggo

  • PixInsight Addict
  • ***
  • Posts: 258
Re: PropagatePreviews V2
« Reply #1 on: 2014 May 17 18:27:04 »
I must be missing something.  Can't you just drag the preview tab from one image onto another to copy the preview to it?  Alternatively you can use the preview from image A as a ROI for image B (provided they're the same geometry)?

Offline bitli

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 513
Re: PropagatePreviews V2
« Reply #2 on: 2014 May 17 21:37:30 »
I agree that there are good and simple ways to copy single preview between images. This script provide some enhancements that I found useful when working extensively with ROIs. It is also possible that I missed some existing ways...

The possibilities that are not native to my knowledge are:
  • The capability to copy a set of previews in one operation.
  • The possibility to copy the previews to multiple images in one go (for example to the R  G and B).
  • The possibility to copy the previews to images not currently visible. This is handy on crowded desktop or on a portable PC
  • The option to delete all existing previews before adding the new ones.
  • The possibility to copy previews from the binned 1x1 to the binned 2x2 with proper rescaling.
  • The saving of the request to create the set of reviews as a process instance on the desktop. It is then much easier to re-create the set of previews to multiple images by simple drag and drop. Easier than copying on a dummy image and the using it as a source of previews. This is especially handy if your source image may be reused for different purpose (like the Blink window) with different set of previews.
Nothing that will change your life, it may or may not be useful to some people. Do not hesitate to tell me if I missed some simpler and native way to achieve the same result.
-- bitli
« Last Edit: 2014 May 17 21:45:15 by bitli »

Offline troypiggo

  • PixInsight Addict
  • ***
  • Posts: 258
Re: PropagatePreviews V2
« Reply #3 on: 2014 May 18 00:14:40 »
Aah, gotchya.  Certainly some scenarios in there that haven't occurred to me.

BTW I hope my previous post wasn't taken as diminishing the wonderful development and work you guys do writing these scripts and modules.  We, the typical user, truly appreciate it.  :)

Offline bitli

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 513
Re: PropagatePreviews V2
« Reply #4 on: 2014 May 18 00:19:36 »
Quote
I hope my previous post wasn't taken as diminishing ...
Not at all.  It could have been taken as diminishing the clarity of my original explanations, IF I had ever thought that I can give clear explanations  ;)
-- bitli

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: PropagatePreviews V2
« Reply #5 on: 2014 November 16 09:16:55 »
When running  the script in the latest PI, I just get this:
Processing script file: C:/Program Files/PixInsight/src/scripts/LinearPatternGeneration.js
*** Error [001]: C:/Program Files/PixInsight/src/scripts/LinearPatternGeneration.js, line 259: ReferenceError: HorizontalSizer is not defined
I am not sure why this happens, because HorizontalSizer should be one of the builtin objects.

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline bitli

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 513
Re: PropagatePreviews V2
« Reply #6 on: 2014 November 16 11:51:45 »
May be I missed something, but I think you posted on the wrong thread. PropagetPreviewV2 is not related to LinearPatternGenerator.
Or you executed from the script editor without reset and there was some interference.
-- bitli

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: PropagatePreviews V2
« Reply #7 on: 2014 November 16 12:54:03 »
Bitli, you are right. I will write a proper bug report.
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: PropagatePreviews V2
« Reply #8 on: 2014 December 11 17:57:58 »
Thanks bitli, I found your script useful today. Wish list: Please preserve original preview names when copying whenever possible. Also, an option to delete all existing previews in all selected windows would be nice to have.
Mike

Offline bitli

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 513
Re: PropagatePreviews V2
« Reply #9 on: 2014 December 13 12:04:52 »
Thanks Mike,
I will look for the delete all previews, this is a good idea.
The names should be kept when possible - you have to make sure that 'Preserve existing previews' is not selected if there are previews with the same name. It seems to work here, so there may be a bug in a case I did not yet encounter. Could you confirm the case ?
-- bitli

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: PropagatePreviews V2
« Reply #10 on: 2014 December 13 21:42:46 »
bitli,  :-[ Sorry, I was using the older version by mistake. Your new version does keep names. Thank you.
Mike

Offline bitli

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 513
Re: PropagatePreviews V2
« Reply #11 on: 2014 December 14 09:42:09 »
Hi Mike,
Add added an option to delete all previews on selected target images.  Not very nice layout, but probably usefull. The script is attached to the first post, I should add it to github when time permit.
-- bitli