<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2715.400" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=330242815-27092002><FONT size=2>There seems to be a problem
with vtkAssignAttribute operating on ImageData.</FONT></SPAN></DIV>
<DIV><SPAN class=330242815-27092002><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=330242815-27092002><FONT size=2>We were using
vtkAssignAttribute to take the vectors of a dataset and use them as
multi-component scalars.</FONT></SPAN></DIV>
<DIV><SPAN class=330242815-27092002><FONT size=2>When the dataset is an
ImageData, the output of the vtkAssignAttribute filter does not adjust the
</FONT></SPAN></DIV>
<DIV><SPAN class=330242815-27092002><FONT size=2>NumberOfScalarComponents of the
ImageData.</FONT></SPAN></DIV>
<DIV><SPAN class=330242815-27092002><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=330242815-27092002><FONT size=2>These problem arises because
ImageData caches the NumberOfScalarComponents from the
scalars</FONT></SPAN></DIV>
<DIV><SPAN class=330242815-27092002><FONT size=2>array. When the number of
components in the scalars are changed, the ImageData needs to be
told.</FONT></SPAN></DIV>
<DIV><SPAN class=330242815-27092002><FONT size=2>vtkAssignAttributes works
generically on DataSets so it doesn't know its operating on an
ImageData</FONT></SPAN></DIV>
<DIV><SPAN class=330242815-27092002><FONT size=2>and thus doesn't tell the
ImageData that new number of scalar components.</FONT></SPAN></DIV>
<DIV><SPAN class=330242815-27092002><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=330242815-27092002><FONT size=2>If a filter after the
vtkAssignAttribute in the pipeline querys the
ImageData::GetNumberOfScalarComponents()</FONT></SPAN></DIV>
<DIV><SPAN class=330242815-27092002><FONT size=2>instead of
ImageData::GetScalars()->GetNumberOfScalarsComponents() then it will not
operate properly.</FONT></SPAN></DIV>
<DIV><SPAN class=330242815-27092002><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=330242815-27092002></SPAN><SPAN class=330242815-27092002><FONT
size=2>Possible solutions:</FONT></SPAN></DIV>
<OL>
<LI><SPAN class=330242815-27092002><FONT size=2>vtkAssignAttributes could
check whether it is operating on ImageData and whether the scalars are being
modified and the adjust the NumberOfScalarComponents on the ImageData
appropriately. This is not too bad an option if ImageData is the only dataset
type that caches this information.</FONT></SPAN></LI>
<LI><SPAN class=330242815-27092002><FONT size=2>Change
ImageData::GetNumberOfScalarComponents()/SetNumberOfScalarComponents() to
delegate these calls to the scalars DataArray instead of caching the
values. This could impact how people are constructing ImageData (where
they would set the NumberOfScalarComponents on an ImageData, then have the
allocate procedures create a scalars DataArray with the proper number of
components.</FONT></SPAN></LI>
<LI><SPAN class=330242815-27092002><FONT size=2>Deprecate
ImageData::GetNumerOfScalarComponents()/GetNumberOfScalarComponents()</FONT></SPAN></LI></OL>
<DIV><SPAN class=330242815-27092002><FONT size=2></FONT></SPAN> </DIV>
<DIV> <?xml:namespace prefix = o ns =
"urn:schemas-microsoft-com:office:office" /><o:p></o:p></DIV>
<DIV class=Section1>
<P style="MARGIN: 0in 0in 0pt"><B><SPAN
style="COLOR: navy; FONT-FAMILY: 'Comic Sans MS'">Jim Miller</SPAN></B>
<BR><B><I><SPAN
style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Arial">_____________________________________</SPAN></I></B><BR><EM><SPAN
style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Arial">Visualization &
Computer Vision</SPAN></EM><I><SPAN
style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Arial"><BR><EM>GE
Research</EM><BR><EM>Bldg. KW, Room C218B</EM><BR><EM>P.O. Box 8, Schenectady NY
12301</EM><BR><BR></SPAN></I><EM><U><SPAN
style="FONT-SIZE: 7.5pt; COLOR: blue"><A
href="mailto:millerjv@research.ge.com">millerjv@research.ge.com</A></SPAN></U></EM></P>
<P style="MARGIN: 0in 0in 0pt"><EM><U><SPAN
style="FONT-SIZE: 7.5pt; COLOR: blue">james.miller@research.ge.com</SPAN></U></EM><BR><I><SPAN
style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Arial">(518) 387-4005, Dial
Comm: 8*833-4005, </SPAN></I><BR><I><SPAN
style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Arial">Cell: (518) 505-7065,
Fax: (518) 387-6981</SPAN></I> </P>
<P class=MsoNormal> <o:p></o:p></P></DIV>
<DIV> </DIV></BODY></HTML>