-
Notifications
You must be signed in to change notification settings - Fork 32
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
render-parameters off by 1 for 1024 png images #24
Comments
…misunderstood the true problem and made a hacky incorrect "fix". The sloppy bounding box derivation introduced by Saalfeld in ec46251 corrects Forrest's specific case but sloppy=false derivation still exposes the original problem. This change removes my prior hack which was just wrong. We still need to investigate the sloppy=false issue.
Sadly, it took over 2 years for me to realize that I misunderstood this issue. My original fix was a hack that just hid the real problem which is with the tile spec bounding box derivation code. Ironically, the "sloppy" derivation introduced by Saalfeld in ec46251 corrects this specific case but sloppy=false derivation still exposes the original problem. I have rolled back my original hack and have reopened this issue. |
I'm not sure if this is related or not, but I have 2048x2048 image tiles that come back as 2049x2049 when I request the tile image data (I guess the opposite behavior as Forrest notes above).
Edit: now that I see it here, I notice that the width and height are indeed inconsistent with the tileSpec data. I also should note that this behavior is not confined to PNG images. |
Hi Mike - yes you found the same thing I did last November. On the geometric_descriptor branch (where we've been doing most of our work recently), I removed my original hack in 6aee2f7 and then re-opened this issue with the hope that at some point I could investigate further and properly fix the sloppy=false bounding box derivation code. Is this bug causing trouble for you or is it just something you noticed? If the bug is a problem, I'll try to solve it for you sooner. |
I noticed it quite a while ago, but haven't generally used tile images until recently (previously mainly used bb_image). It isn't causing me trouble, as I've just been either ignoring it or truncating the image. I finally went to put it here just so that someone would know about it, and then found this issue. Also, I'm not sure if this is also related: Again, neither of these is hangin me up, so no worries. I'm just really glad to have the Render package as a resource and will try to help as my skill set allows. |
Thanks Mike - the sectionCount in the stack metadata is the number of distinct sectionId values across all tiles in the stack. For "simple" stacks where there is a one-to-one correspondence between sectionId and z and you have a contiguous set of layers, the sectionCount happens to be equal to maxZ - minZ + 1 (but that's not how it is calculated). We have data sets where the same layers have been acquired at different times - typically re-imaging of problem areas. The re-acquired data is assigned a different sectionId from the original data, but ultimately gets assigned the same z. In these cases, the sectionCount is much higher than the z range. We also have data sets with non-contiguous layers / z values where the sectionCount is less than the z range. |
render seems to be confused about some 1024 tiles we have loaded here
for example...
this call
http://em-131fs:8999/render-ws/v1/owner/gayathri/project/EM_Phase1/stack/Pinky40_20170313_aibsdata_flipped/tile/1,3484_aligned_0_1/render-parameters
returns
{
"meshCellSize" : 64.0,
"minMeshCellSize" : 0.0,
"x" : 1896.0,
"y" : 876.0,
"width" : 1023,
"height" : 1023,
"scale" : 1.0,
"areaOffset" : false,
"convertToGray" : false,
"quality" : 0.85,
"numberOfThreads" : 1,
"skipInterpolation" : false,
"binaryMask" : false,
"excludeMask" : false,
"doFilter" : false,
"tileSpecs" : [ {
"tileId" : "1,3484_aligned_0_1",
"layout" : {
"sectionId" : "None",
"temca" : "None",
"camera" : "None"
},
"z" : 3484.0,
"minX" : 1896.0,
"minY" : 876.0,
"maxX" : 2919.0,
"maxY" : 1899.0,
"width" : 1024.0,
"height" : 1024.0,
"minIntensity" : 0.0,
"maxIntensity" : 255.0,
"mipmapLevels" : {
"0" : {
"imageUrl" : "file:///data/nc-em/russelt/20170227_Princeton_Pinky40/4_aligned_tiled/1,3484_aligned_0_1_flip.png"
}
},
"transforms" : {
"type" : "list",
"specList" : [ {
"type" : "leaf",
"className" : "mpicbg.trakem2.transform.AffineModel2D",
"dataString" : "1.0000000000 0.0000000000 0.0000000000 1.0000000000 1896.0000000000 -876.0000000000"
}, {
"type" : "leaf",
"className" : "mpicbg.trakem2.transform.AffineModel2D",
"dataString" : "1.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 1752.0000000000"
} ]
},
"meshCellSize" : 64.0
} ],
"minBoundsMeshCellSize" : 64.0
}
as you can see the image is 1024x1024 (and the png file is that)
but the render-parameters have it as 1023x1023, and bounding_box sytle renderings often have black pixel lines as the tile doesn't quite fill the space it should.
ideas?
The text was updated successfully, but these errors were encountered: