saalfeldlab / render

Render transformed image tiles
GNU General Public License v2.0
34 stars 32 forks source link

CrossCorrelationPointMatchClient error #147

Closed martinschorb closed 1 year ago

martinschorb commented 1 year ago

Hi,

I am trying to see if some of our matches can be derived using cc.

I now run into the following issue:

12:54:54.818 [main] INFO  [org.janelia.render.client.CrossCorrelationPointMatchClient] generateMatchesForPairFile: pairJsonFileName is .../tile_pairs_cc1_z_0_to_5_dist_1.json
12:54:54.818 [main] INFO  [org.janelia.alignment.match.RenderableCanvasIdPairs] load: entry, path=.../tile_pairs_cc1_z_0_to_5_dist_1.json
12:54:54.866 [main] INFO  [org.janelia.alignment.match.RenderableCanvasIdPairs] load: exit, loaded 5 pairs
12:54:54.910 [main] INFO  [org.janelia.alignment.match.CanvasRenderParametersUrlTemplate] getTemplateForRun: returning http://render:8080/render-ws/v1/owner/FIBSEM/project/testproject/stack/cc1/tile/{id}/render-parameters?scale=1.0&filter=true&excludeMask=true&normalizeForMatching=true
12:54:55.058 [main] ERROR [org.janelia.render.client.ClientRunner] run: caught exception
java.lang.NullPointerException: null
    at org.janelia.alignment.match.parameters.MatchDerivationParameters.getMatchMaxEpsilonForRenderScale(MatchDerivationParameters.java:95)
    at org.janelia.alignment.match.MatchFilter.<init>(MatchFilter.java:60)
    at org.janelia.alignment.match.CanvasCorrelationMatcher.<init>(CanvasCorrelationMatcher.java:47)
    at org.janelia.render.client.CrossCorrelationPointMatchClient.generateMatchesForPairs(CrossCorrelationPointMatchClient.java:169)
    at org.janelia.render.client.CrossCorrelationPointMatchClient.generateMatchesForPairFile(CrossCorrelationPointMatchClient.java:130)
    at org.janelia.render.client.CrossCorrelationPointMatchClient$1.runClient(CrossCorrelationPointMatchClient.java:95)
    at org.janelia.render.client.ClientRunner.run(ClientRunner.java:38)
    at org.janelia.render.client.CrossCorrelationPointMatchClient.main(CrossCorrelationPointMatchClient.java:101)

When I provide matchMaxEpsilonFullScale, it runs. I don't know if all client script calls using that parameter require it, but it seems like for CC it should be marked as required.

martinschorb commented 1 year ago

Hi @trautmane

thanks for the quick fix. Do you have a reasonable set of parameters for CrossCorrelationPointMatchClient that you could share? I am playing around with some data and can only get it to work with a rather limited fraction of the slices.

Thanks, Martin

trautmane commented 1 year ago

Hi @martinschorb ,

We don't use this very often.

Here are the parameters we used a couple of years ago for a FIBSEM stack that had 5 tiles per z-layer arranged all in one row (hence the clipWidth 250):

--baseDataUrl ${BASE_DATA_URL} --owner ${RENDER_OWNER} --collection ${MATCH_COLLECTION}
--renderScale 1.0 --renderWithFilter false --renderWithoutMask false
--clipWidth 250
--ccFullScaleSampleSize 250 --ccFullScaleStepSize 5 
--ccMinResultThreshold 0.5 --ccCheckPeaks 50 --ccSubpixelAccuracy true
--matchRod 0.92 --matchModelType TRANSLATION --matchIterations 1000 
--matchMaxEpsilonFullScale 2.0 --matchMinInlierRatio 0.0 --matchMinNumInliers 20 
--matchMaxTrust 3.0 --matchFilter SINGLE_SET

I think the core code comes from the ImageJ pairwise stitching code, so maybe that might help you understand options.