<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Bookman Old Style">Hi,</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">I have two questions in Getting Started V:
Integrating ITK in your Application.</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">1. about the parameter type of
data transfer function </FONT><FONT face="Bookman Old Style">void(const
ImageType * image, ...).</FONT></DIV>
<DIV><FONT face="Bookman Old Style">Why not using const ImageType::Pointer? In
my opinion, using ImageType* as parameter cannot correctly reference count.
Return type can be ImageType * or ImageType::Pointer becaues it is assigned to a
ImgaeType::Pointer, it can be correctly reference count.</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">2. about Iterator</FONT></DIV>
<DIV><FONT face="Bookman Old Style">I think copying c++ buffer to itk::Image or
inverse using iterator is with low efficiency.</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">...</FONT></DIV>
<DIV><FONT face="Bookman Old Style">IteratorTypeit( image,
region);<BR>it.GoToBegin();<BR>const char * data= buffer;<BR>while( !
it.IsAtEnd() )<BR>{<BR>*data= it.Get();<BR>++it;<BR>++data;<BR>}</FONT></DIV>
<DIV><FONT face="Bookman Old Style">...</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">If chage the above codes to the
followed, program can run fast.</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">...</FONT></DIV>
<DIV><FONT face="Bookman Old Style">char* dataSource =
image->GetBufferPointer()</FONT></DIV>
<DIV><FONT face="Bookman Old Style">const char * data= buffer;</FONT><BR><FONT
face="Bookman Old Style">for(i = 0; i < totalNum; i++)</FONT></DIV>
<DIV><FONT face="Bookman Old Style">{</FONT></DIV>
<DIV><FONT face="Bookman Old Style"> data[i] = dataSource[i]</FONT><FONT
face="Bookman Old Style"> </FONT></DIV>
<DIV><FONT face="Bookman Old Style"><BR>}</FONT></DIV>
<DIV><FONT face="Bookman Old Style">...</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">Cheers,</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">Yixun Liu</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV></BODY></HTML>