-
Notifications
You must be signed in to change notification settings - Fork 364
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
Sigmoidal Contrast #1681
Sigmoidal Contrast #1681
Conversation
de11bcc
to
a59a04c
Compare
There's a checkbox on the "Still needs" missing, is this ready to go? |
@lossyrob No, I still need unit tests for the RDD case. I am writing those right now. |
a59a04c
to
32deaad
Compare
Okay, unit tests have been added. |
* @return The output tile | ||
*/ | ||
def apply(tile: Tile, alpha: Double, beta: Double): Tile = { | ||
val T = _T(tile.cellType, alpha, beta)_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
upper-case vals go against Scala style norms. Is there a specific reason to use it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, will change.
|
||
private def _T( | ||
cellType: CellType, alpha: Double, beta: Double | ||
)(_u: Double): Double = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using an underscore in a param name is out of normal scala style - is there reason to use it? Could we replace this with a longer, more descriptive name instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, will-do.
def multiband[K, V: (? => MultibandTile): ClassTag, M]( | ||
rdd: RDD[(K, V)] with Metadata[M], | ||
alpha: Double, beta: Double | ||
): RDD[(K, MultibandTile)] with Metadata[M] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these need the Metadata? or could we just make these methods on RDD[(K, MultibandTile)]
? We want to create methods on the least-specified versions (only asking for type restrictions that we need) so that we can utilize this for as broad of a range of use cases as possible. For instance, could we run this on source tiles of type RDD[(ProjectedExtent, MultibandTile)]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I will give that a try.
I think that all comments prior to this one have been addressed. |
Still needs:
Original:
![screenshot from 2016-10-20 09 29 00](https://cloud.githubusercontent.com/assets/11281373/19561725/c93bfbf6-96a7-11e6-8c2e-c3ebb166f90c.png)
Imagemagick (
![screenshot from 2016-10-20 09 12 14](https://cloud.githubusercontent.com/assets/11281373/19561579/3b90c08e-96a7-11e6-8ba1-1c50c5779f74.png)
convert -sigmoidal-contrast 10,50%
):This PR (with alpha=0.5 and beta=10):
![screenshot from 2016-10-20 09 12 22](https://cloud.githubusercontent.com/assets/11281373/19561589/45853af2-96a7-11e6-82f6-d633a45abf7e.png)