// Obtain the data from the corresponding output and store it to the project.
// TODO: Optimize this for large datasets by streaming it chunk-by-chunk using an OpH5WriterBigDataset!
dataSlot = self.mainOperator.Image[index]
data = dataSlot[...].wait()
// Vigra thinks its okay to reorder the data if it has axistags,
// but we don"t want that. To avoid reordering, we write the data
// ourselves and attach the axistags afterwards.
dataset = localDataGroup.create_dataset(info.datasetId, data=data)
dataset.attrs["axistags"] = dataSlot.meta.axistags.toJSON()
wroteInternalData = True
// Construct a list of all the local dataset ids we want to keep