【问题标题】:Error from reading with ClearCanvas in DICOM file in C# and how to display the DICOM VCR tag在 C# 中使用 ClearCanvas 读取 DICOM 文件中的错误以及如何显示 DICOM VCR 标记
【发布时间】:2013-07-17 14:48:11
【问题描述】:

我在使用 ClearCanvas 库的运行时收到错误消息。这是错误

找不到文件“C:\Users\Don jar\documents\visual studio 2010\Projects\DICOMCA\DICOMCA\bin\Debug\Fluro.dcm”。

错误指向这一段代码:

theFile.Load(DicomReadOptions.Default);

如果有任何帮助,我将不胜感激。谢谢

public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();

        string filename = "Fluro.dcm";
        DicomFile theFile = new DicomFile(filename);
        theFile.Load(DicomReadOptions.Default);
        foreach (DicomAttribute attribute in theFile.DataSet)
        {
            Console.WriteLine("Tag: {0}, Value: {1}", attribute.Tag.Name, attribute.ToString());
        }
    }
 }

【问题讨论】:

  • 我的主要问题,因为我一直在 VB2010 中工作,我如何在这个上下文中加载 DICOM 图像或更合适的是,从我的图片文件夹中调用文件的语法是什么。跨度>

标签: c# image-processing dicom clearcanvas


【解决方案1】:

DicomFile 的构造函数的文件名参数设置 DicomFile 的绝对路径。正如您所提到的,只需将其设置为“图片”文件夹中 DICOM 文件的路径即可。

您看到的异常是由于您提供了 DICOM 文件的相对路径,而它只是试图将其加载到您的应用程序所在的目录中。

【讨论】:

  • 非常感谢史蒂夫,我明白了,我必须包含与号才能调用文件。但是要在我的图片框中显示 VR 标签。我是否只是通过 PictureBox.something 等访问它,例如在 VB 中。谢谢
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-02-08
  • 1970-01-01
  • 1970-01-01
  • 2010-12-11
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多