ctr: null
  resolution (width,height,depth) =  0 0 1
  origin (x,y,z) =  0 0 0
  full res =  0 0 0
  full origin =  0 0 0
  untiled
  format =  unknown
  nchannels =  0
  channelformats =  ()
  channel names =  ()
  alpha channel =  -1
  z channel =  -1
  deep =  False

ctr: UINT16
  resolution (width,height,depth) =  0 0 1
  origin (x,y,z) =  0 0 0
  full res =  0 0 0
  full origin =  0 0 0
  untiled
  format =  uint16
  nchannels =  0
  channelformats =  ()
  channel names =  ()
  alpha channel =  -1
  z channel =  -1
  deep =  False

ctr: 640x480,3 UINT8
  resolution (width,height,depth) =  640 480 1
  origin (x,y,z) =  0 0 0
  full res =  640 480 1
  full origin =  0 0 0
  untiled
  format =  uint8
  nchannels =  3
  channelformats =  ()
  channel names =  ('R', 'G', 'B')
  alpha channel =  -1
  z channel =  -1
  deep =  False

lots of fields
  resolution (width,height,depth) =  640 480 1
  origin (x,y,z) =  1 2 3
  full res =  1280 960 7
  full origin =  4 5 6
  tile size =  32 64 16
  format =  float
  nchannels =  5
  channelformats =  (<TypeDesc 'uint8'>, <TypeDesc 'uint8'>, <TypeDesc 'uint8'>, <TypeDesc 'uint8'>, <TypeDesc 'float'>)
  channel names =  ('R', 'G', 'B', 'A', 'channel4')
  alpha channel =  3
  z channel =  -1
  deep =  False

 B channel = 2
 foo channel = -1
channel bytes = 4
  channel_bytes(1) = 4 native 1
  channel_bytes(4) = 4 native 4
pixel bytes = 20 native 8
scanline bytes = 12800 native 5120
tile bytes = 655360 native 262144
image bytes = 6144000 native 2457600
tile pixels = 32768
image_pixels = 307200
size_t_safe = True
get_channelformats: (<TypeDesc 'uint8'>, <TypeDesc 'uint8'>, <TypeDesc 'uint8'>, <TypeDesc 'uint8'>, <TypeDesc 'float'>)
channelindex('G') = 1
channel_name(1) = G
channelformat(1) = uint8

get_int_attribute('foo_int') retrieves 14
get_int_attribute('foo_int',21) with default retrieves 14
get_int_attribute('foo_no',23) retrieves 23
get_float_attribute('foo_float') retrieves 3.140000104904175
get_float_attribute('foo_float_no') retrieves 0.0
get_float_attribute('foo_float_no',2.7) retrieves 2.700000047683716
get_string_attribute('foo_str') retrieves blah
get_string_attribute('foo_str_no') retrieves 
get_string_attribute('foo_str_no','xx') retrieves xx

getattribute('foo_int') retrieves 14
getattribute('foo_float') retrieves 3.140000104904175
getattribute('foo_str') retrieves blah
getattribute('foo_vector') retrieves (1.0, 0.0, 11.0)
getattribute('foo_matrix') retrieves (1.0, 0.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 2.0, 3.0, 1.0)
getattribute('foo_no') retrieves None
getattribute('smpte:TimeCode') retrieves (18356486, 4294967295)
s['delfoo_float'] = 99.5
s['delfoo_int'] = 29
s['delfoo_str'] = egg

extra_attribs size is 9
0 foo_str string blah
"blah"
1 foo_int int 14
14
2 foo_float float 3.140000104904175
3.14
3 foo_vector vector (1.0, 0.0, 11.0)
1, 0, 11
4 foo_matrix matrix (1.0, 0.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 2.0, 3.0, 1.0)
1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 1, 2, 3, 1
5 smpte:TimeCode timecode (18356486, 4294967295)
01:18:19:06
6 delfoo_str string egg
"egg"
7 delfoo_int int 29
29
8 delfoo_float float 99.5
99.5

seralize(xml):
<ImageSpec version="23">
<x>1</x>
<y>2</y>
<z>3</z>
<width>640</width>
<height>480</height>
<depth>1</depth>
<full_x>4</full_x>
<full_y>5</full_y>
<full_z>6</full_z>
<full_width>1280</full_width>
<full_height>960</full_height>
<full_depth>7</full_depth>
<tile_width>32</tile_width>
<tile_height>64</tile_height>
<tile_depth>16</tile_depth>
<format>float</format>
<nchannels>5</nchannels>
<channelnames>
<channelname>R</channelname>
<channelname>G</channelname>
<channelname>B</channelname>
<channelname>A</channelname>
<channelname>channel4</channelname>
</channelnames>
<alpha_channel>3</alpha_channel>
<z_channel>-1</z_channel>
<deep>0</deep>
<attrib name="foo_str" type="string">blah</attrib>
<attrib name="foo_int" type="int">14</attrib>
<attrib name="foo_float" type="float">3.14</attrib>
<attrib name="foo_vector" type="vector">1, 0, 11</attrib>
<attrib name="foo_matrix" type="matrix">1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 1, 2, 3, 1</attrib>
<attrib name="smpte:TimeCode" type="timecode" description="01:18:19:06">01:18:19:06</attrib>
<attrib name="delfoo_str" type="string">egg</attrib>
<attrib name="delfoo_int" type="int">29</attrib>
<attrib name="delfoo_float" type="float">99.5</attrib>
</ImageSpec>

serialize(text, human):
 640 x  480, 5 channel, uint8/uint8/uint8/uint8/float
    channel list: R (uint8), G (uint8), B (uint8), A (uint8), channel4 (float)
    pixel data origin: x=1, y=2
    full/display size: 1280 x 960
    full/display origin: 4, 5
    tile size: 32 x 64
    delfoo_float: 99.5
    delfoo_int: 29
    delfoo_str: "egg"
    foo_float: 3.14
    foo_int: 14
    foo_matrix: 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 1, 2, 3, 1
    foo_str: "blah"
    foo_vector: 1, 0, 11
    smpte:TimeCode: 01:18:19:06


Added dog:  Spot
After erasing dog, dog =  None

Testing construction from ROI:
  resolution (width,height,depth) =  640 480 1
  origin (x,y,z) =  0 0 0
  full res =  640 480 1
  full origin =  0 0 0
  untiled
  format =  float
  nchannels =  3
  channelformats =  ()
  channel names =  ('R', 'G', 'B')
  alpha channel =  -1
  z channel =  -1
  deep =  False


Testing global attribute store/retrieve:
get_string_attribute plugin_searchpath :  perfect
get_int_attribute plugin_searchpath :  0
getattribute TypeString plugin_searchpath :  perfect
getattribute TypeFloat plugin_searchpath :  None
getattribute TypeString blahblah :  None
Done.
