-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
551 additions
and
317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package nebulosa.api.image | ||
|
||
enum class ImageFormat { | ||
FITS, | ||
XISF, | ||
PNG, | ||
JPG, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package nebulosa.api.image | ||
|
||
import nebulosa.fits.Bitpix | ||
import java.nio.file.Path | ||
|
||
data class ImageSave( | ||
val format: ImageFormat = ImageFormat.FITS, | ||
val bitpix: Bitpix = Bitpix.BYTE, | ||
val transformation: ImageTransformation = ImageTransformation.EMPTY, | ||
val path: Path = EMPTY_PATH, | ||
) { | ||
|
||
companion object { | ||
|
||
@JvmStatic private val EMPTY_PATH = Path.of("") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
api/src/main/kotlin/nebulosa/api/image/ImageTransformation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package nebulosa.api.image | ||
|
||
import nebulosa.image.algorithms.transformation.ProtectionMethod | ||
import nebulosa.image.format.ImageChannel | ||
|
||
data class ImageTransformation( | ||
val force: Boolean = false, | ||
val calibrate: Boolean = false, | ||
val debayer: Boolean = true, | ||
val stretch: Stretch = Stretch.EMPTY, | ||
val mirrorHorizontal: Boolean = false, | ||
val mirrorVertical: Boolean = false, | ||
val invert: Boolean = false, | ||
val scnr: SCNR = SCNR.EMPTY, | ||
) { | ||
|
||
data class SCNR( | ||
val channel: ImageChannel? = ImageChannel.GREEN, | ||
val amount: Float = 0.5f, | ||
val method: ProtectionMethod = ProtectionMethod.AVERAGE_NEUTRAL, | ||
) { | ||
|
||
companion object { | ||
|
||
@JvmStatic val EMPTY = SCNR() | ||
} | ||
} | ||
|
||
data class Stretch( | ||
val auto: Boolean = false, | ||
val shadow: Float = 0f, | ||
val highlight: Float = 0.5f, | ||
val midtone: Float = 1f, | ||
) { | ||
|
||
companion object { | ||
|
||
@JvmStatic val EMPTY = Stretch() | ||
} | ||
} | ||
|
||
companion object { | ||
|
||
@JvmStatic val EMPTY = ImageTransformation() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.