<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE></TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Good very late night everyone,<BR>
<BR>
&nbsp;&nbsp;&nbsp; I've just checked in a change to the vtkAbstractArray class. Each array<BR>
you create now contains an (initially NULL) pointer to a vtkInformation<BR>
object. This doesn't significantly change the size of vtkAbstractArray<BR>
objects and provides a nice way to annotate arrays with additional<BR>
information. The SetInformation() member function is protected (you may not<BR>
assign an information object to an array). If a vtkInformation object does<BR>
not exist when you call GetInformation(), one will be created for you and<BR>
its address returned. Thus you should always use GetInformation(), even from<BR>
within vtkAbstractArray and its descendants.<BR>
<BR>
&nbsp;&nbsp;&nbsp; The vtkDataArray has had the member variables that stored per-component<BR>
range information removed; this information is now stored in the<BR>
vtkInformation object associated with the array. When ComputeRange( int c )<BR>
is called, the c-th component range is computed and stored in a<BR>
vtkInformationVector object associated with the vtkDataArray::PER_COMPONENT<BR>
key. The c-th entry of that vector is a double vector with two entries<BR>
(min/max) associated with the vtkDataArray::COMPONENT_RANGE key. If you<BR>
request the L2 norm (c == -1), then a two-entry double vector associated with<BR>
the vtkDataArray::L2_NORM_RANGE is stored in the array's Information object.<BR>
You should not have to worry about this in general, however if you plan to<BR>
use the array's Information object, you must be aware that the information<BR>
object's MTime is compared to the array's MTime to decide whether the<BR>
range needs to be recomputed. So, if you are about to modify the information<BR>
object, you should compare its MTime to the array's MTime and either<BR>
1. Mark the computed ranges as invalid (i.e., [VTK_MAX_DOUBLE,VTK_MIN_DOUBLE]),<BR>
2. Recompute the ranges, or<BR>
3. Remove the information keys holding the ranges.<BR>
Otherwise, the ranges may not be synchronized with the array values. While<BR>
this may sound like a bit of a hassle, it ends up reducing the size of<BR>
vtkDataArray objects thusly:<BR>
<BR>
&nbsp; Before adding Information and removing ComponentRange cache in favor of<BR>
&nbsp; PER_COMPONENT, COMPONENT_RANGE, and L2_NORM_RANGE:<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sizeof(AbstractArray)=72<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sizeof(vtkStringArray)=96<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sizeof(vtkDataArray)=360<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sizeof(vtkDoubleArray)=400<BR>
&nbsp; After:<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sizeof(AbstractArray)=80<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sizeof(vtkStringArray)=104<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sizeof(vtkDataArray)=104<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sizeof(vtkDoubleArray)=144<BR>
&nbsp; (These sizes are on a 64-bit system.)<BR>
<BR>
When vtkAbstractArray::DeepCopy() is called, the vtkInformation object is<BR>
deep copied as well. One remaining issue is how filters deal with the<BR>
vtkInformation object when passing arrays from input to output. Currently<BR>
filters ignore the information object. In the future, this behavior may<BR>
change. A note has been added to the member documentation on the<BR>
appropriate members of vtkDataSetAttributes (CopyAllocate and CopyData).<BR>
If you have any good ideas on how information can be copied while<BR>
maintaining consistency and without modifying every filter in VTK, please<BR>
let me know. You should also let me know if you encounter any problems<BR>
with the change or have (constructive) criticism.<BR>
<BR>
&nbsp;&nbsp;&nbsp; Thanks,<BR>
&nbsp;&nbsp;&nbsp; David<BR>
</FONT>
</P>

</BODY>
</HTML>