void GetImageType(std::string fileName,
ImageIOBase::IOPixelType &pixelType,
ImageIOBase::IOComponentType &componentType)
{
typedef itk::Image<unsigned char, 3> ImageType;
itk::ImageFileReader<ImageType>::Pointer imageReader =
itk::ImageFileReader<ImageType>::New();
imageReader->SetFileName(fileName.c_str());
imageReader->UpdateOutputInformation();
pixelType = imageReader->GetImageIO()->GetPixelType();
componentType = imageReader->GetImageIO()->GetComponentType();
}
itk 获取图像数据的文件存储类型
于 2023-04-23 18:20:22 首次发布