-
Notifications
You must be signed in to change notification settings - Fork 24
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
Implement compressed segmentation #6947
Conversation
...nossos/datastore/datareaders/precomputed/compressedsegmentation/CompressedSegmentation.scala
Outdated
Show resolved
Hide resolved
...calableminds/webknossos/datastore/datareaders/precomputed/compressedsegmentation/LICENSE.txt
Outdated
Show resolved
Hide resolved
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.
Very cool stuff :)
webknossos-datastore/app/com/scalableminds/webknossos/datastore/datareaders/ChunkReader.scala
Outdated
Show resolved
Hide resolved
...calableminds/webknossos/datastore/datareaders/precomputed/PrecomputedCompressorFactory.scala
Outdated
Show resolved
Hide resolved
...nossos/datastore/datareaders/precomputed/compressedsegmentation/CompressedSegmentation.scala
Outdated
Show resolved
Hide resolved
|
||
private def decompressChannel(input: Array[Int], volumeSize: Array[Int], blockSize: Array[Int]): Array[T] = { | ||
assert(blockSize.length == 3) | ||
val numElements = volumeSize(0) * volumeSize(1) * volumeSize(2) |
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.
is the order of volumeSize elements fixed? can we rely on 0,1,2 being x,y,z, and 3 being c? Could there be a time axis as well?
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.
The specification only describes 3d volume data, so I think it can be left like this.
...nossos/datastore/datareaders/precomputed/compressedsegmentation/CompressedSegmentation.scala
Outdated
Show resolved
Hide resolved
Probably a different issue: I just tried to import |
Yes, that’s #6821 |
Co-authored-by: Norman Rzepka <[email protected]>
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.
Thanks for addressing the feedback! I added just one more small suggestion
...calableminds/webknossos/datastore/datareaders/precomputed/PrecomputedCompressorFactory.scala
Outdated
Show resolved
Hide resolved
|
||
override def toString: String = s"compressor=$getId/dataType=${dataType.toString}" | ||
|
||
private def blockSizeVec = Vec3Int(x = blockSize(0), y = blockSize(1), z = blockSize(2)) |
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.
could blockSize be Vec3Int everywhere? (even in case class PrecomputedScale). Then the json validator would already reject it if it does not match, and we wouldn’t need the conversion 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.
oh I did not know Vec3Int could be automatically parsed.
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.
🎉 🚀
URL of deployed dev instance (used for testing):
Steps to test:
I did not find segmentation datasets with uint32 as data type
Current problems:
Segment ids are not correct. That is, the shapes that result are correct, but they do not have the right ids. Also, some segments are missing.Performance is pretty bad right nowEnsure License complianceUpdate docs: Remove wkconnect?Issues:
(Please delete unneeded items, merge only when none are left open)