[Insight-users] Dimensions of an image

Julien Jomier jjomier at cs . unc . edu
Wed, 7 Aug 2002 10:09:00 -0400


This is a multi-part message in MIME format.

------=_NextPart_000_00DB_01C23DFA.736914E0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Samuel,

If you are talking about an itk image, you could do

mySize =3D myImage->GetLargestPossibleRegion().GetSize();
Then you can access the size in each dimension (i.e. mySize[0],mySize[1] =
.... )

HTH

Julien

  ----- Original Message -----=20
  From: Samuel Rodr=EDguez Bescos=20
  To: insight-users@public.kitware.com=20
  Sent: Wednesday, August 07, 2002 9:46 AM
  Subject: [Insight-users] Dimensions of an image


  Hello everybody,

  does anybody know a way to get the size of  an image (width,height, =
etc..)?

  Thanks in advance,

  Samuel


------=_NextPart_000_00DB_01C23DFA.736914E0
Content-Type: text/html;
	charset="iso-8859-1"
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=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2713.1100" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi Samuel,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>If you are talking about an itk image, =
you could=20
do</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>mySize =3D=20
myImage-&gt;GetLargestPossibleRegion().GetSize();</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Then you can access the size in each =
dimension=20
(i.e. </FONT><FONT face=3DArial size=3D2>mySize[0],mySize[1] .... =
)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>HTH</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Julien</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A title=3Dsrodrigu@gbt.tfo.upm.es =
href=3D"mailto:srodrigu@gbt.tfo.upm.es">Samuel=20
  Rodr=EDguez Bescos</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20
  title=3Dinsight-users@public.kitware.com=20
  =
href=3D"mailto:insight-users@public.kitware.com">insight-users@public.kit=
ware.com</A>=20
  </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Wednesday, August 07, =
2002 9:46=20
  AM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> [Insight-users] =
Dimensions of an=20
  image</DIV>
  <DIV><BR></DIV>
  <DIV><FONT face=3DArial size=3D2>Hello everybody,</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>does anybody know a way to&nbsp;get =
the&nbsp;size=20
  of &nbsp;an image (width,height, etc..)?</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Thanks in advance,</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Samuel</FONT></DIV>
  <DIV><FONT face=3DArial =
size=3D2></FONT>&nbsp;</DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_00DB_01C23DFA.736914E0--