I’ve encountered an issue that I can’t seem to get around with the register virtual stack slices plugin in a jython script. Whenever I try to run the example script from the wiki, it cannot find the reference image in the source folder. It seems to read the correct file name, but it still returns the error “reference image was not found in the source folder”. If I change the reference_name to an image that does not exist, like “xtest.tif” rather than test.tif, the error shows me that the function reads the whole name of the image. But it still it does not register…
def virtualstack():
# source directory
source_dir = "C:\Users\Sverre\Desktop\Imageprocessing\Virtualstacks\Lif_Stack_Split_C0"
# output directory
target_dir = "C:\Users\Sverre\Desktop\Imageprocessing\Virtualstacks\Lif_Stack_Split_C0\Aligned"
# transforms directory
transf_dir = "C:\Users\Sverre\Desktop\Imageprocessing\Virtualstacks\Trans"
# reference image
reference_name = "\\test.tif"
# shrinkage option (false)
use_shrinking_constraint = 0
p = Register_Virtual_Stack_MT.Param()
# The "maximum image size":
p.sift.maxOctaveSize = 1024
# The "inlier ratio":
p.minInlierRatio = 0.05
Register_Virtual_Stack_MT.exec(source_dir, target_dir, transf_dir,
reference_name, p, use_shrinking_constraint)
virtualstack()
The image is definitely correctly named and in the correct folder… Does anyone have any clue what I can do? This little error effectively shuts down my whole script.
I tried it on a windows 7 and a windows 10 system, I don’t have any macs or linux systems to test it on readily available.