<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<STYLE>.hmmessage P {
        PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
BODY.hmmessage {
        FONT-SIZE: 9pt; FONT-FAMILY: Tahoma
}
</STYLE>
<META content="MSHTML 6.00.2900.3199" name=GENERATOR></HEAD>
<BODY class=hmmessage bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2>Do these things. 1) Get HWND for your MFC control
(I think you are using Picture). 2) Get its client rect (width and height). 3)
Invoke viewer->SetParentId method and pass HWND to it. 4) Invoke
viewer->SetSize(width,height).</FONT></DIV>
<DIV><FONT face=Arial size=2>This is not a bug.</FONT></DIV>
<DIV><FONT face=Arial size=2>HTH</FONT></DIV>
<DIV><FONT face=Arial size=2>Vidyadhar</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=zhaojunxp@hotmail.com
href="mailto:zhaojunxp@hotmail.com">JohnMark</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=vtkusers@vtk.org
href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, October 10, 2007 3:48
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [vtkusers] A VTK Bug </DIV>
<DIV><BR></DIV><FONT color=#0000ff size=3>hello , vtk users and developers
, </FONT><BR><FONT color=#0000ff size=3>
</FONT><BR><FONT color=#0000ff size=3> I find a vtk
<STRONG><FONT color=#ff0000>BUG</FONT></STRONG> now . </FONT><FONT
color=#0000ff size=3>and the bug is just as follows :</FONT><BR><FONT
color=#0000ff size=3> I use VC++ and VTK to show a dcm image
. and I build a project , its base class is CFormView . and </FONT><BR><FONT
color=#0000ff size=3>then I use vtkDICOMImageReader and vtkImageViewer2 to
show the image in an Picture of MFC . but here </FONT><BR><FONT
color=#0000ff size=3>is the <STRONG><FONT color=#ff0000>bug</FONT></STRONG>
:</FONT><BR><FONT color=#0000ff size=3> all of my
code are just : </FONT><BR><FONT color=#0000ff size=3>vtkDICOMImageReader
* reader = vtkDICOMImageReader::New();</FONT><BR><FONT color=#0000ff
size=3>
reader->SetDataByteOrderToLittleEndian();</FONT><BR><FONT color=#0000ff
size=3> reader->SetFileName("D:/Data");</FONT><BR><FONT
color=#0000ff size=3> reader->Update();</FONT><BR><FONT
color=#0000ff size=3>vtkImageViewer2 * viewer =
vtkImageViewer::New();</FONT><BR><FONT color=#0000ff size=3>
viewer->SetInput(reader->GetOutput());</FONT><BR><FONT color=#0000ff
size=3> viewer->SetSlice(0);</FONT><BR><FONT
color=#0000ff size=3></FONT> <BR><FONT color=#0000ff
size=3> and then I run it , I find the dcm
image appears ! however , the dcm image is not in the Picture
</FONT><BR><FONT color=#0000ff size=3>of MFC , but in a vtk render
window . how surprising ! because I do not use the function Render !
</FONT><FONT color=#0000ff size=3>at </FONT><BR><FONT color=#0000ff size=3>the
same time , if I use vtkImageViewer , it will be OK .
</FONT><BR><FONT color=#0000ff size=3> So , I want to ask :
is this a vtk <STRONG><FONT color=#ff0000>BUG</FONT></STRONG> ? or
vtkImageViewer2 can not show the dcm image ? but from </FONT><BR><FONT
color=#0000ff size=3>the description of this class , we can see
: vtkImageViewer2 is a convenience class for displaying a
</FONT><BR><FONT color=#0000ff size=3>2D image . or this class is not perfect
and we can not use this class now ?</FONT><BR><FONT color=#0000ff
size=3> if this is not a bug , why does this happen ? and
what is wrong with my code ? how can I use this
</FONT><BR><FONT color=#0000ff size=3>class correctly ?</FONT><BR><FONT
color=#0000ff size=3></FONT> <BR><FONT color=#0000ff
size=3> thank you for any help !</FONT><BR><FONT
color=#0000ff size=3></FONT> <BR><FONT color=#0000ff
size=3> Mark</FONT><BR> <BR><FONT color=#0000ff
size=3></FONT> <BR> <BR><FONT color=#0000ff
size=3></FONT> <BR><FONT color=#0000ff size=3></FONT> <BR><BR>
<HR>
使用新一代 Hotmail,更强大、更安全、更多存储空间! <A href="http://mail.live.com"
target=_new>立刻体验!</A> </BLOCKQUOTE></BODY></HTML>