Skip to content

Commit

Permalink
Set defaults in RenderQueryParameters rather than RenderParameters
Browse files Browse the repository at this point in the history
  • Loading branch information
minnerbe committed Oct 7, 2024
1 parent 894c5fe commit cdfd912
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ public ByteProcessor render(final long x,
renderParameters.setMaxIntensity(maxIntensity);
}

// render at full quality
renderParameters.setSkipInterpolation(false);
renderParameters.setBinaryMask(false);

final ByteProcessor renderedProcessor;
if (renderParameters.numberOfTileSpecs() > 0) {
if (exportMaskOnly) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ public RenderParameters(final String tileSpecUrl,
this.convertToGray = false;
this.quality = DEFAULT_QUALITY;
this.numberOfThreads = DEFAULT_NUMBER_OF_THREADS;
this.skipInterpolation = true;
this.binaryMask = true;
this.skipInterpolation = false;
this.binaryMask = false;
this.excludeMask = false;
this.maskMinX = null;
this.maskMinY = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ public ShortProcessor render(final long x,
renderParameters.setMaxIntensity(maxIntensity);
}

// render at full quality
renderParameters.setSkipInterpolation(false);
renderParameters.setBinaryMask(false);

final ShortProcessor renderedProcessor;
if (renderParameters.numberOfTileSpecs() > 0) {
if (exportMaskOnly) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ public void applyQueryAndDefaultParameters(final RenderParameters renderParamete
final RenderDataService renderDataService) {

// apply "simple" parameters
renderParameters.setBinaryMask(binaryMask);
renderParameters.setBinaryMask(binaryMask == null || binaryMask);
renderParameters.setSkipInterpolation(skipInterpolation == null || skipInterpolation);
renderParameters.setChannels(channels);
renderParameters.setConvertToGray(convertToGray);
renderParameters.setExcludeMask(excludeMask);
Expand Down

0 comments on commit cdfd912

Please sign in to comment.