Refactoring #1487

Feature #964: === GUI ===

GUI: introduce ROI (region of interest) in MaskEditor

Added by pospelov about 4 years ago. Updated over 3 years ago.

Status:ArchivedStart date:01 Jul 2016
Priority:NormalDue date:
Assignee:pospelov% Done:

70%

Category:-
Target version:Sprint32

Description

The idea is that when it comes to importing real data, the most common operation is
to set up region of interest, which will be later simulated.

For the moment it can be done by masking-all and then unmasking, which is non-intuitive.

Region of interest can be used in Core too, as a hint to the simulation to return
intensity histogram already cuted down to region-of-interest.

Within this item:
  • Implement ROI in core
  • Implement ROI in mask editor
  • Make zoom in/out logic respect presence of ROI (i.e. zoom out shows ROI, and not whole image)

Suggestionns from Marina

pilatus_npx, pilatus_npy = 981, 1043  # detector size in pixels
pilatus_pixel_size = 0.172  # detector pixel size in mm
detector_distance = 3537.0  # sample-detector distance in mm
beam_xpos, beam_ypos = 604.8, 330.2  # beam center in pixels

def create_detector():
    """ 
    Creates and returns GALAXY detector
    """ 
    u0 = beam_xpos*pilatus_pixel_size  # in mm
    v0 = beam_ypos*pilatus_pixel_size  # in mm
    detector = RectangularDetector(pilatus_npx, pilatus_npx*pilatus_pixel_size, pilatus_npy, pilatus_npy*pilatus_pixel_size)
    detector.setPerpendicularToDirectBeam(detector_distance, u0, v0)
    # set the ROI to simulate
    # detector.setROI(xmin, ymin, xmax, ymax, units) 
    # units tell in which units boundaries are given
    detector.setROI(-0.2, 0.74, 0.2, 0.85, “QYQZ”)
    # or like this:
    #detector.setROI(-0.2, 0.74, 0.2, 0.85, IDetector2D.QYQZ)
    return detector

History

#1 Updated by pospelov almost 4 years ago

  • Status changed from Backlog to Sprint
  • Target version set to Sprint32

#2 Updated by pospelov almost 4 years ago

  • Description updated (diff)

#3 Updated by pospelov almost 4 years ago

  • Assignee set to pospelov

#4 Updated by pospelov almost 4 years ago

  • Description updated (diff)
  • % Done changed from 0 to 70

#5 Updated by pospelov over 3 years ago

  • Status changed from Sprint to Resolved

#6 Updated by herck over 3 years ago

  • Status changed from Resolved to Archived

Also available in: Atom PDF