std::string to char const * in python itk for itk.ImageIOBase`

How about:

io=itk.GiplImageIO.New()
img = itk.image_file_reader(FileName=filename, ImageIO=io)
data_component = io.GetNumberOfComponents()