- if ( lookupTable )
- {
- lookupTable->MapScalarsThroughTable2(
- inPtr1,
- static_cast<unsigned char *>(outPtr1),
- dataType,extX,numberOfComponents,
- outputFormat);
- if (wl_mode)
- {
- unsigned short ushort_val;
- for (idxX = 0; idxX < extX; idxX++)
- {
- if (*iptr <= lower)
- {
- ushort_val = lower_val;
- }
- else if (*iptr >= upper)
- {
- ushort_val = upper_val;
- }
- else
- {
- ushort_val = static_cast<unsigned char>((*iptr + shift)*scale);
- }
- *optr = static_cast<unsigned char>((*optr * ushort_val) >> 8);
- switch (outputFormat)
- {
- case VTK_RGBA:
- *(optr+1) = static_cast<unsigned char>(
- (*(optr+1) * ushort_val) >> 8);
- *(optr+2) = static_cast<unsigned char>(
- (*(optr+2) * ushort_val) >> 8);
- *(optr+3) = 255;
- break;
- case VTK_RGB:
- *(optr+1) = static_cast<unsigned char>(
- (*(optr+1) * ushort_val) >> 8);
- *(optr+2) = static_cast<unsigned char>(
- (*(optr+2) * ushort_val) >> 8);
- break;
- case VTK_LUMINANCE_ALPHA:
- *(optr+1) = 255;
- break;
- }
- iptr += numberOfComponents;
- optr += numberOfOutputComponents;
- }
- }
+ if ( lookupTable ) {
+ lookupTable->MapScalarsThroughTable2(
+ inPtr1,
+ static_cast<unsigned char *>(outPtr1),
+ dataType,extX,numberOfComponents,
+ outputFormat);
+ if (wl_mode) {
+ unsigned short ushort_val;
+ for (idxX = 0; idxX < extX; idxX++) {
+ if (*iptr <= lower) {
+ ushort_val = lower_val;
+ } else if (*iptr >= upper) {
+ ushort_val = upper_val;
+ } else {
+ ushort_val = static_cast<unsigned char>((*iptr + shift)*scale);
+ }
+ *optr = static_cast<unsigned char>((*optr * ushort_val) >> 8);
+ switch (outputFormat) {
+ case VTK_RGBA:
+ *(optr+1) = static_cast<unsigned char>(
+ (*(optr+1) * ushort_val) >> 8);
+ *(optr+2) = static_cast<unsigned char>(
+ (*(optr+2) * ushort_val) >> 8);
+ *(optr+3) = 255;
+ break;
+ case VTK_RGB:
+ *(optr+1) = static_cast<unsigned char>(
+ (*(optr+1) * ushort_val) >> 8);
+ *(optr+2) = static_cast<unsigned char>(
+ (*(optr+2) * ushort_val) >> 8);
+ break;
+ case VTK_LUMINANCE_ALPHA:
+ *(optr+1) = 255;
+ break;