VTK读入DICOM数据

魔法师LQ

VTK读入DICOM数据

图像来自www.dicomlibrarymedDream

调研了一些现有的PACS,最终的产品需求要在上述竞品之上。

准备图像

开放数据库

  • DICOM Library:链接,少量CT(Computed Tomography,计算机断层扫描),MR( Magnetic resonance imaging),OT(other)其他格式。更多关于医学影像格式的信息,这里
  • 链接,比较老的DICOM图像,大小较小
  • visualdata:链接
  • Rubo:一些血管造影
  • 其他,aycan,[2], [3]

读入数据

见附录A

参考

[1] https://blog.csdn.net/yunzhaoqiang/article/details/26005009

[2] https://www.researchgate.net/post/Can_anyone_suggest_me_any_website_for_downloading_DICOM_files

[3] https://talk.openmrs.org/t/sources-for-sample-dicom-images/6019

附录

附录A. 读入DICOM样例程序

来源

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import vtk.vtkNativeLibrary;
import vtk.vtkRenderWindowInteractor;
import vtk.vtkImageViewer2;
import vtk.vtkDICOMImageReader;


public class ReadDICOM
{
// -----------------------------------------------------------------
// Load VTK library and print which library was not properly loaded
static
{
if (!vtkNativeLibrary.LoadAllNativeLibraries())
{
for (vtkNativeLibrary lib : vtkNativeLibrary.values())
{
if (!lib.IsLoaded())
{
System.out.println(lib.GetLibraryName() + " not loaded");
}
}
}
vtkNativeLibrary.DisableOutputWindow(null);
}
// -----------------------------------------------------------------

public static void main(String args[])
{

//parse command line arguments
if (args.length != 1)
{
System.err.println("Usage: java -classpath ... Filename(.img) e.g prostate.img");
return;
}
String inputFilename = args[0];

vtkDICOMImageReader reader = new vtkDICOMImageReader();
reader.SetFileName(inputFilename);
reader.Update();

// Visualize
vtkImageViewer2 imageViewer = new vtkImageViewer2();
imageViewer.SetInputConnection(reader.GetOutputPort());
vtkRenderWindowInteractor renderWindowInteractor =new vtkRenderWindowInteractor();
imageViewer.SetupInteractor(renderWindowInteractor);
imageViewer.Render();
imageViewer.GetRenderer().ResetCamera();
imageViewer.Render();

renderWindowInteractor.Start();

}
}