[vtkusers] DICOM files volume rendering

Import EV info at import-ev.com
Mon May 9 11:12:35 EDT 2016


Can anyone advise me? No response so far.

-----
Import EV Corp.
-----

-----Original Message-----
From: Import EV [mailto:info at import-ev.com] 
Sent: Saturday, May 07, 2016 9:05 PM
To: vtkusers at vtk.org
Cc: IMPORT EV
Subject: DICOM files volume rendering

I could finally make vtk.framework for iOS.

Now, I would like to implement volume rendering using 300 DICOM files.
I use the sample Xcode project "VolumeRender" provided here
(https://github.com/Kitware/VTK/tree/master/Examples/iOS).

In "MyGLKViewController.mm" of this sample project, I changed the codes like
below;
"->" shows the codes I changed.

=== 
#else
    NSArray *paths =
NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask,
YES);
    NSString *basePath = paths.firstObject;
    std::string fname([basePath UTF8String]);
->  //fname += "/CT-chest-quantized.nrrd";
->  //vtkNew<vtkNrrdReader> mi;
->  //mi->SetFileName(fname.c_str());
->  vtkNew<vtkDICOMImageReader> mi;
->  mi->SetDirectoryName(fname.c_str());
    mi->Update();

    double range[2];
    mi->GetOutput()->GetPointData()->GetScalars()->GetRange(range);

    volumeMapper->SetInputConnection(mi->GetOutputPort());
#endif
===

Then I copied 300 DICOM files to "Documents" directory of the app via
iTunes.
The app runs without error but only black color cubic shown on the iPhone5S
display and does not show correct volume rendering image.

Do I need to do something else to show correct volume rendering image?
Please advise me.

-----
Import EV Corp.
-----



More information about the vtkusers mailing list