Comments (22)
@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
from clearmap.
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.
from clearmap.
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?
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.
from clearmap.
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
Use "elastix --help" for information about elastix-usage.
from clearmap.
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
Use "elastix --help" for information about elastix-usage.
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
from clearmap.
I had the same problem last week.
The thing is Clearmap (dont remember right now which of the Clearmap functions is) will append "bin/elastix" to whatever you set up as the path to the elastix binary. So for example, if you set your path to elastix as: /home/users/kmurph/elastix/bin/elastix, the Clearmap code will see it as: /home/users/kmurph/elastix/bin/elastix/bin/elastix, so take that into account when you extract the bin and lib folders and name the folder accordingly.
from clearmap.
@keithmurphy any luck with this?
from clearmap.
Hi @vzickus , I don't remember this working initially, but I've added the lines
LD_LIBRARY_PATH=/home/users/kmurph/elastix/lib
echo $LD_LIBRARY_PATH
export LD_LIBRARY_PATH
to the .sh file and it's working now. That and importing some C libraries did the trick. Thanks again for your help.
from clearmap.
echo $LD_LIBRARY_PATH
@keithmurphy
Could you specify which C libraries fixed the issue? I am having the same issue which I've been unable to resolve. Thanks
from clearmap.
echo $LD_LIBRARY_PATH
@keithmurphy
Could you specify which C libraries fixed the issue? I am having the same issue which I've been unable to resolve. Thanks
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)
from clearmap.
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
runfile('/media/alon/043A1E823A1E7142/ClearMap/ClearMap/Scripts/process_template.py', wdir='/media/alon/043A1E823A1E7142/ClearMap/ClearMap/Scripts')
File "/usr/lib/python2.7/dist-packages/spyder/utils/site/sitecustomize.py", line 705, in runfile
execfile(filename, namespace)
File "/usr/lib/python2.7/dist-packages/spyder/utils/site/sitecustomize.py", line 94, in execfile
builtins.execfile(filename, *where)
File "/media/alon/043A1E823A1E7142/ClearMap/ClearMap/Scripts/process_template.py", line 23, in
resultDirectory = alignData(**CorrectionAlignmentParameter);
File "/media/alon/043A1E823A1E7142/ClearMap/ClearMap/Alignment/Elastix.py", line 484, in alignData
raise RuntimeError('alignData: failed executing: ' + cmd);
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
from clearmap.
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.
Stopping condition: Error in metric.
itk::ExceptionObject (0x45040d0)
Location: "ElastixTemplate - Run()"
File: /home/mstaring/tmp_elastix_release_4.9.0/elastix/Common/CostFunctions/itkAdvancedImageToImageMetric.hxx
Line: 1066
Description: itk::ERROR: AdvancedMattesMutualInformationMetric(0x43bb1f0): Too many samples map outside moving image buffer: 0 / 10000
Error occurred during actual registration.
Errors occurred!
from clearmap.
@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.
from clearmap.
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.
from clearmap.
@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.
from clearmap.
I have the atlas image, where are the test files(examples) located? Thanks for your help!
from clearmap.
Look for "Datasets for training" in https://idisco.info/clearmap-2/
from clearmap.
I got everything up and running thank you! Both my files and the test files are working.
from clearmap.
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?
from clearmap.
Hi,
I'm also stuck in with alignment command. Just like @Sattlert2, I opened the command in the terminal, but what I got was the following: /home/kupchiklab/ClearMap/elastix-5.0.1-linux/bin/elastix: error while loading shared libraries: libANNlib-5.0.so.1: cannot open shared object file: No such file or directory
@vzickus, do you might have any solutions for this issue?
Thanks
from clearmap.
@Sattlert2 hello man, how did you end up using the elastix error
RuntimeError: align: failed executing: /home/hesham/ClearMap2/ClearMap/External/elastix/build/bin/elastix -threads 16 -m /media/hesham/Extra/1.1 final/resampled_autofluorescence.tif -f /media/hesham/Extra/1.1 final/resampled.tif -p /home/hesham/ClearMap2/ClearMap/Resources/Alignment/align_affine.txt -out /media/hesham/Extra/1.1 final/elastix_resampled_to_auto
???
from clearmap.
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!
from clearmap.
Related Issues (20)
- No module named 'Cython' HOT 8
- Region specific heatmaps HOT 2
- elastix library not loaded (MacOSX) despite existing in path HOT 1
- Python crashes during resampling
- TIFFReadDirectory warning: Unknown field with tag 50838 HOT 1
- 'OverflowError('cannot serialize a string larger than 2 GiB',)
- annotated counts not registering to csv
- Too many files open
- itk::ERROR: RandomCoordinateSampler Please select a smaller SampleRegionSize!
- no
- Two of the Unlabelled regions actually labels parts of two different regions
- Problems with Elastix HOT 2
- problems with the Analysis script HOT 2
- findCenterOfMaxima returns non integer center coordinates, which are not valid in voxelizePixel function
- Issue with Installation, setting.py specifically HOT 3
- Interfacing Ilastik
- ClearMap can't find my .ilp file for celldetection
- Elastix runtime error
- ImportError: cannot import name 'Texture3D' from 'vispy.visuals.volume' HOT 2
- Error during Transform point coordinates with 'elastix_input.txt'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clearmap.