Closed mariacozan closed 1 year ago
One more thing that needs to be changed is when calling this function:
res = register_frames(
image[i, 0, 0, :, :], image[i, :, 0, :, :].astype(np.int16)
)
previously this was:
res = register_frames(
image[i, 0, :, :], image[i, :, :, :].astype(np.int16)
)
Fixed the bug. Now checks for the number of dimensions right at the start and accepts a new parameter that is the channel the processing is aligned by. Then the image itself is made into the right number of dimensions at the outsets precluding any need for further changes.
When trying to preprocess the data with two channels, an error appears in register_zstack in preprocess_tiff:
ValueError: too many values to unpack (expected 2)
After debugging, indeed this is because the Z stack has an additional dimension to it. This means that when the different resolutions are determined, the wrong axis is taken:Therefore this will probably have to be dealt with separately (with a simple if loop potentially?):