Skip to content
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

ZVI ROI fixes (develop) #476

Merged
merged 5 commits into from Apr 29, 2013
Merged

ZVI ROI fixes (develop) #476

merged 5 commits into from Apr 29, 2013

Conversation

ghost
Copy link

@ghost ghost commented Apr 23, 2013

As for dev_4_4 (#471)

Roger Leigh added 3 commits April 23, 2013 14:06
Also seek 4 bytes rather than 6 after the label, or else you end
up in missing the SourceTag and losing the correct position in the
stream.
The layer name is typically absent, but some layers have names.
Cope with non-null layer names.
@ghost
Copy link
Author

ghost commented Apr 23, 2013

--test zeiss-zvi

@pwalczysko
Copy link
Member

@rleigh-dundee It would be good to have a link to the dev_4_4 PR in here. It is #471.

@pwalczysko
Copy link
Member

Imported test_images_roi/zvi folder to gretzky (user-4, group read-write-1, Project test ROI Petr).
Opened first 3 images - no ROIs there (but this might be expected, possibly).
Opened image nr. 4 - no ROIs there (certainly should be something there ?) - see screenshot below.
Screen Shot 2013-04-25 at 13 35 14

@ghost
Copy link
Author

ghost commented Apr 25, 2013

I don't think that there's a problem here. For the file in question, I've run

% CLASSPATH=artifacts/loci_tools.jar SCIFIO_DEVEL=1 ./tools/showinf -nopix -omexml -novalid /ome/data_repo/test_images_roi/zvi/roi-line.zvi

and in the resulting OME-XML, we get:

   <ROI xmlns="http://www.openmicroscopy.org/Schemas/ROI/2012-06" ID="ROI:0" Name="Text">
      <Union>
         <Shape ID="Shape:0:0" Text="Line (straight)">
            <Label X="2.0" Y="120.0"/>
         </Shape>
         <Shape ID="Shape:0:1" Text="Line (straight)">
            <Rectangle Height="104.0" Width="289.0" X="2.0" Y="120.0"/>
         </Shape>
      </Union>
   </ROI>
   <ROI xmlns="http://www.openmicroscopy.org/Schemas/ROI/2012-06" ID="ROI:1" Name="Line">
      <Union>
         <Shape ID="Shape:1:0">
            <Line X1="49.0" X2="250.00000000000006" Y1="290.0" Y2="341.0"/>
         </Shape>
      </Union>
   </ROI>
   <ROI xmlns="http://www.openmicroscopy.org/Schemas/ROI/2012-06" ID="ROI:2" Name="Line">
      <Union>
         <Shape ID="Shape:2:0">
            <Line X1="66.0" X2="152.0" Y1="395.0" Y2="368.0"/>
         </Shape>
      </Union>
   </ROI>
   <ROI xmlns="http://www.openmicroscopy.org/Schemas/ROI/2012-06" ID="ROI:3" Name="Line">
      <Union>
         <Shape ID="Shape:3:0">
            <Line X1="312.0" X2="296.0" Y1="269.0" Y2="421.0"/>
         </Shape>
      </Union>
   </ROI>
   <ROI xmlns="http://www.openmicroscopy.org/Schemas/ROI/2012-06" ID="ROI:4" Name="Line">
      <Union>
         <Shape ID="Shape:4:0">
            <Line X1="175.0" X2="367.0" Y1="445.0" Y2="451.0"/>
         </Shape>
      </Union>
   </ROI>

@pwalczysko
Copy link
Member

Agreed that the ROIs are there - they can be seen using both ImageJ and Fiji. When taking the images from test_images_roi/zvi/ folder one by one in the order of appearance, we have:

  1. 18 ROIs
  2. 6 ROIs
  3. 1 ROI
  4. 5 ROIs (=roi-line.zvi)
  5. 1 ROI
  6. 1 ROI
  7. 1 ROI
  8. 6 ROIs
  9. NO ROI (...scalebar.zvi)

If this is how it should be, than the PR is probably ok.

@ghost
Copy link
Author

ghost commented Apr 25, 2013

Hmm, some of those aren't quite right. Some of the more esoteric types (scale bar, angle, length measurement) are being picked up as a single rectangle which is not right. Something is definitely being mis-parsed there.

I'll take a look at exactly what's going on for those types. This also affects 4.4.7/dev_4_4 I'm afraid. I can either open a separate ticket and/or PR for that or fix it for this PR and backport the extra bits to 4.4 after.

@ghost
Copy link
Author

ghost commented Apr 25, 2013

Argh, it's definitely this PR that introduces that was well. It's relating to b3a902d where it's parsing the ROI name as the font name, so it's getting confused when it comes to reading the points.

There may be a 2 byte pad between the end of the ShapeAttrs
block and the start of the Label string.  And the string
may or may not be null, making it difficult to detect
reliably.  We allow for a fuzzy match at 0 or 2 bytes after
the end of the ShapeAttrs.  This padding is typically
only found in the initial Shape, and missing in subsequent
shapes.
@ghost
Copy link
Author

ghost commented Apr 25, 2013

The issues noted with respect to some ROIs not being parsed is now fixed.

@joshmoore
Copy link
Member

@rleigh-dundee: will any of the commits need to be re-rebased?

@joshmoore
Copy link
Member

Note: see gh-486 for the backporting of these last fixes.

@ghost
Copy link
Author

ghost commented Apr 26, 2013

Yes, that's the rebased patches, and everything else in this PR was already merged into dev_4_4/

@melissalinkert
Copy link
Member

--test zeiss-zvi

Happy to merge if overnight builds are green.

melissalinkert added a commit that referenced this pull request Apr 29, 2013
@melissalinkert melissalinkert merged commit 6a80ee6 into ome:develop Apr 29, 2013
@ghost ghost deleted the zvi-roi-missing-develop branch April 29, 2013 13:19
hflynn pushed a commit to hflynn/bioformats that referenced this pull request Oct 11, 2013
Update Windows service docs (see #11448)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants