Skip to content

DM-6516-footprint footprint tool implementation. Integrating with the implementation of marker tool. Both are made in consistent style. #117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 20, 2016

Conversation

cwang2016
Copy link
Contributor

Implementation: (both footprint tool and marker tool are made in consistent style)

  • footprint description file - in DS9 region format, footprint description is located at the server side.
  • update the service to load the footprint description from the server.
  • create footprint factory to produce regions and drawing objects based on footprint description.
  • create drawing layer for footprint.
  • create functions to handle the operation on footprint (or marker) on the drawing layer - rotate, resize, or relocate or translation.
  • handle the cases that the footprint coverage is bigger than the image size or the footprint's position is out of image covered area.
  • UI components for drawing layer panel

Notes for operation:
Rotate handle, resize handle and outline box are provided for the user to rotate, resize and relocate the footprint or marker on the U if any of the operations is applied.

  • Outline box is initially an upright rectangle which
    a) encloses all footprint regions or
    b) is around the center of the footprint (marked by a cross symbol on the UI) or the marker if a) is not visible or
    c) is around the plot center if none of a) and b) is visible.
    The outline box becomes slanted as the footprint is rotated.
  • Resize handles appear at the corners of the outline box. (marker is resizable and footprint is not resizable).
  • Rotate handle appears only at one side of the outline box, starting from the right, the top, the left, or the bottom side according to its visibility on the plot.

Testing example,

  1. get image from image search panel (Images), target: m51, select WISE and click search button

  2. click icon for "overlay marker and instrument footprints"
    and select "add marker" or any item for adding footprint from the dropdown list
    => a marker or the footprint will appear in the middle of the plot

  3. click the mouse at the place where you want to locate the footprint

    When the mouse hovers over the footprint, the cursor will change to be 'pointer'.
    Once 'pointer' is clicked down, an outline box with either resize or rotate handle will appear for 3 seconds after the mouse is up.

  4. Click the resize handle and drag to resize the marker, or
    click the rotate handle and drag to rotate the footprint or
    click on the pointer and drag to move the marker or footprint.

    If the outline box is moved out of the plot area while operating the footprint or marker, the outline box of other kind will continue to appear.

… implementation of marker tool. Both are made in consistent style.
@cwang2016
Copy link
Contributor Author

Note for compiling: there are some changes made on Java codes. Please make full compilation before running it.

@ejoliet
Copy link
Contributor

ejoliet commented Jul 14, 2016

First comment i have: WOW!!! Impressive! This is way better from before migration! It is now very useful! There are a couple of issues:

  • Angle input field in layer window seems to be in radians, should be in degree and i couldn't enter any value either.
  • For the case of a full footprint, sometime the box is out side the viewport but no handle to rotate is visible? Can we make the handle always visible and not necessarily on the right? Maybe 4 handles on each side of the box?
  • I think the idea was to remove the link "Add" from the layer window as we can keep adding any overlay from the menu directly?
  • PNG image saved shows the overlay with different color than the one displayed
  • Handle appears always on the right hand side but it should be visible in the viewport always

…ly. Fixed the bug for editing the rotate angle in drawing layer panel. Showing all handles (rotate or resize) while moving the footprint or marker.
@cwang2016
Copy link
Contributor Author

Additional feature

  • the footprint is displayed and operated on multiple images simultaneously.

@cwang2016
Copy link
Contributor Author

Notes:

  • Angle entry bug in the drawing layer panel is corrected.
  • An outline box around the center of the plot will continue to appear once the footprint is outside the viewport.
  • The rotate handle is shown on one side which is the right, the top, the left or the bottom side, depending the visibility on any of the sides.

@ejoliet
Copy link
Contributor

ejoliet commented Jul 17, 2016

A second review after last commit revealed the following problem:

  • title in layer dialog not same as before, format should be: 'Show: Footprint #N: TELESCOPE APERTURE/INSTRUMENT' instead of the one currently in this branch: 'Show: TELESCOPE_APERTURE_#N'
  • JWST MIRI footprint region is actually the sum of JWST MIRI and HST WFPC2. Please, check that footprint regions migrated contain and match the shapes defined in FootprintFactory class.
  • When more than 1 footprint is displayed, ones cannot select the footprint unless is visually separate (i think is taking into account the box surrounding the footprint as surface to be selected)
  • When rotate 'NICMOS' footprint, the shape lines seems to be moving, maybe a precision problem in using screen to world point and viceversa?

POLYGON -0.13901084 -0.09011910 -0.14103860 -0.08987188 -0.14059694 -0.08768578 -0.13863306 -0.08800800 -0.13901084 -0.09011910 # color=yellow tag={MIRI}
POLYGON -0.13901917 -0.09009966 -0.14104138 -0.08985798 -0.14057749 -0.08767189 -0.13861639 -0.08798856 -0.13901917 -0.09009966 # color=yellow tag={MIRI}
POLYGON -0.13902472 -0.09008299 -0.14099972 -0.08982187 -0.14058027 -0.08765244 -0.13862751 -0.08797467 -0.13902472 -0.09008299 # color=yellow tag={MIRI}
POLYGON 360.00148056 -0.00349167 359.98601112 -0.01929166 359.97019723 -0.00381111 359.98566389 0.01199167 360.00148056 -0.00349167 # color=yellow tag={MIRI}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those 3 polygon belongs to WFPC2. remove them and check that MIRI and WFPC2 is correctly defined.

…ayer. update the text display for marker. fixed JWST MIRI footprint content.
@robyww
Copy link
Contributor

robyww commented Jul 18, 2016

Fire Impressions. I agree with Immanuel. It looks really good.

UI Issues:

  • Label does not update as the uses types. You have to click on the footprint for it to update. Changing corners of the label also has this problem. The marker work like it should, this is just a footprint isssue.
  • There issue with the active footprint changing. The first one does not seem to want to let go unless it is hidden. My guess is this might be my problem in ImageViewerLayout.
  • I think we only need 1 decimal place for the angle and it should be in degrees. The input box can be smaller.
  • I think the center field should take the full width so that it does not wrap. It will look cleaner.
  • I really like the way you control the size the rotate control.
  • We need @ejoliet input, but the label could default to the name of the footprint.
  • In response to @ejoliet on add new footprints: I still like having a an 'Add Marker' for markers but the add for the footprint is probably not be necessary.

var idCnt=0;

export function footprintCreateLayerActionCreator(rawAction) {
return (dispatcher) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could break this function up a little. It is pretty big.

@robyww
Copy link
Contributor

robyww commented Jul 18, 2016

The code looks good. However, it is so much it is hard to evaluate. This is a problem with code reviews.

I have notice in the last couple of months. In May I, @loitly, @tgoldina and @ejoliet all had really big commits. How do we look at large commits? I think we should bring it up for ideas in our Wednesday meeting.

@ejoliet
Copy link
Contributor

ejoliet commented Jul 18, 2016

You are right. And i would add that i am also concerned that we are changing the server too. Java classes are changing in dev but we are not testing for IFE app as well in those cases.

Emmanuel Joliet
NASA/IPAC Infrared Science Archive
MS 100-22, Caltech, Pasadena, CA 91125
Office: 170
Email: [email protected]
Phone: (626) 395-1489

On Jul 18, 2016, at 12:12, Trey Roby [email protected] wrote:

The code looks good. However, it is so much it is hard to evaluate. This is a problem with code reviews.

I have notice in the last couple of months. In May I, @loitly, @tgoldina and @ejoliet all had really big commits. How do we look at large commits? I think we should bring it up for ideas in our Wednesday meeting.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

robyww and others added 3 commits July 18, 2016 16:21
…footprint description file. Update footprint and marker label display. Add methods to add and get footprint into the a footprint map in the server.
@cwang2016
Copy link
Contributor Author

cwang2016 commented Jul 20, 2016

Notes:

  • Build firefly_data.jar to include fits (previously contained in fits.jar) and footprint description file.
  • Create methods to add and get footprint entry (footprint file path and the associated key) to and from a footprint map at server side.
  • footprint and marker text: the text is displayed as the drawing layer title initially and the text content is editable in the drawing layer panel.

@cwang2016 cwang2016 merged commit d57e5fd into dev Jul 20, 2016
@cwang2016 cwang2016 deleted the DM-6516-footprint branch July 20, 2016 02:05
@cwang2016
Copy link
Contributor Author

Please Note:
Please do full compile (gradle :firefly:war :firefly:deploy ) as the server side are modified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants