[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> itk::PNGImageIO::Pointer io;<BR> io =
=3D=20
itk::PNGImageIO::New();<BR><BR> =20
itk::ImageFileWriter<BinaryImageType>::Pointer writer;<BR> =
writer =3D=20
itk::ImageFileWriter<BinaryImageType>::New();<BR> =20
writer->SetInput(fuzzysegmenter->GetOutput());<BR> =20
writer->SetFileName("junk.png");<BR> =20
writer->SetImageIO(io);<BR> =20
writer->Write();<BR><BR><BR>Yinpeng.<BR><BR><BR>----- Original =
Message -----=20
<BR>From: "=CB=CE=CC=CE" <</FONT><A =
href=3D"mailto:prog_st at 163 . com"><FONT=20
size=3D3>prog_st at 163 . com</FONT></A><FONT size=3D3>><BR>To: =
<</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>><BR>Sent: =
Wednesday,=20
December 17, 2003 12:41 AM<BR>Subject: [Insight-users] question=20
about<BR>SimpleFuzzyConnectednessScalarImageFilter<BR><BR><BR>> Hi=20
Luis,<BR>><BR>> I have a question about=20
SimpleFuzzyConnectednessScalarImageFilter.<BR>><BR>> How to =
transform=20
its(SimpleFuzzyConnectednessScalarImageFilter) result<BR>into a png=20
file?<BR>><BR>> source code is following:<BR>><BR>>=20
const unsigned int Dimension =3D 2 ;<BR>> typedef=20
itk::Image< InputPixelType, Dimension > =
InputImageType;<BR>>=20
typedef bool BinaryPixelType;<BR>> typedef itk::Image< =
BinaryPixelType, Dimension > BinaryImageType;<BR>> =
typedef =20
itk::SimpleFuzzyConnectednessScalarImageFilter<=20
InputImageType,<BR>BinaryImageType > =20
FuzzySegmentationFilterType;<BR>> typedef =
itk::ImageFileReader<=20
InputImageType > ReaderType;<BR>><BR>> ...<BR>><BR>>=20
ReaderType::Pointer reader =3D ReaderType::New();<BR>> =
reader->SetFileName(=20
"D:/mjhg.png" );<BR>><BR>> FuzzySegmentationFilterType::Pointer=20
fuzzysegmenter =3D<BR>FuzzySegmentationFilterType::New();<BR>>=20
fuzzysegmenter->SetInput( reader->GetOutput() );<BR>>=20
fuzzysegmenter->SetObjectsSeed( index );<BR>> =
fuzzysegmenter->SetMean(=20
mean );<BR>> fuzzysegmenter->SetVariance( variance );<BR>>=20
fuzzysegmenter->SetThreshold( 0.5 );<BR>>=20
fuzzysegmenter->Update();<BR>><BR>> ??????<BR>>=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  =
; </FONT><A=20
href=3D"http://vip . 163 . com"><FONT =
size=3D3>http://vip . 163 . com</FONT></A><BR><FONT=20
size=3D3>> =
=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>> =
=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--