fiji / register_virtual_stack_slices

Fiji package for registering and transforming arbitrarily large sequences of images
https://imagej.net/Register_Virtual_Stack_Slices
GNU General Public License v3.0
18 stars 12 forks source link

FileInfo parameter error when saving transformation matrices #12

Open Lan-h opened 3 years ago

Lan-h commented 3 years ago

Hi @iarganda !

Thank you for the plugin. I have tried run it in jython.

The aligned images are successfully generated, but sometimes, the transform matrices are not generated and I get this error message: FileInfo parameter error. Offset + image size > file length

Width: 22351 Height: 25364 Offset: 1696 Bytes/pixel: 1 File length: 79369180

What is the offset and how to solve this problem?

Here is the code I'm using: ` use_shrinking_constraint = 0

p = Register_Virtual_Stack_MT.Param()

p.sift.maxOctaveSize = 1024

p.minInlierRatio = 0.05

for fileHemato in os.listdir(source_dir): if fnmatch.fnmatch(fileHemato, 'ker'): reference_name = fileHemato print(reference_name)

Register_Virtual_Stack_MT.exec(source_dir, target_dir, transf_dir, reference_name, p, use_shrinking_constraint)

IJ.run("Close All", "");

` This script is called from ImageJ, to avoid manual steps (choosing refererence etc) and pop ups. Could the error be due to the display of the aligned images in a stack (I could not find how to avoid it) which might be incompatible with batch mode?

Thanks in advance,