[vtkusers] DICOM files volume rendering

Import EV info at import-ev.com
Sat May 7 08:05:28 EDT 2016


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