<!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.2873" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Hi Zach:</FONT></DIV>
<DIV><FONT size=2> The program can finish now ,but the
result is error. there are nothing in the output image.</FONT></DIV>
<DIV><FONT size=2>here are the outputs of this program. </FONT><FONT
size=3>Whether there are something else i needed to do ?</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>E:\ITK\bin>g3 n46.tif s1.tif 135 337 156 354 180 371 1 1
0.5 0.02 m1.mha 3 pca 1<BR>35 330<BR>1: 0.217925 [0, 0, 0, 0, 135, 330]<BR>2:
0.217924 [0, 0, 0, 0, 135, 330]<BR>3: 0.219151 [0, 0, 0, 0, 135, 330]<BR>4:
0.219156 [0, 0, 0, 0, 135, 330]<BR>5: 0.219156 [0, 0, 0, 0, 135, 330]<BR>6:
0.219156 [0, 0, 0, 0, 135, 330]<BR>7: 0.219156 [0, 0, 0, 0, 135, 330]<BR>8:
0.249912 [0, 0, 0, 0, 135, 330]<BR>9: 0 [0, 0, 0, 0, 135, 330]</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>Max. no. iterations: 400<BR>Max. RMS error: 0.005</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>No. elpased iterations: 9<BR>RMS change: 0<BR>Parameters: [0,
0, 0, 0, 135, 330] </FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Thanks</FONT></DIV>
<DIV><FONT size=2>sunli</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV style="FONT: 9pt 宋体">----- Original Message -----
<DIV style="BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> <A
title=kacking123@163.com href="mailto:kacking123@163.com">sun</A> </DIV>
<DIV><B>To:</B> <A title=zpincus@stanford.edu
href="mailto:zpincus@stanford.edu">zpincus@stanford.edu</A> ; <A
title=insight-users@itk.org
href="mailto:insight-users@itk.org">insight-users@itk.org</A> </DIV>
<DIV><B>Sent:</B> Wednesday, May 31, 2006 2:58 PM</DIV>
<DIV><B>Subject:</B> Fw: [Insight-users] How to compute "PCA s hape
model"?</DIV></DIV>
<DIV><BR></DIV>
<DIV><FONT size=2>Hi Zach:</FONT></DIV>
<DIV><FONT size=2> I have find some test code of </FONT><FONT
size=3>itkImagePCAShapeModelEstimator class, and generated mean image and
3 PCAShapeModel outputs successfully(all in mha files).</FONT></DIV>
<DIV>But when i gave them to the quoted code of Geodesic Active Contours
Segmentation with Shape Guidance, an error occured and the program
aborted. I want to know whether there are something else i needed to do
?</DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Thanks </FONT></DIV>
<DIV><FONT size=2>sunli</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV style="FONT: 9pt 宋体">----- Original Message -----
<DIV style="BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> <A
title=kacking123@163.com href="mailto:kacking123@163.com">sun</A> </DIV>
<DIV><B>To:</B> <A title=insight-users@itk.org
href="mailto:insight-users@itk.org">insight-users</A> ; <A
title=zpincus@stanford.edu
href="mailto:zpincus@stanford.edu">zpincus@stanford.edu</A> </DIV>
<DIV><B>Sent:</B> Tuesday, May 30, 2006 7:49 PM</DIV>
<DIV><B>Subject:</B> Re: [Insight-users] How to compute "PCA s hape
model"?</DIV></DIV>
<DIV><BR></DIV>
<DIV>Hi Zach :<BR> I have generated three Signed
Distance Maps with SignedDanielssonDistanceMapImageFilter,and stored them in mha
files,I want to use them as the TrainingImage. Now i have a question that
how can i give these inputs to the itkImagePCAShapeModelEstimator? There are 3
TrainingImages and they are accessed using
"this->getinput(0),this->getinput(1),this->getinput(2) in the
itkImagePCAShapeModelEstimator class.</DIV>
<DIV> Here is my code, it can't work.</DIV>
<DIV> </DIV>
<DIV> const unsigned
int Dimension = 2;</DIV>
<DIV> typedef float my_PixelType;<BR> typedef
itk::Image< my_PixelType, Dimension >
signdis_ImageType;<BR> std::vector<signdis_ImageType::Pointer>
signdisImages( 3 );<BR> <BR> typedef itk::ImageFileReader<
signdis_ImageType > ReaderType;<BR> typedef
itk::ImageFileWriter< signdis_ImageType > WriterType;</DIV>
<DIV> ReaderType::Pointer reader = ReaderType::New();<BR>
WriterType::Pointer writer = WriterType::New();</DIV>
<DIV> reader->SetFileName( argv[1] );<BR>
reader->Update();<BR> signdisImages[0] =
reader->GetOutput();<BR> reader->SetFileName( argv[2] );<BR>
reader->Update();<BR> signdisImages[1] =
reader->GetOutput();<BR> reader->SetFileName( argv[3] );<BR>
reader->Update();<BR> signdisImages[2] = reader->GetOutput();</DIV>
<DIV><BR> typedef itk::ImagePCAShapeModelEstimator<<BR>
signdis_ImageType, <BR> signdis_ImageType >
my_Estimatortype;</DIV>
<DIV> my_Estimatortype::Pointer filter = my_Estimatortype::New();
<BR> filter->SetInput( signdisImages );
// error here!!!!!!!!!!!!!!!!!!!!!</DIV>
<DIV> writer->SetFileName( argv[4] );<BR> writer->SetInput(
filter->GetOutput(0) );<BR> writer->Update(); <BR>
writer->SetFileName( argv[5] );<BR> writer->SetInput(
filter->GetOutput(1) );<BR> writer->Update(); </DIV>
<DIV> ........</DIV>
<DIV> </DIV>
<DIV>Thanks</DIV>
<DIV>sunli</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><BR>----- Original Message ----- <BR>From: "Zachary Pincus" <<A
href="mailto:zpincus@stanford.edu">zpincus@stanford.edu</A>><BR>To: "sun"
<<A href="mailto:kacking123@163.com">kacking123@163.com</A>><BR>Cc: <<A
href="mailto:insight-users@itk.org">insight-users@itk.org</A>><BR>Sent:
Tuesday, May 30, 2006 2:55 AM<BR>Subject: Re: [Insight-users] How to compute
"PCA shape model"?<BR><BR><BR><BR>> Hi Zach
:<BR>> Thank you for your
reply.<BR>> I have read the code in
itkImagePCAShapeModelEstimator.txx . It <BR>> seems that the mean image
and principal component outputs are<BR>> generated in this class,and the
inputs of this class is <BR>> TrainingImages.<BR><BR>This is
correct.<BR><BR>> So i wondered what the "signed distance maps a set
of<BR>> training shapes " mean in your reply, and how can i input these
<BR>> images.<BR><BR>Use one of the Signed Distance Map filters available in
ITK (there <BR>are several, check out the Doxygen class list) to convert
binary <BR>training images (spanning the space of possible shapes you wish
to <BR>segment) into signed distance maps, where each pixel's value is
the <BR>distance from that pixel to the nearest edge of the binary
object <BR>(and the pixel's value is negative if it is inside the object).
This <BR>then represents each shape as the zero-level set of an
image.<BR><BR>> In the quoted code, the shape model
defined by <BR>> CorpusCallosumMeanShape.mha and the first three
principal<BR>> components CorpusCallosumMode0.mha, CorpusCallosumMode1.mha
and <BR>> CorpusCallosumMode12.mha. How can i generate<BR>> these
mha files? Can i write the principal component outputs of <BR>>
itkImagePCAShapeModelEstimator class in mha files<BR>>
directly?<BR><BR>That is correct. Or you could use them directly without writing
them <BR>to files.<BR><BR><BR><BR>><BR>> Thanks<BR>>
Sunli<BR>><BR>> ----- Original Message -----<BR>> From: "Zachary
Pincus" <<A
href="mailto:zpincus@stanford.edu">zpincus@stanford.edu</A>><BR>> To:
"sun" <<A href="mailto:kacking123@163.com">kacking123@163.com</A>><BR>>
Cc: "itk" <<A
href="mailto:insight-users@itk.org">insight-users@itk.org</A>><BR>> Sent:
Sunday, May 28, 2006 3:41 AM<BR>> Subject: Re: [Insight-users] How to compute
"PCA shape model"?<BR>><BR>><BR>><BR>> This is a longstanding gap in
the documentation.<BR>><BR>> In brief, you will need to generate signed
distance maps of a set of<BR>> training shapes, and pass them to the
PCAShapeModelEstimator class.<BR>> You may then choose to divide the returned
"shape mode" images (note<BR>> that output zero from the model estimator is
the mean image) by the<BR>> reported standard deviations, as described in the
example.<BR>><BR>> Let me know if more detail is required.<BR>><BR>>
Zach Pincus<BR>><BR>> Program in Biomedical Informatics and Department of
Biochemistry<BR>> Stanford University School of
Medicine<BR>><BR>><BR>> On May 27, 2006, at 12:06 AM, sun
wrote:<BR>><BR>>> Hi all:<BR>>> I
am using the filter "Geodesic Active Contours Segmentation<BR>>> with
Shape Guidance" to<BR>>> segment my image now.But the quoted code
just reads in a "PCA<BR>>> shape model" that has been
pre-computed<BR>>> earlier. I want to know how to compute such a shape
model in ITK.<BR>>> Who can help
me?<BR>>>
sun li<BR>>><BR>>><BR></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV><SPAN></SPAN><BR><!-- footer --><BR><BR><BR><BR><BR>
<DIV style="BORDER-BOTTOM: #999 1px solid"></DIV><BR><FONT
style="FONT-SIZE: 14px" color=black>你 不 想 试 试 今 夏 最 “酷” 的 邮 箱 吗 ?</FONT> <BR><A
style="FONT-SIZE: 13px; COLOR: blue; LINE-HEIGHT: 160%"
href="http://www.126.com/" target=_blank>蕴 涵 中 华 传 统 文 化 于 世 界 一 流 科 技 之 中,创 新
Ajax 技 术,126 “D 计 划”火 热 体 验 中 ! </A>
<P>
<HR>
<P></P>_______________________________________________<BR>Insight-users mailing
list<BR>Insight-users@itk.org<BR>http://www.itk.org/mailman/listinfo/insight-users<BR>
<P>
<HR>
<P></P>_______________________________________________<BR>Insight-users mailing
list<BR>Insight-users@itk.org<BR>http://www.itk.org/mailman/listinfo/insight-users<BR></BODY></HTML>