Skip to content

Commit

Permalink
Remove WKWDataFormat
Browse files Browse the repository at this point in the history
  • Loading branch information
frcroth committed Mar 18, 2024
1 parent 2849111 commit c9f752a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@ import com.scalableminds.util.cache.AlfuCache
import com.scalableminds.util.tools.Fox.box2Fox
import com.scalableminds.util.tools.Fox
import com.scalableminds.util.tools.JsonHelper.bool2Box
import com.scalableminds.webknossos.datastore.dataformats.wkw.{
MortonEncoding,
WKWDataFormat,
WKWDataFormatHelper,
WKWHeader
}
import com.scalableminds.webknossos.datastore.dataformats.wkw.{MortonEncoding, WKWDataFormatHelper, WKWHeader}
import com.scalableminds.webknossos.datastore.datareaders.{AxisOrder, ChunkUtils, DatasetArray}
import com.scalableminds.webknossos.datastore.datavault.VaultPath
import com.scalableminds.webknossos.datastore.models.datasource.{AdditionalAxis, DataSourceId}
Expand All @@ -22,14 +17,13 @@ import java.io.ByteArrayInputStream
import scala.collection.immutable.NumericRange
import scala.concurrent.ExecutionContext

object WKWArray {
object WKWArray extends WKWDataFormatHelper {
def open(path: VaultPath,
dataSourceId: DataSourceId,
layerName: String,
sharedChunkContentsCache: AlfuCache[String, MultiArray])(implicit ec: ExecutionContext): Fox[WKWArray] =
for {
headerBytes <- (path / WKWDataFormat.FILENAME_HEADER_WKW)
.readBytes() ?~> s"Could not read header at ${WKWDataFormat.FILENAME_HEADER_WKW}"
headerBytes <- (path / FILENAME_HEADER_WKW).readBytes() ?~> s"Could not read header at ${FILENAME_HEADER_WKW}"
dataInputStream = new LittleEndianDataInputStream(new ByteArrayInputStream(headerBytes))
header <- WKWHeader(dataInputStream, readJumpTable = false).toFox
array <- tryo(new WKWArray(path,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import com.google.inject.Inject
import com.scalableminds.util.io.PathUtils.ensureDirectoryBox
import com.scalableminds.util.io.{PathUtils, ZipIO}
import com.scalableminds.util.tools.{BoxImplicits, Fox, FoxImplicits}
import com.scalableminds.webknossos.datastore.dataformats.wkw.WKWDataFormat.FILENAME_HEADER_WKW
import com.scalableminds.webknossos.datastore.dataformats.wkw.{WKWDataLayer, WKWSegmentationLayer}
import com.scalableminds.webknossos.datastore.dataformats.wkw.{WKWDataFormatHelper, WKWDataLayer, WKWSegmentationLayer}
import com.scalableminds.webknossos.datastore.datareaders.n5.N5Header.FILENAME_ATTRIBUTES_JSON
import com.scalableminds.webknossos.datastore.datareaders.n5.{N5Header, N5Metadata}
import com.scalableminds.webknossos.datastore.datareaders.precomputed.PrecomputedHeader.FILENAME_INFO
Expand Down Expand Up @@ -75,6 +74,7 @@ class UploadService @Inject()(dataSourceRepository: DataSourceRepository,
with DirectoryConstants
with FoxImplicits
with BoxImplicits
with WKWDataFormatHelper
with LazyLogging {

/* Redis stores different information for each upload, with different prefixes in the keys:
Expand Down

0 comments on commit c9f752a

Please sign in to comment.