[vtkusers] DICOM image display on MFC picture control using VTK

Kiran Gachchi Kiran.Gachchi at hcl.com
Tue Feb 26 08:10:11 EST 2013


Hi All,

I have created an application in Visual C++ using VTK and MFC.

I want to display DICOM images on MFC picture control using VTK.

I wrote the following snippet for the same:

                             Viewer ->SetInput(vtkImageData);
                             Viewer ->SetupInteractor(MFCWindow ->GetInteractor());
                             MFCWindow->SetRenderWindow((vtkWin32OpenGLRenderWindow *)Viewer->GetRenderWindow());
                             MFCWindow_Ref->GetRenderWindow()->GetInteractor()->SetInteractorStyle(InteractorStyleImage);
                             Viewer_Ref->SetColorLevel(400);
                             Viewer_Ref->SetColorWindow(1500);
                             Viewer_Ref->GetRenderer()->ResetCamera();
                             Viewer_Ref->Render();

I am able to display DICOM images using this code.
But the problem is I need to look at the DICOM image header for window level(400) and window width(1500).
How to automate this?
And for some DICOM images, window level and window width from the header doesn't work out. I need to give some other values to display them properly.

Could anyone help me out to overcome this problem??

Thanks in advance.

Regards,
Kiran




::DISCLAIMER::
----------------------------------------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents
(with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates.
Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the
views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior written consent of authorized representative of
HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately.
Before opening any email and/or attachments, please check them for viruses and other defects.

----------------------------------------------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130226/e259643b/attachment.htm>


More information about the vtkusers mailing list