[Insight-developers] VectorLinearInterpolateImageFunction

Miller, James V (Research) millerjv at crd.ge.com
Wed, 12 May 2004 15:43:59 -0400


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C43859.782FA746
Content-Type: text/plain

Lydia, 
 
I really do not want to have separate filters and ImageFunctions.  What I
really want is for Evaluate() to return the same FixedArray subclass as the
input image (permitting Evaluate() to change the component type to
RealType).
 
I'd love to be able to write code:
 
outIt.Set( vectorFunction.Evaluate( inIt.Get() ) );
 
But with the conversion to a component type of RealType, I am willing to
accept being able
to write
 
v.CastFrom( vectorFunction.Evaluate( inIt.Get() ) );
outIt.Set( v );
 
Another approach is to extend the use of the CastFrom() method in the
FixedArray subclasses. I think I like this idea.  Right now the CastFrom()
method allows you to, for instance, cast a Vector<double, N> to a
Vector<float, N>.  We could extend this so that
you can CastFrom a FixedArray<T1, N> to a Vector<T2, N>.
 
We have been avoiding having implicit type conversions between various
vector types so that we can enforce using the proper vector types for
operations.
 
Jim
-----Original Message-----
From: Lydia Ng [mailto:lng at insightful.com]
Sent: Wednesday, May 12, 2004 1:50 PM
To: Miller, James V (Research); Insight-developers (E-mail)
Subject: RE: [Insight-developers] VectorLinearInterpolateImageFunction


Jim,
 
In a way VectorInterpolateImageFunction mirrors the way
InterpolateImageFunction is used.
 
For example, InterpolateImageFunction always return TInputImage::RealType
and it's up to the calling class/object (e.g ResampleImageFilter) to do the
conversion to whatever type is finally required
 
Currently the VectorReampleImageFilter can resample any vector-type images
(Vector, CovariantVector, Point) because it internally does the conversion
from FixedArray to the right vector/point etc type.
 
Would the proposed changes also mean separate ResampleImageFilter for
Vectors, CovariantVectors, and Points etc?
 
-Lydia
 
-----Original Message-----
From: Miller, James V (Research) [mailto:millerjv at crd.ge.com] 
Sent: Wednesday, May 12, 2004 7:25 AM
To: Insight-developers (E-mail)
Subject: [Insight-developers] VectorLinearInterpolateImageFunction
 
The documentation for VectorLinearInterpolateImageFunction says the
OutputType is
Vector<double, dimension>.  But it really gets the OutputType from its
superclass.
 
Its superclass, VectorInterpolateImageFunction says the OutputType is really
FixedArray<RealType, Dimension> (where RealType is the realtype of the input
image pixel component type).  
 
I want to perform linear interpolation on a image of Vector<float, 2>.  But
the return type from Evaluate(), gives me a FixedArray<double, 2>. Of
course, we have no conversion
operators that will take a FixedArray<double, 2> to a Vector<float, 2>.
 
I imagine in general, we cannot have the return type of Evaluate() be the
pixel type of the 
input image.  If someone has an image of Vector<short, 2> the interpolated
value should probably be a Vector<RealType, 2>.
 
However, since my image was already of Vector<float, 2>, I expected the
interpolated
value to be a Vector<float, 2>. I wasn't expecting to get a FixedArray. 
 
That being said, I understand why it written this way. As it is written now,
the VectorLinearInterpolateImageFunction can be applied to an image of
anything that supports the API of FixedArray (Vector, CovariantVector,
Point).  But the output is always a FixedArray<double, D>. (I assumed with a
name of VectorLinearInterpolateImageFunction, that the image function
interpolated images of Vectors.)
 
But if we wanted the output to be the same subclass of FixedArray with a
different component type (Vector<short, 2) --> Vector<RealType, 2>) then we
would probably need
separate ImageFunctions to interpolate Vectors, CovariantVectors, and
Points. Or we could use some scary non-portable template magic.
 
Aside from fixing the documentation, does anyone have any other suggestions
before I dive into compiler magic?
 
Jim Miller 
_____________________________________
Visualization & Computer Vision
GE Research
Bldg. KW, Room C218B
P.O. Box 8, Schenectady NY 12301

millerjv at research.ge.com <mailto:millerjv at research.ge.com> 
james.miller at research.ge.com
(518) 387-4005, Dial Comm: 8*833-4005, 
Cell: (518) 505-7065, Fax: (518) 387-6981 
 

------_=_NextPart_001_01C43859.782FA746
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns=3D"http://www.w3.org/TR/REC-html40" xmlns:o =3D=20
"urn:schemas-microsoft-com:office:office" xmlns:w =3D=20
"urn:schemas-microsoft-com:office:word" xmlns:st1 =3D=20
"urn:schemas-microsoft-com:office:smarttags"><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">


<META content=3DWord.Document name=3DProgId>
<META content=3D"MSHTML 6.00.2800.1276" name=3DGENERATOR>
<META content=3D"Microsoft Word 10" name=3DOriginator><LINK=20
href=3D"cid:filelist.xml at 01C4380E.CE094C70" =
rel=3DFile-List><o:SmartTagType=20
name=3D"country-region"=20
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"></o:SmartTag=
Type><o:SmartTagType=20
name=3D"place"=20
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"></o:SmartTag=
Type><!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if !mso]>
<STYLE>st1\:* {
	BEHAVIOR: url(#default#ieooui)
}
</STYLE>
<![endif]-->
<STYLE> at font-face {
	font-family: Tahoma;
}
 at font-face {
	font-family: Verdana;
}
 at font-face {
	font-family: Comic Sans MS;
}
 at page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; =
mso-header-margin: .5in; mso-footer-margin: .5in; mso-paper-source: 0; =
}
P.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; =
mso-style-parent: ""; mso-pagination: widow-orphan; =
mso-fareast-font-family: "Times New Roman"
}
LI.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; =
mso-style-parent: ""; mso-pagination: widow-orphan; =
mso-fareast-font-family: "Times New Roman"
}
DIV.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; =
mso-style-parent: ""; mso-pagination: widow-orphan; =
mso-fareast-font-family: "Times New Roman"
}
A:link {
	COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlink {
	COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
A:visited {
	COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlinkFollowed {
	COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
P {
	FONT-SIZE: 12pt; MARGIN-LEFT: 0in; MARGIN-RIGHT: 0in; FONT-FAMILY: =
"Times New Roman"; mso-pagination: widow-orphan; =
mso-fareast-font-family: "Times New Roman"; mso-margin-top-alt: auto; =
mso-margin-bottom-alt: auto
}
SPAN.EmailStyle19 {
	COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal-reply; =
mso-style-noshow: yes; mso-ansi-font-size: 10.0pt; mso-bidi-font-size: =
10.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; =
mso-bidi-font-family: Arial
}
SPAN.SpellE {
	mso-style-name: ""; mso-spl-e: yes
}
SPAN.GramE {
	mso-style-name: ""; mso-gram-e: yes
}
DIV.Section1 {
	page: Section1
}
</STYLE>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */=20
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:"";
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin:0in;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman";}
</style>
<![endif]--></HEAD>
<BODY lang=3DEN-US style=3D"tab-interval: .5in" vLink=3Dblue =
link=3Dblue>
<DIV><SPAN class=3D702562719-12052004><FONT face=3DVerdana =
color=3D#0000ff=20
size=3D2>Lydia, </FONT></SPAN></DIV>
<DIV><SPAN class=3D702562719-12052004><FONT face=3DVerdana =
color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D702562719-12052004><FONT face=3DVerdana =
color=3D#0000ff size=3D2>I=20
really do not want to have separate filters and ImageFunctions.&nbsp; =
What I=20
really want is for Evaluate() to return the same FixedArray subclass as =
the=20
input image (permitting Evaluate() to change the component type to=20
RealType).</FONT></SPAN></DIV>
<DIV><SPAN class=3D702562719-12052004><FONT face=3DVerdana =
color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D702562719-12052004><FONT face=3DVerdana =
color=3D#0000ff size=3D2>I'd=20
love to be able to write code:</FONT></SPAN></DIV>
<DIV><SPAN class=3D702562719-12052004><FONT face=3DVerdana =
color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D702562719-12052004><FONT face=3DVerdana =
color=3D#0000ff=20
size=3D2>outIt.Set( vectorFunction.Evaluate( inIt.Get() ) =
);</FONT></SPAN></DIV>
<DIV><SPAN class=3D702562719-12052004><FONT face=3DVerdana =
color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D702562719-12052004><FONT face=3DVerdana =
color=3D#0000ff size=3D2>But=20
with the conversion to a component type of RealType, I am willing to =
accept=20
being able</FONT></SPAN></DIV>
<DIV><SPAN class=3D702562719-12052004><FONT face=3DVerdana =
color=3D#0000ff size=3D2>to=20
write</FONT></SPAN></DIV>
<DIV><SPAN class=3D702562719-12052004><FONT face=3DVerdana =
color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D702562719-12052004><FONT face=3DVerdana =
color=3D#0000ff=20
size=3D2>v.CastFrom( vectorFunction.Evaluate( inIt.Get() ) =
);</FONT></SPAN></DIV>
<DIV><SPAN class=3D702562719-12052004><FONT face=3DVerdana =
color=3D#0000ff=20
size=3D2>outIt.Set( v );</FONT></SPAN></DIV>
<DIV><SPAN class=3D702562719-12052004><FONT face=3DVerdana =
color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D702562719-12052004><FONT face=3DVerdana =
color=3D#0000ff=20
size=3D2>Another approach is to extend the use of the CastFrom() method =
in the=20
FixedArray subclasses. I think I like this idea.&nbsp; Right now the =
CastFrom()=20
method allows you to, for instance, cast a Vector&lt;double, N&gt; to a =

Vector&lt;float, N&gt;.&nbsp; We could extend this so =
that</FONT></SPAN></DIV>
<DIV><SPAN class=3D702562719-12052004><FONT face=3DVerdana =
color=3D#0000ff size=3D2>you=20
can CastFrom a FixedArray&lt;T1, N&gt; to a Vector&lt;T2,=20
N&gt;.</FONT></SPAN></DIV>
<DIV><SPAN class=3D702562719-12052004><FONT face=3DVerdana =
color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D702562719-12052004><FONT face=3DVerdana =
color=3D#0000ff size=3D2>We=20
have been avoiding having implicit type conversions between various =
vector types=20
so that we can enforce using the proper vector types for=20
operations.</FONT></SPAN></DIV>
<DIV><SPAN class=3D702562719-12052004><FONT face=3DVerdana =
color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D702562719-12052004><FONT face=3DVerdana =
color=3D#0000ff=20
size=3D2>Jim</FONT></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B> Lydia Ng=20
  [mailto:lng at insightful.com]<BR><B>Sent:</B> Wednesday, May 12, 2004 =
1:50=20
  PM<BR><B>To:</B> Miller, James V (Research); Insight-developers=20
  (E-mail)<BR><B>Subject:</B> RE: [Insight-developers]=20
  VectorLinearInterpolateImageFunction<BR><BR></FONT></DIV>
  <DIV class=3DSection1>
  <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial">Jim,<o:p></o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">In a way =
<SPAN=20
  class=3DSpellE>VectorInterpolateImageFunction</SPAN> mirrors the way =
<SPAN=20
  class=3DSpellE>InterpolateImageFunction</SPAN> is=20
  used.<o:p></o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">For =
example, <SPAN=20
  class=3DSpellE>InterpolateImageFunction</SPAN> always return <SPAN=20
  class=3DSpellE>TInputImage::RealType</SPAN> and it&#8217;s up to the =
calling=20
  class/object (<SPAN class=3DSpellE>e.g</SPAN> <SPAN=20
  class=3DSpellE>ResampleImageFilter</SPAN>) to do the conversion to =
whatever type=20
  is finally required<o:p></o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Currently =
the <SPAN=20
  class=3DSpellE>VectorReampleImageFilter</SPAN> can resample any =
vector-type=20
  images </SPAN></FONT><FONT face=3DVerdana size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Verdana">(Vector, <SPAN=20
  class=3DSpellE>CovariantVector</SPAN>, Point) because it internally =
does the=20
  conversion from <SPAN class=3DSpellE>FixedArray</SPAN> to the right =
vector/point=20
  etc type.<o:p></o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DVerdana size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Verdana"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DVerdana size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Would the proposed =
changes also=20
  mean separate <SPAN class=3DSpellE>ResampleImageFilter</SPAN> for =
Vectors, <SPAN=20
  class=3DSpellE>CovariantVectors</SPAN>, and Points=20
  etc?<o:p></o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DVerdana size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Verdana"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DVerdana size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Verdana">-</SPAN></FONT><st1:country-region><st1:place><FONT=20
  face=3DVerdana size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Verdana">Lydia</SPAN></FONT></st1:place></st1:country-region><FONT=20
  face=3DVerdana size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Verdana"><o:p></o:p></SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <DIV=20
  style=3D"BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: =
medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: blue =
1.5pt solid; PADDING-TOP: 0in; BORDER-BOTTOM: medium none">
  <P class=3DMsoNormal><FONT face=3DTahoma size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-----Original=20
  Message-----<BR><B><SPAN style=3D"FONT-WEIGHT: bold">From:</SPAN></B> =
Miller,=20
  James V (Research) [mailto:millerjv at crd.ge.com] <BR><B><SPAN=20
  style=3D"FONT-WEIGHT: bold">Sent:</SPAN></B> Wednesday, May 12, 2004 =
7:25=20
  AM<BR><B><SPAN style=3D"FONT-WEIGHT: bold">To:</SPAN></B> =
Insight-developers=20
  (E-mail)<BR><B><SPAN style=3D"FONT-WEIGHT: bold">Subject:</SPAN></B>=20
  [Insight-developers] =
VectorLinearInterpolateImageFunction</SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
  style=3D"FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <DIV>
  <P class=3DMsoNormal><FONT face=3DVerdana size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Verdana">The documentation for =

  VectorLinearInterpolateImageFunction says the OutputType=20
  is</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3DVerdana size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Vector&lt;double,=20
  dimension&gt;.&nbsp; But it really gets the OutputType from its=20
  superclass.</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
  style=3D"FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3DVerdana size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Its superclass,=20
  VectorInterpolateImageFunction says the OutputType is really=20
  FixedArray&lt;RealType, Dimension&gt; (where RealType is the realtype =
of the=20
  input image pixel component type).&nbsp; =
</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
  style=3D"FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3DVerdana size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Verdana">I want to perform =
linear=20
  interpolation on a image of Vector&lt;float, 2&gt;.&nbsp; But the =
return type=20
  from Evaluate(), gives me a FixedArray&lt;double, 2&gt;. Of course, =
we have no=20
  conversion</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3DVerdana size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Verdana">operators that will =
take a=20
  FixedArray&lt;double, 2&gt; to a Vector&lt;float,=20
  2&gt;.</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
  style=3D"FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3DVerdana size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Verdana">I imagine in general, =
we cannot=20
  have the return type of Evaluate() be the pixel type of the=20
  </SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3DVerdana size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Verdana">input image.&nbsp; If =
someone=20
  has an image of Vector&lt;short, 2&gt; the interpolated value should =
probably=20
  be a Vector&lt;RealType, 2&gt;.</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
  style=3D"FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3DVerdana size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Verdana">However, since my =
image was=20
  already of Vector&lt;float, 2&gt;, I expected the=20
  interpolated</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3DVerdana size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Verdana">value to be a =
Vector&lt;float,=20
  2&gt;. I wasn't expecting to get a FixedArray.=20
  </SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
  style=3D"FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3DVerdana size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Verdana">That being said, I =
understand=20
  why it written this way. As it is written now, the=20
  VectorLinearInterpolateImageFunction can be applied to an image of =
anything=20
  that supports the API of FixedArray (Vector, CovariantVector, =
Point).&nbsp;=20
  But the output is always a FixedArray&lt;double, D&gt;. (I assumed =
with a name=20
  of VectorLinearInterpolateImageFunction, that the image function =
interpolated=20
  images of Vectors.)</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
  style=3D"FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3DVerdana size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Verdana">But if we wanted the =
output to=20
  be the same subclass of FixedArray with a different component type=20
  (Vector&lt;short, 2) --&gt; Vector&lt;RealType, 2&gt;) then we would =
probably=20
  need</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3DVerdana size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Verdana">separate =
ImageFunctions to=20
  interpolate Vectors, CovariantVectors, and Points. Or we could use =
some scary=20
  non-portable template magic.</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
  style=3D"FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3DVerdana size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Aside from fixing the =

  documentation, does anyone have any other suggestions before I dive =
into=20
  compiler magic?</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
  style=3D"FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P style=3D"MARGIN: 0in 0in 0pt"><B><FONT face=3D"Comic Sans MS" =
color=3Dnavy=20
  size=3D3><SPAN=20
  style=3D"FONT-WEIGHT: bold; FONT-SIZE: 12pt; COLOR: navy; =
FONT-FAMILY: 'Comic Sans MS'">Jim=20
  Miller</SPAN></FONT></B> <BR><B><I><FONT face=3DArial color=3Dred =
size=3D2><SPAN=20
  style=3D"FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: red; FONT-STYLE: =
italic; FONT-FAMILY: =
Arial">_____________________________________</SPAN></FONT></I></B><BR><E=
M><I><FONT=20
  face=3DArial color=3Dblack size=3D1><SPAN=20
  style=3D"FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: =
Arial">Visualization &amp;=20
  Computer Vision</SPAN></FONT></I></EM><I><FONT face=3DArial =
color=3Dblack=20
  size=3D1><SPAN=20
  style=3D"FONT-SIZE: 7.5pt; COLOR: black; FONT-STYLE: italic; =
FONT-FAMILY: Arial"><BR><EM><I><FONT=20
  face=3DArial><SPAN style=3D"FONT-FAMILY: Arial">GE=20
  Research</SPAN></FONT></I></EM><BR><EM><I><FONT face=3DArial><SPAN=20
  style=3D"FONT-FAMILY: Arial">Bldg. KW, Room=20
  C218B</SPAN></FONT></I></EM><BR><EM><I><FONT face=3DArial><SPAN=20
  style=3D"FONT-FAMILY: Arial">P.O. Box 8, Schenectady NY=20
  12301</SPAN></FONT></I></EM><BR><BR></SPAN></FONT></I><EM><I><U><FONT =

  face=3D"Times New Roman" color=3Dblue size=3D1><SPAN=20
  style=3D"FONT-SIZE: 7.5pt; COLOR: blue"><A=20
  =
href=3D"mailto:millerjv at research.ge.com">millerjv at research.ge.com</A></S=
PAN></FONT></U></I></EM><o:p></o:p></P>
  <P style=3D"MARGIN: 0in 0in 0pt"><EM><I><U><FONT face=3D"Times New =
Roman"=20
  color=3Dblue size=3D1><SPAN=20
  style=3D"FONT-SIZE: 7.5pt; COLOR: =
blue">james.miller at research.ge.com</SPAN></FONT></U></I></EM><BR><I><FON=
T=20
  face=3DArial color=3Dblack size=3D1><SPAN=20
  style=3D"FONT-SIZE: 7.5pt; COLOR: black; FONT-STYLE: italic; =
FONT-FAMILY: Arial">(518)=20
  387-4005, Dial Comm: 8*833-4005, </SPAN></FONT></I><BR><I><FONT =
face=3DArial=20
  color=3Dblack size=3D1><SPAN=20
  style=3D"FONT-SIZE: 7.5pt; COLOR: black; FONT-STYLE: italic; =
FONT-FAMILY: Arial">Cell:=20
  (518) 505-7065, Fax: (518) 387-6981</SPAN></FONT></I> =
<o:p></o:p></P></DIV>
  <DIV>
  <P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
  style=3D"FONT-SIZE: =
12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV></DIV></DIV></BLOCKQUOTE>=
</BODY></HTML>

------_=_NextPart_001_01C43859.782FA746--