[Insight-users] The saved file is always empty
chuc
b9003211 at stmail2.cgu.edu.tw
Mon, 8 Mar 2004 19:14:18 +0800
This is a multi-part message in MIME format.
------=_NextPart_000_0005_01C40541.8DE16AB0
Content-Type: text/plain;
charset="big5"
Content-Transfer-Encoding: quoted-printable
Hello :
I had a problem.When I reading an image successfully and want to save it =
,
however ,the image which I saved is empty (0 kB) .
I don't know where the problem is. =20
=20
This is my code:
BOOL CMy1Doc::OnSaveDocument(LPCTSTR lpszPathName)=20
{
// TODO: Add your specialized code here and/or call the base class
m_ImageWriter->SetFileName( lpszPathName );
m_ImageWriter->SetInput(m_image);
try {
m_ImageWriter->Update();
}
catch (itk::ExceptionObject & err)
{
AfxMessageBox("err");
}
return CDocument::OnSaveDocument(lpszPathName);
}
=
Thanks!! =20
=
=
------=_NextPart_000_0005_01C40541.8DE16AB0
Content-Type: text/html;
charset="big5"
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=3Dbig5">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>Hello :</DIV>
<DIV> </DIV>
<DIV>I had a problem.When I reading an image successfully and want to =
save it=20
,</DIV>
<DIV> </DIV>
<DIV>however ,the image which I saved is empty (0 kB) .</DIV>
<DIV> </DIV>
<DIV>I don't know where the problem =
is. =20
</DIV>
<DIV> &n=
bsp; &nb=
sp; &nbs=
p;  =
; =
</DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV>This is my code:</DIV>
<DIV> </DIV>
<DIV><FONT color=3D#ff0000>BOOL CMy1Doc::OnSaveDocument(LPCTSTR =
lpszPathName)=20
<BR>{<BR> // TODO: Add your specialized code here and/or call the =
base=20
class<BR> m_ImageWriter->SetFileName( lpszPathName=20
);<BR> m_ImageWriter->SetInput(m_image);</FONT></DIV>
<DIV><FONT color=3D#ff0000></FONT> </DIV>
<DIV><FONT color=3D#ff0000> try=20
{<BR> m_ImageWriter->Update();<BR> }<BR> catch=20
(itk::ExceptionObject &=20
err)<BR> {<BR> AfxMessageBox("err");<BR> }</FONT></D=
IV><FONT=20
size=3D2>
<DIV><BR><FONT color=3D#ff0000 size=3D3> return=20
CDocument::OnSaveDocument(lpszPathName);<BR>}</FONT></DIV>
<DIV><FONT=20
size=3D3> &nbs=
p;  =
; =
&=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p;  =
; =
Thanks!!  =
; =20
</FONT></DIV>
<DIV> &n=
bsp; &nb=
sp; &nbs=
p;  =
; =
&=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p;  =
; =
&=
nbsp; &n=
bsp; &nb=
sp; </FONT></DIV></BODY></HTML>
------=_NextPart_000_0005_01C40541.8DE16AB0--