How can I run deconvolution filters available at “itk Simple Filters” module (such as RichardsonLucyDeconvolutionImageFilter and TikhonovDeconvolutionImageFilter) from the command line of linux?
You can run the code the same way as within Slicer. You can either provide the entire code that you would like to run on the command line (good for a short, simple cases, see examples here) or put the code in a .py file and execute that with Slicer as shown here.
I solved my problem in another way. For example, I edit the file of itkTikhonovDeconvolutionImageFilterTest.cxx (in the path of ~/ITK/Modules/Filtering/Deconvolution/test) as following:
From:
int itkTikhonovDeconvolutionImageFilterTest(int argc, char * argv[])**
To:
int main(int argc, char * argv[])**
and create the file of CmakeLists.txt Which includes the following lines:
and finally compile it with the commands of cmake and make. With doing it, at now I have a executable file with the name of itkTikhonovDeconvolutionImageFilterTest
I think that this is not the correct way and logical method.
According to Andras’s guidance, where can I find the Python codes for these filters?
otsu_filter = sitk.OtsuThresholdImageFilter()
otsu_filter.SetInsideValue(0)
otsu_filter.SetOutsideValue(1)
seg = otsu_filter.Execute(img_T1)
You can review the TikhonovDeconvolutionImageFilter.json which details the available members. You could also use the filter in Slicer using the Simple Filters module. It will usually print to the python console the parameters that were set to execute and you could use that as an example.