How to create a vtkImageData with a three-channel matrix?

Now i have a three-channel matrix, which represents an RGB image. I want to create a vtkImageData to store it.How can i set the properties of the vtkImageData?

You can use vtkImageImport. Call importer.SetNumberOfScalarComponents(3) to import an RGB image.