New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
raise RuntimeError('alignData: #25
Comments
It looks like Elastix is not happy in this case. Try running Elastix by itself from the terminal to see what's the problem. Or manually check that all your paths actually exist. Looks like lot's of people are running into path issues. An assertion to check if paths exist might be quite useful. |
Thanks vzickus, I've looked and all the files and paths exist. I'm not sure how to run the binary file in linux terminal. I would greatly appreciate any direction on how you ran it if possible. Also, when you set up the elastix folder, did you just extract the linux binaries (bin and lib folder) into an elastix folder? That's what I did but maybe it's incorrect?
|
I think I chose to install Elastix via apt-get (on Ubuntu). But it's been a while since I set it up, so I might be wrong. Elastix has a good manual though, might be worth checking that out. Just copy-paste /home/users/kmurph/elastix/bin/elastix into your terminal and see if you get something like
|
Thanks vzickus that helped alot. What I think is happening is that the elastix file is not recognized since it has no file type. I'm running it on a supercomputer so I have no way to install as the root; instead I just cloned the git directories in. I'll have to figure out how to make the elastix file something the os can use |
I had the same problem last week. |
@keithmurphy any luck with this? |
Hi @vzickus , I don't remember this working initially, but I've added the lines |
@keithmurphy |
I ended up loading the gcc , glib library (https://wiki.gnome.org/Projects/GLib), the gcc library (The GNU Compiler Collection) and the tcl/tk library. This might be different me though since I'm running everything remotely and alot of the standard libs were absent. Also the libraries need to be added to the path and you have to have enough RAM available for the processes to run or it will come up with a similar set of errors (not sure why that is) |
I am having the same issue. During my error it looks like it is failing at line 484 in Elastix.py so res has some value. @keithmurphy Sorry if this is a bit noobish but what .ssh file are you referring to? Here is my error traceback for some trouble shooting. Thanks all. File "", line 1, in File "/usr/lib/python2.7/dist-packages/spyder/utils/site/sitecustomize.py", line 705, in runfile File "/usr/lib/python2.7/dist-packages/spyder/utils/site/sitecustomize.py", line 94, in execfile File "/media/alon/043A1E823A1E7142/ClearMap/ClearMap/Scripts/process_template.py", line 23, in File "/media/alon/043A1E823A1E7142/ClearMap/ClearMap/Alignment/Elastix.py", line 484, in alignData RuntimeError: alignData: failed executing: /media/alon/043A1E823A1E7142/elastix-4.9.0-linux/bin/elastix -threads 16 -m /media/alon/Images/test/autofluo_for_cfos_resampled.tif -f /media/alon/Images/test/cfos_resampled.tif -p /media/alon/Images/atlas/Par0000affine_acquisition.txt -out /media/alon/Images/test/elastix_cfos_to_auto |
Update: I am stuck when running Elastix, when I run through terminal I get to an error stating: Time spent in resolution 0 (ITK initialization and iterating): 17.338 s. itk::ExceptionObject (0x45040d0) Error occurred during actual registration. Errors occurred! |
@Sattlert2 since you're running Elastix from terminal, this is not a ClearMap issue. This error is mentioned in the manual as well as in the Elastix wiki. You can try and see if suggestions there help solve your issue. |
I am running through ClearMap. Once it fails at line 484 in in alignData (Elastix.py) I copy and paste /media/alon/043A1E823A1E7142/elastix-4.9.0-linux/bin/elastix -threads 16 -m /media/alon/Images/test/autofluo_for_cfos_resampled.tif -f /media/alon/Images/test/cfos_resampled.tif -p /media/alon/Images/atlas/Par0000affine_acquisition.txt -out /media/alon/Images/test/elastix_cfos_to_auto that was outputted by the program into the terminal. Then I receive the "too many samples map outside moving image buffer" problem. |
@Sattlert2, I meant because you get the same error while running pure Elastix via Terminal, it's Elastix that is unhappy. From what I remember about this error, there could be many reasons for this (sometimes even parameter settings). However, the data that is included as examples with the ClearMap paper, should work with the default parameters. I would probably first check if those two files actually look similar (i.e. is there a good initial overlap). See Elastix github/manual/mailing list for more info on this. |
I have the atlas image, where are the test files(examples) located? Thanks for your help! |
Look for "Datasets for training" in https://idisco.info/clearmap-2/ |
I got everything up and running thank you! Both my files and the test files are working. |
Hello, I am glad you got it working! I have the same issue with alignment, also running elastix in terminal on linux. To clarify, is the problem with elastix? Not sure if I download it wrong, I just extract the folder with bin and lib. Maybe I am not running the program correctly? |
Hi, @vzickus, do you might have any solutions for this issue? Thanks |
@Sattlert2 hello man, how did you end up using the elastix error ??? |
Hey @Hesham3esa I am having the same issue. Have you been able to troubleshoot that error. If so I would appreciate any direction. Thank you! |
@patelhe56 yes.. super duper easy fix. Remove all spaces from “folder names” so if your folder that contains images is named “subject 1” make it is “subject_1” and run your code again with the new name. You welcome |
Hi Christoph,
I'm getting this error message even though all of my directories are _ or no spaces (I looked at the other closed issues). Any idea why the os isn't properly accessing the files? I've looked and they're all created. Is there a specific folder structure required for my base directory or alignment files? Thanks
File "/home/users/kmurph/ClearMap/ClearMap/Scripts/process_template.py", line 26, in
resultDirectory = alignData(**RegistrationAlignmentParameter);
File "/home/users/kmurph/ClearMap/ClearMap/Alignment/Elastix.py", line 466, in alignData
raise RuntimeError('alignData: failed executing: ' + cmd);
RuntimeError: alignData: failed executing: /home/users/kmurph/elastix/bin/elastix -threads 16 -m /home/users/kmurph/brain_resources/template_25.tif -f /scratch/users/kmurph/base/autofluo_resampled.tif -p /home/users/kmurph/brain_resources/Par0000affine.txt -p /home/users/kmurph/brain_resources/Par0000bspline.txt -out /scratch/users/kmurph/base/elastix_auto_to_atlas
The text was updated successfully, but these errors were encountered: