如何在 VTK DICOM Reader 中读取 ImageType (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;
}
我有一个基于 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;
}