[vtkusers] DICOM files volume rendering
Elvis Stansvik
elvis.stansvik at orexplore.com
Mon May 9 13:16:48 EDT 2016
I haven't looked at the example since I'm on my phone, but I would assume
that you need a color/opacity transfer function that fits your data.
Elvis
Den 7 maj 2016 2:05 em skrev "Import EV" <info at import-ev.com>:
> 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.
> -----
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160509/5dd0a30d/attachment.html>
More information about the vtkusers
mailing list