ChristophKirst / ClearMap

ClearMap is a python toolbox for the analysis and registration of volumetric data from cleared tissues.
http://christophkirst.github.io/ClearMap/build/html/index.html
GNU General Public License v3.0
49 stars 40 forks source link

No CommandLine option "-out" given! #12

Closed vzickus closed 6 years ago

vzickus commented 6 years ago

Get this error (in the title) before RuntimeError('alignData: failed executing: ' + cmd) is raised (however, I cannot track the reason down). Any ideas? For some reason, the

res = os.system(cmd)

returns res = os.system(cmd)

Traceback: File "process_template.py", line 26, in resultDirectory = alignData(**RegistrationAlignmentParameter)

I wonder if this could have anything to do with the "bleed" in atlas. However, I believe I just used the default settings provided in the tutorial, and by eye the atlas and the LSFM data look of similar size.

jmmanley commented 6 years ago

Hi, Christoph should know better, but this error could be caused if you are not giving the proper output path in your alignment parameters. What are you using for RegistrationAlignmentParameter["resultDirectory"]?

This error could be due to no path given after the -out flag when it tries to run the Elastix command (lines 455-461 in Alignment/Elastix.py): cmd = ElastixBinary + ' -threads 16 -m ' + movingImage + ' -f ' + fixedImage + ' -p ' + affineParameterFile + ' -out ' + resultDirectory

vzickus commented 6 years ago

I can see that the resultsDirectory is successfully created, but empty. I'll have to search for other hard-coded paths that I might have missed in the tutorial. I'll keep you updated.

vzickus commented 6 years ago

I could not find any hard-coded bits, and when I print out "RegistrationAlignmentParameter", the paths seem correct. I wonder if it has something with the fact that the bottom of the images look crazy ( https://www.dropbox.com/s/6shi2gubb3uujds/autofluo_for_cfos_resampled-single.tif?dl=0 ) and I have not cropped them...

vzickus commented 6 years ago

I tested elastix separately (that is, just elastix on its own from terminal) on the same images, and it worked without issues. Updated: I think the cause was simply a space " " in the directory structure (probably required a r"path\to\folder with\space"). Closing, and thanks for your help.

auesro commented 5 years ago

For future users: The folders' names, inside the downloaded ClearMap Resources folder, are separated by spaces while the code looks for names in which the spaces have been replaced by underscores "_".