[Insight-users] question about SimpleFuzzyConnectednessScalarImageFilter

Yinpeng Jin yj76 at columbia . edu
Wed, 17 Dec 2003 10:19:14 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_0075_01C3C487.38869900
Content-Type: text/plain;
	charset="gb2312"
Content-Transfer-Encoding: quoted-printable

you can basically do the following after your code.

  itk::PNGImageIO::Pointer io;
  io =3D itk::PNGImageIO::New();

  itk::ImageFileWriter<BinaryImageType>::Pointer writer;
  writer =3D itk::ImageFileWriter<BinaryImageType>::New();
  writer->SetInput(fuzzysegmenter->GetOutput());
  writer->SetFileName("junk.png");
  writer->SetImageIO(io);
  writer->Write();


Yinpeng.


----- Original Message -----=20
From: "=CB=CE=CC=CE" <prog_st at 163 . com>
To: <insight-users at itk . org>
Sent: Wednesday, December 17, 2003 12:41 AM
Subject: [Insight-users] question about
SimpleFuzzyConnectednessScalarImageFilter


> Hi Luis,
>
> I have a question about SimpleFuzzyConnectednessScalarImageFilter.
>
> How to transform its(SimpleFuzzyConnectednessScalarImageFilter) result
into a png file?
>
> source code is following:
>
> const    unsigned int Dimension =3D 2 ;
> typedef itk::Image< InputPixelType, Dimension >  InputImageType;
> typedef  bool BinaryPixelType;
> typedef  itk::Image< BinaryPixelType, Dimension >  BinaryImageType;
> typedef  itk::SimpleFuzzyConnectednessScalarImageFilter< =
InputImageType,
BinaryImageType >  FuzzySegmentationFilterType;
> typedef  itk::ImageFileReader< InputImageType > ReaderType;
>
> ...
>
> ReaderType::Pointer reader =3D ReaderType::New();
> reader->SetFileName( "D:/mjhg.png" );
>
> FuzzySegmentationFilterType::Pointer fuzzysegmenter =3D
FuzzySegmentationFilterType::New();
> fuzzysegmenter->SetInput( reader->GetOutput() );
> fuzzysegmenter->SetObjectsSeed( index );
> fuzzysegmenter->SetMean( mean );
> fuzzysegmenter->SetVariance( variance );
> fuzzysegmenter->SetThreshold( 0.5 );
> fuzzysegmenter->Update();
>
> ??????
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=CD=F8=D2=D7VIP=CA=D5=B7=D1=D3=CA=CF=E4=C1=BD
=D6=DC=C4=EA=B3=AC=D6=B5=D3=C5=BB=DD! =C2=FA1=D4=F96=A3=A1=A3=A1=A1=A1   =
       http://vip . 163 . com
> =
=D6=D0=B9=FA=D7=EE=B4=F3=B5=C4=C3=E2=B7=D1=D3=CA=CF=E4=D4=DA=B5=C8=C4=E3 =
25=D5=D7=BF=D5=BC=E44=D5=D7=B8=BD=BC=FE=A3=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=
 http://mail . 163 . com
> =B5=E3=BB=F7=CD=F8=D2=D7=C5=DD=C5=DD=BE=AA=CF=B2=CE=DE=CF=DE =
=C8=AB=C3=E2=B7=D1=CA=D6=BB=FA=B6=CC=D0=C5=C8=CE=C4=E3=B7=A2!=A1=A1=A1=A1=
=A1=A1=A1=A1=A1=A1=A1=A1
http://popo . 163 . com=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=
=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=C8=9E=C8=A0=86=DF=EE=B1=
=EA=EC=99=A8=A5=8Ax%=8A=CBH=9E=C8=A0=86=DF=EE=B1=EA=EC=FE+d=FE=8A=E0=86=DB=
i=FF=FF=F0=C3=0F=E2=B6O=E8=AE=0F=E6j)fj=7F=E5=8A=CBb=9D=FA?=8A{"?=FF=BA=C7=


------=_NextPart_000_0075_01C3C487.38869900
Content-Type: text/html;
	charset="gb2312"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dgb2312">
<META content=3D"MSHTML 6.00.2800.1264" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2><FONT size=3D3>you can basically do the =
following=20
after your code.<BR><BR>&nbsp; itk::PNGImageIO::Pointer io;<BR>&nbsp; io =
=3D=20
itk::PNGImageIO::New();<BR><BR>&nbsp;=20
itk::ImageFileWriter&lt;BinaryImageType&gt;::Pointer writer;<BR>&nbsp; =
writer =3D=20
itk::ImageFileWriter&lt;BinaryImageType&gt;::New();<BR>&nbsp;=20
writer-&gt;SetInput(fuzzysegmenter-&gt;GetOutput());<BR>&nbsp;=20
writer-&gt;SetFileName("junk.png");<BR>&nbsp;=20
writer-&gt;SetImageIO(io);<BR>&nbsp;=20
writer-&gt;Write();<BR><BR><BR>Yinpeng.<BR><BR><BR>----- Original =
Message -----=20
<BR>From: "=CB=CE=CC=CE" &lt;</FONT><A =
href=3D"mailto:prog_st at 163 . com"><FONT=20
size=3D3>prog_st at 163 . com</FONT></A><FONT size=3D3>&gt;<BR>To: =
&lt;</FONT><A=20
href=3D"mailto:insight-users at itk . org"><FONT=20
size=3D3>insight-users at itk . org</FONT></A><FONT size=3D3>&gt;<BR>Sent: =
Wednesday,=20
December 17, 2003 12:41 AM<BR>Subject: [Insight-users] question=20
about<BR>SimpleFuzzyConnectednessScalarImageFilter<BR><BR><BR>&gt; Hi=20
Luis,<BR>&gt;<BR>&gt; I have a question about=20
SimpleFuzzyConnectednessScalarImageFilter.<BR>&gt;<BR>&gt; How to =
transform=20
its(SimpleFuzzyConnectednessScalarImageFilter) result<BR>into a png=20
file?<BR>&gt;<BR>&gt; source code is following:<BR>&gt;<BR>&gt;=20
const&nbsp;&nbsp;&nbsp; unsigned int Dimension =3D 2 ;<BR>&gt; typedef=20
itk::Image&lt; InputPixelType, Dimension &gt;&nbsp; =
InputImageType;<BR>&gt;=20
typedef&nbsp; bool BinaryPixelType;<BR>&gt; typedef&nbsp; itk::Image&lt; =

BinaryPixelType, Dimension &gt;&nbsp; BinaryImageType;<BR>&gt; =
typedef&nbsp;=20
itk::SimpleFuzzyConnectednessScalarImageFilter&lt;=20
InputImageType,<BR>BinaryImageType &gt;&nbsp;=20
FuzzySegmentationFilterType;<BR>&gt; typedef&nbsp; =
itk::ImageFileReader&lt;=20
InputImageType &gt; ReaderType;<BR>&gt;<BR>&gt; ...<BR>&gt;<BR>&gt;=20
ReaderType::Pointer reader =3D ReaderType::New();<BR>&gt; =
reader-&gt;SetFileName(=20
"D:/mjhg.png" );<BR>&gt;<BR>&gt; FuzzySegmentationFilterType::Pointer=20
fuzzysegmenter =3D<BR>FuzzySegmentationFilterType::New();<BR>&gt;=20
fuzzysegmenter-&gt;SetInput( reader-&gt;GetOutput() );<BR>&gt;=20
fuzzysegmenter-&gt;SetObjectsSeed( index );<BR>&gt; =
fuzzysegmenter-&gt;SetMean(=20
mean );<BR>&gt; fuzzysegmenter-&gt;SetVariance( variance );<BR>&gt;=20
fuzzysegmenter-&gt;SetThreshold( 0.5 );<BR>&gt;=20
fuzzysegmenter-&gt;Update();<BR>&gt;<BR>&gt; ??????<BR>&gt;=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=CD=F8=D2=D7VIP=CA=D5=B7=D1=D3=CA=CF=E4=C1=BD<BR>=D6=DC=
=C4=EA=B3=AC=D6=B5=D3=C5=BB=DD!=20
=C2=FA1=D4=F96=A3=A1=A3=A1=A1=A1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; </FONT><A=20
href=3D"http://vip . 163 . com"><FONT =
size=3D3>http://vip . 163 . com</FONT></A><BR><FONT=20
size=3D3>&gt; =
=D6=D0=B9=FA=D7=EE=B4=F3=B5=C4=C3=E2=B7=D1=D3=CA=CF=E4=D4=DA=B5=C8=C4=E3 =
25=D5=D7=BF=D5=BC=E44=D5=D7=B8=BD=BC=FE=A3=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=
 </FONT><A=20
href=3D"http://mail . 163 . com"><FONT =
size=3D3>http://mail . 163 . com</FONT></A><BR><FONT=20
size=3D3>&gt; =
=B5=E3=BB=F7=CD=F8=D2=D7=C5=DD=C5=DD=BE=AA=CF=B2=CE=DE=CF=DE =
=C8=AB=C3=E2=B7=D1=CA=D6=BB=FA=B6=CC=D0=C5=C8=CE=C4=E3=B7=A2!=A1=A1=A1=A1=
=A1=A1=A1=A1=A1=A1=A1=A1<BR></FONT><A=20
href=3D"http://popo . 163 . com"><FONT =
size=3D3>http://popo . 163 . com</FONT></A><FONT=20
size=3D3>=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=
=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=C8=9E=C8=A0=86=DF=EE=B1=EA=EC=99=A8=
=A5=8Ax%=8A=CBH=9E=C8=A0=86=DF=EE=B1=EA=EC=FE+d=FE=8A=E0=86=DBi=FF=FF=F0=C3=
=0F=E2=B6O=E8=AE=0F=E6j)fj=7F=E5=8A=CBb=9D=FA?=8A{"?=FF=BA=C7</FONT><BR><=
/FONT></DIV></BODY></HTML>

------=_NextPart_000_0075_01C3C487.38869900--