SampleModel sm = im.getSampleModel();
if (sm instanceof ComponentSampleModel) {
switch (sm.getDataType()) {
case DataBuffer.TYPE_BYTE:
return new WritableRectIterCSMByte(im, bounds);
case DataBuffer.TYPE_SHORT:
// return new WritableRectIterCSMShort(im, bounds);
break;
case DataBuffer.TYPE_USHORT:
// return new WritableRectIterCSMUShort(im, bounds);