Author Topic: Preview Window Rotation  (Read 737 times)

Offline jimwaters

  • Member
  • *
  • Posts: 70
    • View Profile
Preview Window Rotation
« on: 2017 October 23 23:28:33 »
At times I wish I could rotate a Preview Window to better fit a given situation such as when doing ColorCalibration in a dense star field.
« Last Edit: 2017 October 24 00:28:01 by jimwaters »

Online Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 6865
    • View Profile
    • http://pixinsight.com/
Re: Preview Window Rotation
« Reply #1 on: 2017 October 24 05:17:10 »
Hi Jim,

Pixel data are stored and organized as two-dimensional arrays in memory. In other words, you can think of an image as a matrix where the number of rows is the height in pixels of the image, the number of columns is the width, and each matrix element is a pixel value. As a result of this logical structuration, defining rectangular regions of interest with sides parallel to image borders is the best option performance-wise. Defining arbitrarily-shaped ROIs and previews is doable, but would incur significant performance penalties without a clear benefit in usability terms.

You can simply make a duplicate of the image, rotate it as desired, and define a preview on this rotated version. You can use this "rotated preview" as a ROI for white and black references, etc., and it can also be used to test processes. However, bear in mind that rotation implies interpolation, that is convolution, that is correlation among nearby pixels, and that can lead to misleading preview results in some cases.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline jimwaters

  • Member
  • *
  • Posts: 70
    • View Profile
Re: Preview Window Rotation
« Reply #2 on: 2017 October 24 09:55:45 »
Thanks for the reply.

The reason I ask is that sometimes the 'Preview Window' is very small in dense star fields and that the drawn window isn't large enough to represent a good sample - IMHO.  Sometimes I find it difficult to draw a Preview Window without getting a handful of stars.

Is there a way to link multiple Preview Windows together into one larger virtual window?

Offline dld

  • PixInsight Addict
  • ***
  • Posts: 114
    • View Profile
Re: Preview Window Rotation
« Reply #3 on: 2017 October 24 10:24:14 »
Previews can be aggregated by using the PreviewAggregator script (found at Script -> Utilities -> PreviewAggregator). Clear skies!

Offline jimwaters

  • Member
  • *
  • Posts: 70
    • View Profile
Re: Preview Window Rotation
« Reply #4 on: 2017 October 24 10:25:04 »
Thanks!