Skip to content

TPS: affine seeding - #104

Closed
indecisiveuser wants to merge 1 commit into
JaneliaSciComp:masterfrom
indecisiveuser:TPS
Closed

TPS: affine seeding#104
indecisiveuser wants to merge 1 commit into
JaneliaSciComp:masterfrom
indecisiveuser:TPS

Conversation

@indecisiveuser

Copy link
Copy Markdown
Collaborator

This is a draft PR. I have been encountering errors with the current (identity) seeding of tiles, which can be upwards of 40k pixels away from the actual tile location. Seeding tiles with little split point coverage with the current affine transformations seems to help. Is this the best way of going about the issue? I'd appreciate your feedback!

final Dimensions dims = viewDimensions.get( viewId );
viewBounds.put( viewId, inverseTransformedBoundingBox( tps, dims ) );
viewBounds.put( viewId,
inverseTransformedBoundingBox( tps, dims, approximateAffines.get( viewId ) ) );

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why do you suggest to use the approximate affines instead of the actual transform here @indecisiveuser?

@StephanPreibisch

Copy link
Copy Markdown
Contributor

Hi Lila, I am confused about this one (what do you mean by "current (identity) seeding of tiles"?), I added my first comment in the code that seems to the replace the TPS transform with the approximate affine. Let's discuss it tomorrow?

@indecisiveuser

Copy link
Copy Markdown
Collaborator Author

Hi, to answer your questions:

  1. the current "initial guess" for all the corners is in local coordinates for that tile. But we are looking for the global coordinates
  2. only the initial guess and fallback is changed—inverseTol is still there.
  3. Yes, let's discuss this tomorrow!

@StephanPreibisch

Copy link
Copy Markdown
Contributor

Mmmh, why? It uses the inverse of the TPS transform here:

public static Interval inverseTransformedBoundingBox(
final ThinplateSplineTransform transform,
final Dimensions dimensions )
{
// transforms from source img pixels to render coordinates
final RealTransform invTransform = new WrappedIterativeInvertibleRealTransform<>( transform ).inverse();
// estimated bounding box of the source img transformed to render coordinates
return Intervals.smallestContainingInterval(
invTransform.boundingInterval(
new FinalInterval( dimensions ),
IntervalSamplingMethod.CORNERS ) );
}

@StephanPreibisch

Copy link
Copy Markdown
Contributor

more tomorrow :)

@StephanPreibisch

Copy link
Copy Markdown
Contributor

I do not understand the problem we have ... so it is hard to think about what the right fix is.

@indecisiveuser

Copy link
Copy Markdown
Collaborator Author

No longer needed after #106

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.

2 participants