<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" 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=US-ASCII">


<META content=Word.Document name=ProgId>
<META content="MSHTML 6.00.2800.1276" name=GENERATOR>
<META content="Microsoft Word 10" name=Originator><LINK 
href="cid:filelist.xml@01C46DA4.CE72F140" rel=File-List><o:SmartTagType 
name="PersonName" 
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:PunctuationKerning/>
  <w:DrawingGridVerticalSpacing>7,8 pt</w:DrawingGridVerticalSpacing>
  <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery>
  <w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery>
  <w:Compatibility>
   <w:SpaceForUL/>
   <w:BalanceSingleByteDoubleByteWidth/>
   <w:DoNotLeaveBackslashAlone/>
   <w:ULTrailSpace/>
   <w:DoNotExpandShiftReturn/>
   <w:AdjustLineHeightInTable/>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:ApplyBreakingRules/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
   <w:UseFELayout/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if !mso]>
<STYLE>st1\:* {
        BEHAVIOR: url(#default#ieooui)
}
</STYLE>
<![endif]-->
<STYLE>@font-face {
        font-family: SimSun;
}
@font-face {
        font-family: @SimSun;
}
@page  {mso-page-border-surround-header: no; mso-page-border-surround-footer: no; }
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin: 42.55pt; mso-footer-margin: 49.6pt; mso-paper-source: 0; layout-grid: 15.6pt; }
P.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify; mso-bidi-font-size: 12.0pt; mso-style-parent: ""; mso-pagination: none; mso-fareast-font-family: SimSun; mso-font-kerning: 1.0pt; mso-ansi-language: EN-GB
}
LI.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify; mso-bidi-font-size: 12.0pt; mso-style-parent: ""; mso-pagination: none; mso-fareast-font-family: SimSun; mso-font-kerning: 1.0pt; mso-ansi-language: EN-GB
}
DIV.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify; mso-bidi-font-size: 12.0pt; mso-style-parent: ""; mso-pagination: none; mso-fareast-font-family: SimSun; mso-font-kerning: 1.0pt; mso-ansi-language: EN-GB
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
SPAN.EmailFormatvorlage17 {
        COLOR: windowtext; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: SimSun; mso-style-type: personal-compose; mso-style-noshow: yes; mso-ansi-font-size: 9.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial
}
SPAN.SpellE {
        mso-style-name: ""; mso-spl-e: yes
}
SPAN.GramE {
        mso-style-name: ""; mso-gram-e: yes
}
DIV.Section1 {
        page: Section1
}
</STYLE>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */ 
 table.MsoNormalTable
        {mso-style-name:"Normale Tabelle";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]--></HEAD>
<BODY lang=ZH-CN style="TEXT-JUSTIFY-TRIM: punctuation; tab-interval: 21.0pt" 
vLink=purple link=blue>
<DIV><SPAN class=157364013-19072004><FONT face=Verdana color=#0000ff size=2>The 
line</FONT></SPAN></DIV>
<DIV><SPAN class=157364013-19072004><FONT face=Verdana color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=157364013-19072004><FONT face=Verdana color=#0000ff 
size=2>tmp-&gt;SetPixelContainer(pointer1-&gt;GetPixelContainer());</FONT></SPAN></DIV>
<DIV><SPAN class=157364013-19072004><FONT face=Verdana color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=157364013-19072004><FONT face=Verdana color=#0000ff 
size=2>copies a reference (pointer) from pointer1 to tmp.&nbsp; This is a 
shallow copy of the pixel data.&nbsp; So any changes you make to the pixel data 
in tmp is actually modifying the same pixel data from 
pointer1.</FONT></SPAN></DIV>
<DIV><SPAN class=157364013-19072004><FONT face=Verdana color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=157364013-19072004><FONT face=Verdana color=#0000ff 
size=2>Instead of copying the pixel container, you'll need to call Allocate() on 
tmp and then use iterators to copy the data from pointer1 to 
tmp.</FONT></SPAN></DIV>
<DIV><SPAN class=157364013-19072004><FONT face=Verdana color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=157364013-19072004><FONT face=Verdana color=#0000ff 
size=2>Another option is to run you image through a filter, setting the 
parameters of the filter to do nothing.&nbsp; For instance, you could use the 
ShiftScaleImageFilter and set the Shift to zero and the Scale to one.&nbsp; This 
is not the most efficient way to copy an image (since some trivial math is done) 
but is a simple way to create a copy of an image.</FONT></SPAN></DIV>
<DIV><SPAN class=157364013-19072004><FONT face=Verdana color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=157364013-19072004><FONT face=Verdana color=#0000ff 
size=2>Jim</FONT></SPAN></DIV>
<DIV><SPAN class=157364013-19072004><FONT face=Verdana color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=157364013-19072004><FONT face=Verdana color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> Jiang 
  [mailto:jiang@TI.Uni-Trier.DE]<BR><B>Sent:</B> Monday, July 19, 2004 9:27 
  AM<BR><B>To:</B> ITK<BR><B>Subject:</B> [Insight-users] Copy one pointer's 
  content to another pointer<BR><BR></FONT></DIV>
  <DIV class=Section1 style="LAYOUT-GRID:  15.6pt none">
  <P class=MsoNormal><FONT face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt">Hi 
  </SPAN></FONT><st1:PersonName><FONT face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt">ITK</SPAN></FONT></st1:PersonName><FONT 
  face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt"> 
  users,<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt">I want 
  to copy one </SPAN></FONT><st1:PersonName><FONT face=Arial size=1><SPAN 
  lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt">ITK</SPAN></FONT></st1:PersonName><FONT 
  face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt"> 
  pointer&#8217;s content to another </SPAN></FONT><st1:PersonName><FONT face=Arial 
  size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt">ITK</SPAN></FONT></st1:PersonName><FONT 
  face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt"> 
  pointer, so that the operation <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><SPAN class=GramE><FONT face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt">performed</SPAN></FONT></SPAN><FONT 
  face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt"> on the 
  second pointer will not influence the first 
  pointer.<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt">I do it 
  as follow:<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=1><SPAN lang=DE 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt; mso-ansi-language: DE"><SPAN 
  style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  </SPAN></SPAN></FONT><SPAN class=SpellE><FONT face=Arial size=1><SPAN 
  lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt">WriteImageType::Pointer</SPAN></FONT></SPAN><FONT 
  face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt"> 
  pointer1 already exists and has some content<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt"><SPAN 
  style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  </SPAN><SPAN class=SpellE>WriteImageType::Pointer</SPAN> <SPAN 
  class=SpellE>tmp</SPAN> = <SPAN class=SpellE>WriteImageType::<SPAN 
  class=GramE>New</SPAN></SPAN><SPAN class=GramE>(</SPAN>);//copy pointer1&#8217;s 
  content to <SPAN class=SpellE>tmp</SPAN><o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt"><SPAN 
  style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN class=SpellE><SPAN 
  class=GramE>tmp</SPAN></SPAN>-&gt;<SPAN 
  class=SpellE>SetRequestedRegion</SPAN>( pointer1-&gt;<SPAN 
  class=SpellE>GetRequestedRegion</SPAN>() );<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt"><SPAN 
  style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN class=SpellE><SPAN 
  class=GramE>tmp</SPAN></SPAN>-&gt;<SPAN class=SpellE>SetBufferedRegion</SPAN>( 
  pointer1-&gt;<SPAN class=SpellE>GetBufferedRegion</SPAN>() 
  );<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt"><SPAN 
  style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN class=SpellE><SPAN 
  class=GramE>tmp</SPAN></SPAN>-&gt;<SPAN 
  class=SpellE>SetLargestPossibleRegion</SPAN>( pointer -&gt;<SPAN 
  class=SpellE>GetLargestPossibleRegion</SPAN>() );<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt"><SPAN 
  style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN class=SpellE><SPAN 
  class=GramE>tmp</SPAN></SPAN>-&gt;<SPAN 
  class=SpellE>SetPixelContainer</SPAN>(pointer1-&gt;<SPAN 
  class=SpellE>GetPixelContainer</SPAN>() );<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt"><SPAN 
  style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN class=SpellE><SPAN 
  class=GramE>tmp</SPAN></SPAN>-&gt;<SPAN class=SpellE>CopyInformation</SPAN>( 
  pointer1 );<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt">Now I 
  can operate the <SPAN class=SpellE>tmp&#8217;s</SPAN> content. However it still 
  <SPAN class=GramE>affect</SPAN> pointer1. It seems that all operations 
  <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><SPAN class=GramE><FONT face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt">performed</SPAN></FONT></SPAN><FONT 
  face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt"> on 
  <SPAN class=SpellE>tmp</SPAN> are same as performed on 
  pointer1.<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt">How can 
  I copy one pointer totally to another one?<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt">Thanks!<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><SPAN class=SpellE><FONT face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt">Jiang</SPAN></FONT></SPAN><FONT 
  face=Arial size=1><SPAN lang=EN-GB 
  style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-bidi-font-size: 10.0pt"><o:p></o:p></SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML>