<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:st1 =
"urn:schemas-microsoft-com:office:smarttags"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content=Word.Document name=ProgId>
<META content="MSHTML 6.00.5296.0" name=GENERATOR>
<META content="Microsoft Word 9" name=Originator><LINK
href="cid:filelist.xml@01C64C02.554DB780" rel=File-List><LINK
href="cid:editdata.mso@01C64C02.554DB780" rel=Edit-Time-Data><!--[if !mso]>
<STYLE>v\:* {
        BEHAVIOR: url(#default#VML)
}
o\:* {
        BEHAVIOR: url(#default#VML)
}
w\:* {
        BEHAVIOR: url(#default#VML)
}
shape {
        BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]--><!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:Zoom>0</w:Zoom>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:EnvelopeVis/>
</w:WordDocument>
</xml><![endif]-->
<STYLE>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;
        mso-font-charset:0;
        mso-generic-font-family:swiss;
        mso-font-pitch:variable;
        mso-font-signature:1627421319 -2147483648 8 0 66047 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;
        text-underline:single;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
        {margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
span.EmailStyle18
        {mso-style-type:personal;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:black;}
span.EmailStyle19
        {mso-style-type:personal;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:black;}
span.EmailStyle20
        {mso-style-type:personal;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:navy;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        mso-ansi-font-size:10.0pt;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:#993366;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;
        mso-header-margin:.5in;
        mso-footer-margin:.5in;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</STYLE>
<o:SmartTagType name="City"
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><o:SmartTagType
name="place"
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType></HEAD>
<BODY lang=EN-US style="tab-interval: .5in" vLink=purple link=blue
bgColor=#ffffff>
<DIV><FONT face=Arial size=2>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT face="Courier New"
color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"><SPAN
style="mso-tab-count: 2">
</SPAN>pvtkOGLWindow->SetParentId((HWND)whnd);</SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT face="Courier New"
color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"></SPAN></FONT> </P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT face="Courier New"
color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"></SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p>You
should instead SetWindowID(...)</o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT face="Courier New"
color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT> </P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT face="Courier New"
color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p>xz</o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT face="Courier New"
color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p>http://www.xzing.org</o:p></SPAN></FONT></P></FONT></DIV>
<BLOCKQUOTE dir=ltr
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=gao@mdimaging.com href="mailto:gao@mdimaging.com">Frank Gao</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=ajd27@cornell.edu
href="mailto:ajd27@cornell.edu">Andrew J. Dolgert</A> ; <A
title=vtkusers@vtk.org href="mailto:Vtkusers@Vtk.Org">Vtkusers@Vtk.Org</A> ;
<A title=thomas@hexerei-software.de
href="mailto:thomas@hexerei-software.de">Thomas Lambertz</A> ; <A
title=xf10036@hotmail.com href="mailto:xf10036@hotmail.com">Xiaofeng Zhao</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, March 20, 2006 12:40
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [vtkusers] VTK and GUI -
vtkRenderWindow - Virtual or Physical?</DIV>
<DIV><BR></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma">Hi
All,<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma"><![if !supportEmptyParas]><![endif]> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma">Thanks for the
replies.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma"><![if !supportEmptyParas]><![endif]> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma">Both Drew and Tom
said were what I was trying to do. Separating UI and internal code is my basic
intent, and also I am not trying to use the .Net wrapper for the whole VTK.
<SPAN style="mso-spacerun: yes"> </SPAN>However, I am still struggling to
get it work. The error I received is that some object is busy, which made me
think that there are conflicts somewhere.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma"><![if !supportEmptyParas]><![endif]> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma">To prove the
concept, I am trying to have a C# application to view a single DICOM file. The
code has three layers: C# code for UI, C++ wrapper to a C++ class, and then
the C++ class making VTK calls. <SPAN
style="mso-spacerun: yes"> </SPAN>Please see the code below. <SPAN
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma"><![if !supportEmptyParas]><![endif]> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma">I would very much
appreciate if you would like to help correct the approach or provide some
sample code.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma"><![if !supportEmptyParas]><![endif]> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma">Thanks,<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma"><![if !supportEmptyParas]><![endif]> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma">Frank<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma"><![if !supportEmptyParas]><![endif]> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma">C# UI
layer<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">private</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'">
</SPAN></FONT><FONT face="Courier New" color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">void</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'">
openFileDialog1_FileOk(</SPAN></FONT><FONT face="Courier New" color=blue
size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">object</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"> sender,
System.ComponentModel.CancelEventArgs e)</SPAN></FONT><FONT face="Courier New"
color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'">{</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"><SPAN
style="mso-tab-count: 1"> </SPAN>wrapper.Open
(</SPAN></FONT><FONT face="Courier New" color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">this</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'">.openFileDialog1.FileName,
</SPAN></FONT><FONT face="Courier New" color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">this</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'">.Handle);</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"><SPAN
style="mso-tab-count: 2">
</SPAN></SPAN></FONT><FONT face="Courier New" color=green size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'">}</SPAN></FONT><FONT
face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma"><![if !supportEmptyParas]><![endif]> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma">Then my C++ wrapper
to VTK code<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma"><![if !supportEmptyParas]><![endif]> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">void</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'">
Wrapper::Open (String *filename, IntPtr wnd)</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'">{</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"><SPAN
style="mso-tab-count: 1">
</SPAN></SPAN></FONT><FONT face="Courier New" color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">char</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'">
</SPAN></FONT><FONT face="Courier New" color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">__nogc</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'">* pStr =
</SPAN></FONT><FONT face="Courier New" color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">static_cast</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"><</SPAN></FONT><FONT
face="Courier New" color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">char</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'">*>(Marshal::StringToHGlobalAnsi(filename).ToPointer());</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"><SPAN
style="mso-tab-count: 1"> </SPAN>m->Open
(pStr, (HWND)wnd.ToPointer());</SPAN></FONT><FONT face="Courier New"
color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'">}</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma"><![if !supportEmptyParas]><![endif]> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma">The last one is my
C++ code:<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"><SPAN
style="mso-tab-count: 1">
</SPAN></SPAN></FONT><FONT face="Courier New" color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">void</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'">
Dicomer::Open (</SPAN></FONT><FONT face="Courier New" color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">char</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'">
*filename, HWND whnd)</SPAN></FONT><FONT face="Courier New" color=#993366
size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"><SPAN
style="mso-tab-count: 1">
</SPAN>{</SPAN></FONT><FONT face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"><SPAN
style="mso-tab-count: 2">
</SPAN>pvtkDataSetReader->SetFileName(filename);</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"><SPAN
style="mso-tab-count: 2">
</SPAN>pvtkDataSetMapper->SetInput(pvtkDataSetReader->GetOutput());</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"><SPAN
style="mso-tab-count: 2">
</SPAN>pvtkActor->SetMapper(pvtkDataSetMapper);</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"><SPAN
style="mso-tab-count: 1">
</SPAN></SPAN></FONT><FONT face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"><SPAN
style="mso-tab-count: 2">
</SPAN>pvtkRenderer<SPAN style="mso-spacerun: yes"> </SPAN>=
vtkRenderer::New();</SPAN></FONT><FONT face="Courier New" color=#993366
size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"><SPAN
style="mso-tab-count: 2">
</SPAN>pvtkOGLWindow = vtkWin32OpenGLRenderWindow::New();</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"><![if !supportEmptyParas]><![endif]> </SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"><SPAN
style="mso-tab-count: 2">
</SPAN>pvtkOGLWindow->SetParentId((HWND)whnd);</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"><![if !supportEmptyParas]><![endif]> </SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"><SPAN
style="mso-tab-count: 2">
</SPAN>pvtkRenderer ->SetRenderWindow (pvtkOGLWindow);</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"><SPAN
style="mso-tab-count: 2">
</SPAN>pvtkRenderer->SetBackground(0.0,0.0,0.4);</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"><SPAN
style="mso-tab-count: 2">
</SPAN>pvtkRenderer->AddActor((pvtkActor));</SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"><SPAN
style="mso-tab-count: 2">
</SPAN>pvtkRenderer->ResetCamera();</SPAN></FONT><FONT face="Courier New"
color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"><SPAN
style="mso-tab-count: 2">
</SPAN>pvtkOGLWindow->Render();</SPAN></FONT><FONT face="Courier New"
color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"><SPAN
style="mso-tab-count: 1">
</SPAN>}</SPAN></FONT><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma"><![if !supportEmptyParas]><![endif]> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma"><![if !supportEmptyParas]><![endif]> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma">-----Original
Message-----<BR><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Thomas
Lambertz [mailto:thomas@hexerei-software.de]<BR><B><SPAN
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Saturday, March 18, 2006 10:51
AM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B>
vtkusers@vtk.org<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re:
[vtkusers] VTK and GUI - vtkRenderWindow - Virtual or
Physical?</SPAN></FONT><FONT color=#993366><SPAN
style="COLOR: #993366; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" color=#993366 size=3><SPAN
style="FONT-SIZE: 12pt; COLOR: #993366"><![if !supportEmptyParas]><![endif]> </SPAN></FONT><FONT
color=#993366><SPAN
style="COLOR: #993366; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'"><![if !supportEmptyParas]><![endif]> </SPAN></FONT><FONT
face="Courier New" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366; FONT-FAMILY: 'Courier New'; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="mso-layout-grid-align: none"><FONT
face="Times New Roman" color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: #993366"><BR>Hello Frank,<BR><BR>i am far away
from being such an expert - but - maybe me tries are<BR>helpful for
you.<BR><BR>I splittet my application into two parts. GUI runs as a managed
Win Form<BR>and the numerical parts are done in a separate DLL which is
native-x86.<BR>And - to come closer to your question - yes - i have not found
problems<BR>at this time by letting VTK render into a
Forms-Picturebox.<BR><BR>I know that VS 2003/2005 can handle managed /
unmanaged Code in the same<BR>executable but i didnt tried this way (
splitting has some advantages<BR>for me ).<BR><BR>Hope this
helps,<BR>Tom<BR><BR style="mso-special-character: line-break"><![if !supportLineBreakNewLine]><BR
style="mso-special-character: line-break"><![endif]></SPAN></FONT><SPAN
class=EmailStyle21><FONT face=Arial color=#993366 size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"><o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal><FONT face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma">-----Original
Message-----<BR><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Andrew J.
Dolgert [mailto:ajd27@cornell.edu]<BR><B><SPAN
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Saturday, March 18, 2006 7:10
AM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> gao@mdimaging.com;
Vtkusers@Vtk.Org<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> RE:
[vtkusers] VTK and GUI - vtkRenderWindow - Virtual or
Physical?</SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><![if !supportEmptyParas]><![endif]> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Your idea is
interesting. It might apply to attempts to use VTK as a server for <st1:City
w:st="on"><st1:place w:st="on">AJAX</st1:place></st1:City>. For Windows Forms,
however, the current setup works fine because the vtkWin32OpenGLRenderWindow
will happily receive events from and draw into the Frame of a Windows Form
because Windows Forms expose their HWND handle.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Drew
Dolgert<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></FONT></P>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT
face="Times New Roman" color=black size=3><SPAN
style="FONT-SIZE: 12pt; COLOR: black">
<HR align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class=MsoNormal><B><FONT face=Tahoma color=black size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT
face=Tahoma color=black size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma">
vtkusers-bounces+ajd27=cornell.edu@vtk.org
[mailto:vtkusers-bounces+ajd27=cornell.edu@vtk.org] <B><SPAN
style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Frank Gao<BR><B><SPAN
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Friday, March 17, 2006 5:24
PM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B>
Vtkusers@Vtk.Org<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B>
[vtkusers] VTK and GUI - vtkRenderWindow - Virtual or
Physical?</SPAN></FONT><FONT color=black><SPAN
style="COLOR: black; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" color=black size=3><SPAN
style="FONT-SIZE: 12pt; COLOR: black"> </SPAN></FONT><FONT
color=black><SPAN
style="COLOR: black; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><SPAN class=EmailStyle19><FONT face=Arial color=black
size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi
Experts,<o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal><SPAN class=EmailStyle19><FONT face=Arial color=black
size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal><SPAN class=EmailStyle19><FONT face=Arial color=black
size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I have a question
about vtkRenderWindow, and vtkOpenGLRenderWindow. Are such objects virtual, or
have to be physical by setting the parent window ID?
<o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal><SPAN class=EmailStyle19><FONT face=Arial color=black
size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal><SPAN class=EmailStyle19><FONT face=Arial color=black
size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">The requirement
behind this question is here. Suppose an application must separate its window
display and interaction from its internal code. The application needs to set a
virtual vtkOpenGLRenderWindow with interactors that are also virtual, and
binding them with a physical window whenever necessary. Simply put, make
vtkOpenGLRenderWindow and the interactor purely ‘server’ objects to return
bitmaps (or video streams?). These server objects are fully functional and
independent of physical implementation. By doing this, the application never
needs to get into vtk code to change files such as vtkMFCWindow.
<o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal><SPAN class=EmailStyle19><FONT face=Arial color=black
size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal><SPAN class=EmailStyle19><FONT face=Arial color=black
size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">A real scenario for
this. If this is possible, with a .Net wrapper, one can easily use Win Forms
as render window.<o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal><SPAN class=EmailStyle19><FONT face=Arial color=black
size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal><SPAN class=EmailStyle19><FONT face=Arial color=black
size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">It would be
tremendously helpful if the answer is YES, or can be YES. Your replies are
highly appreciated.<o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal><SPAN class=EmailStyle19><FONT face=Arial color=black
size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal><SPAN class=EmailStyle19><FONT face=Arial color=black
size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Thanks,<o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal><SPAN class=EmailStyle19><FONT face=Arial color=black
size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal><SPAN class=EmailStyle19><FONT face=Arial color=black
size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Frank
Gao<o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal><SPAN class=EmailStyle19><FONT face=Arial color=black
size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal><SPAN class=EmailStyle19><FONT face=Arial color=black
size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal><SPAN class=EmailStyle18><FONT face=Arial color=black
size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></FONT></SPAN></P></DIV></BLOCKQUOTE></BODY></HTML>