Author Topic: PCL: ImageInspection > AberrationInspector  (Read 16188 times)

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: PCL: AberrationSpotter
« Reply #15 on: 2011 October 02 03:15:12 »
The setting are saved in the module, but they do not have effect when Alt+S. The previous ones remain.
Fixed, module updated, but... now, need run once AberrationSpotter Interface before use it via Alt+S. Otherwise Alt+S will applied with default settings.

I look for solution...

Offline Alejandro Tombolini

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1267
    • Próxima Sur
Re: PCL: AberrationSpotter
« Reply #16 on: 2011 October 02 18:52:27 »
Thank you Nikolay!

Saludos. Alejandro.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: PCL: AberrationSpotter
« Reply #17 on: 2011 October 04 03:26:00 »
Quote
I added the ability to store settings to my debayer module. I think it should be a standard feature on all modules. You can save all manner of fonts and colors with almost absurd detail but you can't save preferences for most of your processes. Sure you can save processes as psm files but that's not the same.

What you call absurd detail is called nice customization capabilities by others.

We are talking of interface preferences here, not about process preferences. This is what you have implemented in your Debayer tool (edited; see next posts).

Most process interfaces need no preferences at all. In most cases, adding preferences to store the states of some interface elements can cause more problems than benefits. For example, the CurvesTransformation tool doesn't have preferences. I could save the current channel and curve interpolation selections and restore them when the CurvesTransformation tool is launched again in a different PI session. However, this would be a bad idea because the tool wouldn't be in a predictable state, which would lead to confusion.

An important property of all (standard) tools in PixInsight is that their states are always predictable and consistent when they are launched. This is a key design principle. For this reason a tool must never save the state of its underlying instance to restore it when it is launched or reset. A tool doing this without a very good reason (Debayer and Annotation are two examples; see next posts), would not qualify as a standard PixInsight tool. Every tool must be launched with the set of default parameters for its process. This is achieved by instantiating the process with its default constructor. In the same way, when the user resets a tool it must load the parameters of a default instance, but never a particular set of parameters saved as a preference or any similar resource. This is another consequence of PixInsight's object-oriented design: processes and interfaces are encapsulated, self-sufficient objects. An interface governing the default state of a process would introduce a dependency that violates that principle.
« Last Edit: 2011 October 04 04:30:13 by Juan Conejero »
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline zvrastil

  • PixInsight Addict
  • ***
  • Posts: 179
    • Astrophotography
Re: PCL: AberrationSpotter
« Reply #18 on: 2011 October 04 03:35:42 »
A tool doing this without an extremely good reason (I cannot figure out one), would not qualify as a standard PixInsight tool. Every tool must be launched with the set of default parameters for its process.

My Annotation process does that, for good reason I believe. I suppose most users have their favorite font, font size and color used to annotate their images. I certainly do, so these parameters are persisted.
On the other hand Annotation is very atypical PixInsight process, as it is image-data independent. For any process which operates on actual pixel data, I agree with Juan.
For some processes, it's good to have presets - for example ImageIntegration (different settings for bias, dark, flat...) - but that's handled by saving & loading process icons.

regards, Zbynek

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: PCL: AberrationSpotter
« Reply #19 on: 2011 October 04 04:25:55 »
Quote
My Annotation process does that

Indeed. Your Annotation and Sander's Debayer are the only (AFAIK) standard tools that store/retrieve process parameters (after taking a look at Debayer's code I've acquainted that the Bayer pattern and interpolation method are obviously process parameters, not interface settings as I said in my previous post).

You're right that these tools are quite special. In the case of Debayer, it's clear that a user normally wants to fix a Bayer pattern corresponding to a particular camera. Otherwise he/she would be changing it each time. However, I think it would have to be implemented in a different way: strictly, only the Bayer pattern needs to be stored as a preference, but not the interpolation algorithm. I'd implement it as an interface preference (the tool button with a blue arrow; see it on the DynamicCrop interface for example), not through specific push buttons on the interface, but this is obviously a matter of personal style. In the case of Annotation, saving the font and colors is very reasonable IMO. In the LayersComposition tool (being developed), all fonts, color, brushes, etc. will also be stored as preferences, even while they are also process parameters. Drawing and hardware related tools have very different requirements from image processing tools ... that's why PixInsight is so different from other painting apPlicationS  ;D
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: PCL: ImageInspection > AberrationInspector
« Reply #20 on: 2016 January 29 03:07:36 »
Binaries updated for PixInsight 1.8.4.1195
Download in post #1

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: PCL: ImageInspection > AberrationInspector
« Reply #21 on: 2016 February 03 00:52:11 »
Hi Nikolay,

Can we have this tool in our GitHub repository, so we can release it as an official module? Looking forward to your pull request :)
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: PCL: ImageInspection > AberrationInspector
« Reply #22 on: 2016 February 03 05:07:31 »
Looking forward to your pull request :)
sent