Allows for using multiple metrics. (For example using multiple MRI sequences to normalise to MNI).
Highly customisable (I guess this is pro and con depending on the user level)
I tried to keep it understandable despite the vast amount of parameters it has. Any feedback is welcome!
I used a json string as a parameter in the parameter node to keep up with this amount of settings. Also, I stored presets as json files so loading them is straightforward. Is this a good practice?
It was mostly based on the SlicerElastix implementation, from which I copied parts of code.
Traceback (most recent call last):
File “E:/Slicer/Slicer41120210226/OpenExtentions/SlicerANTs-master/antsCommand/antsCommand.py”, line 131, in
process = runAntsCommand(antsExecutable, antsCommand, outputLogPath)
File “E:/Slicer/Slicer41120210226/OpenExtentions/SlicerANTs-master/antsCommand/antsCommand.py”, line 12, in runAntsCommand
executableFilePath = os.path.join(getAntsBinDir(), executableFileName)
File “E:/Slicer/Slicer41120210226/OpenExtentions/SlicerANTs-master/antsCommand/antsCommand.py”, line 55, in getAntsBinDir
raise ValueError(‘ANTs not found’)
ValueError: ANTs not found
@simonoxen I tried with the latest build and it seems to work fine, thank you this nice work. It is great to be able to explore the parameters and visualize the outcome in the same place.
Can you consider saving/outputting the actual antsRegistration call somewhere, so that we can use that parameter set directly on with ANTs or ANTsR when we are running a large number of samples programmatically?
@simonoxen The module is intuitive and fast and works very robustly. Thanks a lot for your contribution! It would be great if you could create a short YouTube video that shows a few basic and maybe some more advanced use cases in 1-2 minutes.
@muratmaga you can find the command line argument list that is passed to ants in the application log.
I know but it is always better to write them explicitly to disk (in json or whatever) for posterity. If I close the application, I may loose the parameters (I know the logs exists for a while, but still…)
If you created one or a few files at each execution of ANTS, when those file would be deleted? (you don’t want to end up with potentially hundreds of temporary files if you perform registration many times)
Saving the parameters into the log is nice because the last 10-15 log files are preserved but older ones are cleaned up automatically. You would normally get the parameters right after the successful registration anyway, so it should not be even necessary to dig into the archived log files.
Often the maintainers of a library has a preference (they mainly test with statically-linked or shared libraries) and if that’s the case then we follow that. If there is no preference then the decision factors include expected binary compatibility issues (if the library is widely used as a shared library in different projects and no name mangling is supported then it is safer to link statically) and binary size (if the library size is big and the project provides many executables then shared libraries can cut down the size very significantly).
Since we only use a single executable and binary compatibility might come up as an issue when Slicer is used in a workflow that already uses ANTs, it might make sense to link statically.
This would be really nice if you could do this. If you wrote a short post about the module (in “Support” category, with “feature” tag added) and included a short video demo/tutorial then we could advertise this further on twitter etc. and the impact of your work would be increased a lot. Thanks again for your contribution!