GDCM: HelloActiviz3.cs

GDCM 3.2.8

HelloActiviz3.cs
/*=========================================================================
Program: GDCM (Grassroots DICOM). A DICOM library
Copyright (c) 2006-2011 Mathieu Malaterre
All rights reserved.
See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
using Kitware.VTK;
using Kitware.VTK.GDCM;
/*
* $ export MONO_PATH=/usr/lib/cli/ActiViz.NET/:/usr/lib/cli/Kitware.mummy.Runtime-1.0
* $ mono ./bin/HelloActiviz3.exe ~/Creatis/gdcmData/test.acr
*/
public class HelloActiviz3
{
public static int Main(string[] args)
{
string filename = args[0];
vtkGDCMImageReader reader = vtkGDCMImageReader. New();
vtkStringArray array = vtkStringArray.New();
array.InsertNextValue(filename);
reader. SetFileNames(array);
reader.Update();
//System.Console.Write(reader.GetOutput());
vtkRenderWindowInteractor iren = vtkRenderWindowInteractor.New();
vtkImageViewer2 viewer = vtkImageViewer2.New();
viewer.SetInput(reader.GetOutput());
viewer.SetupInteractor(iren);
viewer.SetSize(600, 600);
viewer.Render();
iren.Initialize();
iren.Start();
return 0;
}
}
vtkGDCMImageReader
Definition vtkGDCMImageReader.h:105
vtkGDCMImageReader::SetFileNames
virtual void SetFileNames(vtkStringArray *)
vtkGDCMImageReader::New
static vtkGDCMImageReader * New()