Task #4280 (closed)
Opened 13 years ago
Closed 13 years ago
BUG: RenderCompressed region != crop
Reported by: | wmoore | Owned by: | jburel |
---|---|---|---|
Priority: | major | Milestone: | OMERO-Beta4.3 |
Component: | Services | Version: | n.a. |
Keywords: | n.a. | Cc: | dzmacdonald, cxallan |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | 0.0d |
Sprint: | 2011-02-24 (6) |
Description
Python test in OmeroPy/test/integration/bigImages.py
Logic of the test:
- Create a 3 x 2 image (rendered greyscale)
- RenderCompressed? the whole image plane (String)
- Use PIL to create image from string (and array from Image)
- Crop the 2D numpy array to a 2x2 array
- Add a regionDef and render the same plane again
- Convert to PIL and numpy array (2x2) to inspect values
- The two numpy arrays are not equal (test print-out below)
However, the images look the same.
wjm:OmeroPy will$ PYTHONPATH=$PYTHONPATH:/opt/Ice-3.3.1/python:.:test:build/lib ICE_CONFIG=/Users/will/Desktop/OMERO/etc/ice.config python test/integration/bigImages.py testRenderRegion sizeX 3 sizeY 2 [[0 1 2] # pixel values of 3x2 array [0 1 2]] Image ID 5351 (2, 3, 3) # shape of rendered array (2 x 3 x rgb) [[[ 1 1 1] # pixel values of rendered array - top row [127 127 127] [255 255 255]] [[ 1 1 1] # bottom row [127 127 127] [255 255 255]]] (2, 2, 3) # shape of array cropped 2 x 2 x rgb [[[ 1 1 1] # top row - 2 pixels [127 127 127]] [[ 1 1 1] # bottom row - 2 pixels [127 127 127]]] 5aad4715b0fd98c724dcdbe2c6e90d3942bb4c21 # hash of cropped image (2, 2, 3) # size of array from rendered region [[[ 0 0 0] # rendered region - top row [128 128 128]] [[ 0 0 0] [128 128 128]]] 4f1e376ce1196c2697ff04decbb55342f1a9adbb # hash of rendered region . ---------------------------------------------------------------------- Ran 1 test in 2.728s OK
Change History (3)
comment:1 Changed 13 years ago by jburel
- Remaining Time set to 0.5
- Sprint changed from 2011-02-10 (5) to 2011-02-24 (6)
comment:2 Changed 13 years ago by jburel
- Status changed from new to accepted
comment:3 Changed 13 years ago by jburel <j.burel@…>
- Remaining Time changed from 0.5 to 0
- Resolution set to fixed
- Status changed from accepted to closed
Note: See
TracTickets for help on using
tickets.
You may also have a look at Agilo extensions to the ticket.
(In [db18ab4540c3f5dc0e169adb53c20b074eb49472/ome.git] on branch develop) Add test for render region and stride, fix bugs (close #4280)