<!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.2180" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>
<DIV><FONT face=Arial size=2>Hello,</FONT></DIV>
<DIV><FONT face=Arial size=2> I would like to use
CannySegmentationLevelSetImageFilter to segment some images and for the
features, I want to use my own defined text feature files, not an image any
longer. For each pixel, the feature is a vector with length 20. So I add
</FONT></DIV>
<DIV><FONT color=#0000ff><FONT color=#0000ff>
<P>typedef</FONT><FONT color=#000000> </FONT><FONT color=#0000ff>itk</FONT><FONT
color=#000000>::</FONT><FONT color=#0000ff>Vector</FONT><FONT color=#000000><
</FONT><FONT color=#0000ff>float</FONT><FONT color=#000000>, 20 >
</FONT><FONT color=#0000ff>FeatPixelType</FONT><FONT color=#000000>;</FONT></P>
<P><FONT color=#0000ff>typedef</FONT> <FONT color=#0000ff>itk</FONT>::<FONT
color=#0000ff>Image</FONT>< <FONT color=#0000ff>FeatPixelType</FONT>, <FONT
color=#808080>Dimension</FONT> > <FONT
color=#0000ff>FeatImageType</FONT>;</P><FONT color=#0000ff>
<P><FONT face=Arial color=#000000 size=2>into the
CannySegmentationLevelSetImageFilter.cxx file, and change some words into the
following:</FONT></P>
<P>typedef</FONT><FONT color=#000000> </FONT><FONT color=#0000ff>itk</FONT><FONT
color=#000000>::</FONT><FONT color=#0000ff>ImageFileReader</FONT><FONT
color=#000000>< </FONT><FONT color=#0000ff>InternalImageType</FONT><FONT
color=#000000> > </FONT><FONT color=#0000ff>ReaderType</FONT><FONT
color=#000000>;</FONT></P>
<P><FONT color=#0000ff>typedef</FONT> <FONT color=#0000ff>itk</FONT>::<FONT
color=#0000ff>ImageFileReader</FONT>< <FONT
color=#0000ff>FeatImageType</FONT> > <FONT
color=#0000ff>FeatReaderType</FONT>;</P>
<P><FONT color=#0000ff>typedef</FONT> <FONT color=#0000ff>itk</FONT>::<FONT
color=#0000ff>ImageFileWriter</FONT>< <FONT
color=#0000ff>OutputImageType</FONT> > <FONT
color=#0000ff>WriterType</FONT>;</P>
<P><FONT color=#0000ff></FONT> </P>
<P><FONT color=#0000ff>FeatReaderType</FONT>::<FONT color=#0000ff>Pointer</FONT>
<FONT color=#808080>reader1</FONT> = <FONT
color=#0000ff>FeatReaderType</FONT>::<FONT color=#880000>New</FONT>();</P>
<P><FONT color=#0000ff>ReaderType</FONT>::<FONT color=#0000ff>Pointer</FONT>
<FONT color=#808080>reader2</FONT> = <FONT
color=#0000ff>ReaderType</FONT>::<FONT color=#880000>New</FONT>();</P>
<P><FONT color=#0000ff>WriterType</FONT>::<FONT color=#0000ff>Pointer</FONT>
<FONT color=#808080>writer</FONT> = <FONT color=#0000ff>WriterType</FONT>::<FONT
color=#880000>New</FONT>();</P><FONT color=#009900>
<P><FONT face=Arial color=#000000 size=2></FONT></FONT> </P><FONT
color=#808080>
<P>cannySegmentation</FONT><FONT color=#000000>-></FONT><FONT
color=#880000>SetInput</FONT><FONT color=#000000>( </FONT><FONT
color=#808080>reader2</FONT><FONT color=#000000>-></FONT><FONT
color=#880000>GetOutput</FONT><FONT color=#000000>() );</FONT></P>
<P><FONT color=#808080>cannySegmentation</FONT>-><FONT
color=#880000>SetFeatureImage</FONT>( <FONT
color=#808080>reader1</FONT>-><FONT color=#880000>GetOutput</FONT>() );</P>
<P><FONT color=#808080>thresholder</FONT>-><FONT
color=#880000>SetInput</FONT>( <FONT
color=#808080>cannySegmentation</FONT>-><FONT
color=#880000>GetOutput</FONT>() );</P>
<P><FONT color=#808080>writer</FONT>-><FONT color=#880000>SetInput</FONT>(
<FONT color=#808080>thresholder</FONT>-><FONT
color=#880000>GetOutput</FONT>() );</P></FONT></DIV>
<P><FONT face=Arial size=2>But when I try to compile it, there always some
errors about the pixel type with <float> and my <float,20>.
<BR>I guess I need to update the sourcecode of some .cxx files. Are there
somebody having encounted such problems and could you help me to deal with
it?</FONT></P>
<P><FONT face=Arial size=2>Thanks,</FONT></P>
<P><FONT face=Arial size=2>-Zhao</FONT></P></FONT></DIV></BODY></HTML>