I mean, I know the function itself explains a whole lot but it gives me an error saying
TypeError: Wrong number or type of arguments for overloaded function 'itkImageIOBase_SetFileName'.
Possible C/C++ prototypes are:
itkImageIOBase::SetFileName(char const *)
itkImageIOBase::SetFileName(std::string const &)
I understand the filename is str in python and that converts to std::string when it reroutes to cxx code.
Is there any way I can declare the filename using that function? Do I really have to use c++ instead? (Simple ITK was not that satisfying for me …)
Thank you for your reply. I tried that, but I could not get exact ImageIOBase class to work in itk Python. Can you give me an exact example to obtain ImageIOBase::GetNumberOfComponents() in python? or is it not possible?
I got
img = itk.image_file_reader(FileName=filename, ImageIO=itk.GiplImageIO.New())
io = itk.ImageIOBase
…
data_dimension = io.GetNumberOfDimensions() → I want to do something like these
data_component = io.GetNumberOfComponents()
Hope this helps. (Or should I switch back to simple itk…?)
I will try that as soon as possible.
One last question, where do you get all this information? I could not find any documents about this image_file_reader function and itk.GiplImageIO function. Can you give me the link for the documentation or do they just not have one?