[Insight-developers] how to read in a .raw image

Julien Jomier jjomier@cs.unc.edu
Wed, 12 Feb 2003 23:08:11 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_0024_01C2D2EB.9D76C7B0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi Ting,
 
You can look at Insight/Testing/Code/IO/itkRawImageIOTest2.cxx
Basically you have to create an ImageIO and set the parameters you need
manually:
 io->SetDimensions(i,dim[i]);
 
and give the IO to the reader via reader->SetImageIO(io);
 
Hope this helps
 
Julien

-----Original Message-----
From: insight-developers-admin@public.kitware.com
[mailto:insight-developers-admin@public.kitware.com] On Behalf Of Ting
Chen
Sent: Wednesday, February 12, 2003 10:58 PM
To: Insight Developers
Subject: [Insight-developers] how to read in a .raw image


Hi! If I have a 3D image volume which is in the .raw format. How can I
use imagereader to read it in? 
for example, if I have a .raw dataset whose size is 256*256*10. how can
the image reader tell it is not a 256*2560 2D image?
 
thanks
 
ting
 


------=_NextPart_000_0024_01C2D2EB.9D76C7B0
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<TITLE>Message</TITLE>

<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><SPAN class=3D341340404-13022003><FONT face=3DArial color=3D#0000ff =
size=3D2>Hi=20
Ting,</FONT></SPAN></DIV>
<DIV><SPAN class=3D341340404-13022003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D341340404-13022003><FONT face=3DArial color=3D#0000ff =
size=3D2>You=20
can look at =
Insight/Testing/Code/IO/itkRawImageIOTest2.cxx</FONT></SPAN></DIV>
<DIV><SPAN class=3D341340404-13022003><FONT face=3DArial color=3D#0000ff =

size=3D2>Basically you have to create an ImageIO and set the parameters =
you=20
need&nbsp;manually:</FONT></SPAN></DIV>
<DIV><SPAN class=3D341340404-13022003><FONT face=3DArial color=3D#0000ff =

size=3D2>&nbsp;io-&gt;SetDimensions(i,dim[i]);</FONT></SPAN></DIV>
<DIV><SPAN class=3D341340404-13022003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D341340404-13022003><FONT face=3DArial color=3D#0000ff =
size=3D2>and=20
give the IO to the reader via </FONT></SPAN><SPAN =
class=3D341340404-13022003><FONT=20
face=3DArial color=3D#0000ff =
size=3D2>reader-&gt;SetImageIO(io);</FONT></SPAN></DIV>
<DIV><SPAN class=3D341340404-13022003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D341340404-13022003><FONT face=3DArial color=3D#0000ff =
size=3D2>Hope=20
this helps</FONT></SPAN></DIV>
<DIV><SPAN class=3D341340404-13022003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D341340404-13022003><FONT face=3DArial color=3D#0000ff =

size=3D2>Julien</FONT></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid; MARGIN-RIGHT: 0px">
  <DIV></DIV>
  <DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr =
align=3Dleft><FONT=20
  face=3DTahoma size=3D2>-----Original Message-----<BR><B>From:</B>=20
  insight-developers-admin@public.kitware.com=20
  [mailto:insight-developers-admin@public.kitware.com] <B>On Behalf Of =
</B>Ting=20
  Chen<BR><B>Sent:</B> Wednesday, February 12, 2003 10:58 =
PM<BR><B>To:</B>=20
  Insight Developers<BR><B>Subject:</B> [Insight-developers] how to read =
in a=20
  .raw image<BR><BR></FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>Hi! If I have a 3D image volume which =
is in the=20
  .raw format. How can I use imagereader to read it in? </FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>for example, if I have a .raw dataset =
whose size=20
  is 256*256*10. how can the image reader tell it is not a 256*2560 2D=20
  image?</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>thanks</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>ting</FONT></DIV>
  <DIV><FONT face=3DArial =
size=3D2></FONT>&nbsp;</DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0024_01C2D2EB.9D76C7B0--