如何在VTK DICOM阅读器中读取图像类型(0008,0008)
How to read ImageType (0008,0008) in VTK DICOM Reader?
我有一个应用程序坐在 VTK 5.3 之上。使用vtkDICOMImageReader,我得到了图像位置,宽度,高度,...,到目前为止一切顺利。
但是有没有一种好方法可以读取带有标签 (0008,0008) 的 ImageType 字符串?
更一般地说,我可以使用vtkDICOMImageReader读回任何标签吗?传递标签值,取回 DICOM 文件中的内容?
#include "gdcmReader.h"
#include "gdcmMediaStorage.h"
int main(int argc, char *argv [])
{
if( argc < 2 ) return 1;
const char *filename = argv[1];
gdcm::Reader reader;
reader.SetFileName( filename);
if( !reader.Read() )
{
std::cerr << "Could not read: " << filename << std::endl;
return 1;
}
std::stringstream strm;
gdcm::File &file = reader.GetFile();
gdcm::DataSet &ds = file.GetDataSet();
gdcm::FileMetaInformation &fmi = file.GetHeader();
ConstIterator it = ds.GetDES().begin();
for( ; it != ds.GetDES().end(); ++it){
if (it->GetTag()==gdcm::Tag (0x0008, 0x0008)){
std:cout << it;
}
相关文章:
- C++,OpenCV,尝试显示图像时"OpenCV(4.3.0) Error: Assertion failed (size.width>0 && size.height>0)"此错误
- 如何使用OpenCV将RBG图像转换为HSV,并将H、S和V值保存为C++中的3个独立图像
- OpenCV EqualizeHist()从彩色图像创建黑白图像
- 将"打开的CV图像"中的"颜色"转换为整数格式
- 平均图像时图像损坏
- 在C++中使用GDAL可以将图像的像素坐标转换为lat,long吗
- 如何将图像传输到c++(dll)中的缓冲区,然后在c#的缓冲区中读/写
- Vulkan验证层不断在VkQueuePresentKHR()上抛出图像布局错误
- 使用FFMPEG将RGB图像序列保存到.mp4时出现问题
- 将RGB图像保存为PPM格式
- 将图像添加到资源文件夹UWP C++
- 彩色图像的卤化物处理平均值
- C++射线示踪剂ppm表示没有足够的数据来显示图像
- 重新定位图像时如何前进到下一个内存块
- 如何使用按钮更新GTK3图像以使用C++从相机捕获图片
- 为什么 BMP 图像上的 imwrite 会卡住/不返回?
- Gstreamer:每 5 秒使用多文件墨水保存图像/jpeg
- 如何使用CImg打开图像?
- 如何使用 OpenCV 解码在两个 UWP 应用之间发送的图像字节?
- 如何在VTK DICOM阅读器中读取图像类型(0008,0008)