saalfeldlab / stitching-spark

Reconstruct big images from overlapping tiled images on a Spark cluster.
GNU General Public License v2.0
34 stars 9 forks source link

Already Have data in the form of N5 #37

Closed n8-lightspeed closed 2 years ago

n8-lightspeed commented 2 years ago

Currently the data we have is thrown right into an N5 with a file hierarchy that is compatible with BigStitcher. In order to avoid extra conversion steps I figured that if I point the JSON to each of the tiles then it would be fine. ex:

{ "index": 0, "file": "../converted_to_n5/1-1.1-raw.n5/setup0/timepoint0/s0/", "position": [ 0.0, 0.0, 0.0 ], "size": [ 512, 64, 3052 ], "pixelResolution": [ 1.764, 1.764, 1.764 ], "type": "GRAY16" },

I get the error:

22/02/11 15:40:23 ERROR Executor: Exception in task 8.0 in stage 0.0 (TID 8) org.janelia.stitching.PipelineExecutionException: (8,9): cannot find corresponding tile for this channel at org.janelia.stitching.PipelineStitchingStepExecutor.lambda$0(PipelineStitchingStepExecutor.java:600) at org.apache.spark.api.java.JavaPairRDD$$anonfun$toScalaFunction$1.apply(JavaPairRDD.scala:1040) at scala.collection.Iterator$$anon$11.next(Iterator.scala:409) at scala.collection.Iterator$class.foreach(Iterator.scala:893) at scala.collection.AbstractIterator.foreach(Iterator.scala:1336) at scala.collection.generic.Growable$class.$plus$plus$eq(Growable.scala:59) at scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:104) at scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:48) at scala.collection.TraversableOnce$class.to(TraversableOnce.scala:310) at scala.collection.AbstractIterator.to(Iterator.scala:1336) at scala.collection.TraversableOnce$class.toBuffer(TraversableOnce.scala:302) at scala.collection.AbstractIterator.toBuffer(Iterator.scala:1336) at scala.collection.TraversableOnce$class.toArray(TraversableOnce.scala:289) at scala.collection.AbstractIterator.toArray(Iterator.scala:1336) at org.apache.spark.rdd.RDD$$anonfun$collect$1$$anonfun$12.apply(RDD.scala:939) at org.apache.spark.rdd.RDD$$anonfun$collect$1$$anonfun$12.apply(RDD.scala:939) at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:2074) at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:2074) at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:87) at org.apache.spark.scheduler.Task.run(Task.scala:109) at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:345) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

I am wondering if it is a problem with the JSON, or if it is a problem with the way I have the N5 setup?