28 static ossimTrace traceDebug(
"ossimHsiRemapper:debug");
33 static const char MASTER_HUE_OFFSET_KW[] =
"hsi_master_hue_offset";
34 static const char MASTER_SATURATION_OFFSET_KW[] =
"hsi_master_saturation_offset";
35 static const char MASTER_INTENSITY_OFFSET_KW[] =
"hsi_master_intensity_offset";
36 static const char MASTER_INTENSITY_LOW_CLIP_KW[] =
"hsi_master_intensity_low_clip";
37 static const char MASTER_INTENSITY_HIGH_CLIP_KW[] =
"hsi_master_intensity_high_clip";
39 static const char RED_HUE_OFFSET_KW[] =
"hsi_red_hue_offset";
40 static const char RED_HUE_LOW_RANGE_KW[] =
"hsi_red_hue_low_range";
41 static const char RED_HUE_HIGH_RANGE_KW[] =
"hsi_red_hue_high_range";
42 static const char RED_HUE_BLEND_RANGE_KW[] =
"hsi_red_hue_blend_range";
43 static const char RED_SATURATION_OFFSET_KW[] =
"hsi_red_saturation_offset";
44 static const char RED_INTENSITY_OFFSET_KW[] =
"hsi_red_intensity_offset";
46 static const char YELLOW_HUE_OFFSET_KW[] =
"hsi_yellow_hue_offset";
47 static const char YELLOW_HUE_LOW_RANGE_KW[] =
"hsi_yellow_hue_low_range";
48 static const char YELLOW_HUE_HIGH_RANGE_KW[] =
"hsi_yellow_hue_high_range";
49 static const char YELLOW_HUE_BLEND_RANGE_KW[] =
"hsi_yellow_hue_blend_range";
50 static const char YELLOW_SATURATION_OFFSET_KW[] =
"hsi_yellow_saturation_offset";
51 static const char YELLOW_INTENSITY_OFFSET_KW[] =
"hsi_yellow_intensity_offset";
53 static const char GREEN_HUE_OFFSET_KW[] =
"hsi_green_hue_offset";
54 static const char GREEN_HUE_LOW_RANGE_KW[] =
"hsi_green_hue_low_range";
55 static const char GREEN_HUE_HIGH_RANGE_KW[] =
"hsi_green_hue_high_range";
56 static const char GREEN_HUE_BLEND_RANGE_KW[] =
"hsi_green_hue_blend_range";
57 static const char GREEN_SATURATION_OFFSET_KW[] =
"hsi_green_saturation_offset";
58 static const char GREEN_INTENSITY_OFFSET_KW[] =
"hsi_green_intensity_offset";
60 static const char CYAN_HUE_OFFSET_KW[] =
"hsi_cyan_hue_offset";
61 static const char CYAN_HUE_LOW_RANGE_KW[] =
"hsi_cyan_hue_low_range";
62 static const char CYAN_HUE_HIGH_RANGE_KW[] =
"hsi_cyan_hue_high_range";
63 static const char CYAN_HUE_BLEND_RANGE_KW[] =
"hsi_cyan_hue_blend_range";
64 static const char CYAN_SATURATION_OFFSET_KW[] =
"hsi_cyan_saturation_offset";
65 static const char CYAN_INTENSITY_OFFSET_KW[] =
"hsi_cyan_intensity_offset";
67 static const char BLUE_HUE_OFFSET_KW[] =
"hsi_blue_hue_offset";
68 static const char BLUE_HUE_LOW_RANGE_KW[] =
"hsi_blue_hue_low_range";
69 static const char BLUE_HUE_HIGH_RANGE_KW[] =
"hsi_blue_hue_high_range";
70 static const char BLUE_HUE_BLEND_RANGE_KW[] =
"hsi_blue_hue_blend_range";
71 static const char BLUE_SATURATION_OFFSET_KW[] =
"hsi_blue_saturation_offset";
72 static const char BLUE_INTENSITY_OFFSET_KW[] =
"hsi_blue_intensity_offset";
74 static const char MAGENTA_HUE_OFFSET_KW[] =
"hsi_magenta_hue_offset";
75 static const char MAGENTA_HUE_LOW_RANGE_KW[] =
"hsi_magenta_hue_low_range";
76 static const char MAGENTA_HUE_HIGH_RANGE_KW[] =
"hsi_magenta_hue_high_range";
77 static const char MAGENTA_HUE_BLEND_RANGE_KW[] =
"hsi_magenta_hue_blend_range";
78 static const char MAGENTA_SATURATION_OFFSET_KW[] =
"hsi_magenta_saturation_offset";
79 static const char MAGENTA_INTENSITY_OFFSET_KW[] =
"hsi_magenta_intensity_offset";
81 static const char WHITE_OBJECT_CLIP_KW[] =
"hsi_white_object_clip";
83 static const double DEFAULT_BLEND = 15.0;
84 static const double MAX_BLEND = 30.0;
92 theNormalizedMinPix (0.0),
94 theMasterHueOffset (0.0),
95 theMasterSaturationOffset (0.0),
96 theMasterIntensityOffset (0.0),
97 theMasterIntensityLowClip (0.0),
98 theMasterIntensityHighClip (1.0),
100 theRedHueOffset (0.0),
101 theRedHueLowRange (-30.0),
102 theRedHueHighRange (30.0),
103 theRedHueBlendRange (DEFAULT_BLEND),
104 theRedSaturationOffset (0.0),
105 theRedIntensityOffset (0.0),
107 theYellowHueOffset (0.0),
108 theYellowHueLowRange (30.0),
109 theYellowHueHighRange (90.0),
110 theYellowHueBlendRange (DEFAULT_BLEND),
111 theYellowSaturationOffset (0.0),
112 theYellowIntensityOffset (0.0),
114 theGreenHueOffset (0.0),
115 theGreenHueLowRange (90.0),
116 theGreenHueHighRange (150.0),
117 theGreenHueBlendRange (DEFAULT_BLEND),
118 theGreenSaturationOffset (0.0),
119 theGreenIntensityOffset (0.0),
121 theCyanHueOffset (0.0),
122 theCyanHueLowRange (150.0),
123 theCyanHueHighRange (210.0),
124 theCyanHueBlendRange (DEFAULT_BLEND),
125 theCyanSaturationOffset (0.0),
126 theCyanIntensityOffset (0.0),
128 theBlueHueOffset (0.0),
129 theBlueHueLowRange (210.0),
130 theBlueHueHighRange (270.0),
131 theBlueHueBlendRange (DEFAULT_BLEND),
132 theBlueSaturationOffset (0.0),
133 theBlueIntensityOffset (0.0),
135 theMagentaHueOffset (0.0),
136 theMagentaHueLowRange (270.0),
137 theMagentaHueHighRange (330.0),
138 theMagentaHueBlendRange (DEFAULT_BLEND),
139 theMagentaSaturationOffset (0.0),
140 theMagentaIntensityOffset (0.0),
142 theWhiteObjectClip (1.0)
174 tile_rect, resLevel);
208 rgbBuf[2] = &(rgbBuf[1][PPT]);
217 memcpy(rgbBuf[1], rgbBuf[0], PPT*
sizeof(
double));
218 memcpy(rgbBuf[2], rgbBuf[0], PPT*
sizeof(
double));
245 for (idx=0; idx<PPT; ++idx)
270 if (red_hue >= 315.0 && red_hue < 360.0) red_hue = red_hue - 360.0;
390 if (h < 0.0) h += 360.0;
391 else if (h >= 360) h -= 360.0;
395 s = (s > 0.0 ? (s < 1.0 ? s : 1.0) : 0.0);
399 i = (i > 0.0 ? (i < 1.0 ? i : 1.0) : 0.0);
436 rgbBuf[0][idx] = 0.0;
437 rgbBuf[1][idx] = 0.0;
438 rgbBuf[2][idx] = 0.0;
467 if(!property.
valid())
return;
469 if(name == MASTER_HUE_OFFSET_KW)
473 else if(name == MASTER_SATURATION_OFFSET_KW)
477 else if(name == MASTER_INTENSITY_OFFSET_KW)
481 else if(name == MASTER_INTENSITY_LOW_CLIP_KW)
485 else if(name == MASTER_INTENSITY_HIGH_CLIP_KW)
489 else if(name == RED_HUE_OFFSET_KW)
493 else if(name == RED_HUE_LOW_RANGE_KW)
497 else if(name == RED_HUE_HIGH_RANGE_KW)
501 else if(name == RED_HUE_BLEND_RANGE_KW)
505 else if(name == RED_SATURATION_OFFSET_KW)
509 else if(name == RED_INTENSITY_OFFSET_KW)
513 else if(name == YELLOW_HUE_OFFSET_KW)
517 else if(name == YELLOW_HUE_LOW_RANGE_KW)
521 else if(name == YELLOW_HUE_HIGH_RANGE_KW)
525 else if(name == YELLOW_HUE_BLEND_RANGE_KW)
529 else if(name == YELLOW_SATURATION_OFFSET_KW)
533 else if(name == YELLOW_INTENSITY_OFFSET_KW)
537 else if(name == GREEN_HUE_OFFSET_KW)
541 else if(name == GREEN_HUE_LOW_RANGE_KW)
545 else if(name == GREEN_HUE_HIGH_RANGE_KW)
549 else if(name == GREEN_HUE_BLEND_RANGE_KW)
553 else if(name == GREEN_SATURATION_OFFSET_KW)
557 else if(name == GREEN_INTENSITY_OFFSET_KW)
561 else if(name == CYAN_HUE_OFFSET_KW)
565 else if(name == CYAN_HUE_LOW_RANGE_KW)
569 else if(name == CYAN_HUE_HIGH_RANGE_KW)
573 else if(name == CYAN_HUE_BLEND_RANGE_KW)
577 else if(name == CYAN_SATURATION_OFFSET_KW)
581 else if(name == CYAN_INTENSITY_OFFSET_KW)
585 else if(name == BLUE_HUE_OFFSET_KW)
589 else if(name == BLUE_HUE_LOW_RANGE_KW)
593 else if(name == BLUE_HUE_HIGH_RANGE_KW)
597 else if(name == BLUE_HUE_BLEND_RANGE_KW)
601 else if(name == BLUE_SATURATION_OFFSET_KW)
605 else if(name == BLUE_INTENSITY_OFFSET_KW)
609 else if(name == MAGENTA_HUE_OFFSET_KW)
613 else if(name == MAGENTA_HUE_LOW_RANGE_KW)
617 else if(name == MAGENTA_HUE_HIGH_RANGE_KW)
621 else if(name == MAGENTA_HUE_BLEND_RANGE_KW)
625 else if(name == MAGENTA_SATURATION_OFFSET_KW)
629 else if(name == MAGENTA_INTENSITY_OFFSET_KW)
633 else if(name == WHITE_OBJECT_CLIP_KW)
646 if(name == MASTER_HUE_OFFSET_KW)
651 else if(name == MASTER_SATURATION_OFFSET_KW)
656 else if(name == MASTER_INTENSITY_OFFSET_KW)
661 else if(name == MASTER_INTENSITY_LOW_CLIP_KW)
666 else if(name == MASTER_INTENSITY_HIGH_CLIP_KW)
671 else if(name == RED_HUE_OFFSET_KW)
676 else if(name == RED_HUE_LOW_RANGE_KW)
681 else if(name == RED_HUE_HIGH_RANGE_KW)
686 else if(name == RED_HUE_BLEND_RANGE_KW)
691 else if(name == RED_SATURATION_OFFSET_KW)
696 else if(name == RED_INTENSITY_OFFSET_KW)
701 else if(name == YELLOW_HUE_OFFSET_KW)
706 else if(name == YELLOW_HUE_LOW_RANGE_KW)
711 else if(name == YELLOW_HUE_HIGH_RANGE_KW)
716 else if(name == YELLOW_HUE_BLEND_RANGE_KW)
721 else if(name == YELLOW_SATURATION_OFFSET_KW)
726 else if(name == YELLOW_INTENSITY_OFFSET_KW)
731 else if(name == GREEN_HUE_OFFSET_KW)
736 else if(name == GREEN_HUE_LOW_RANGE_KW)
741 else if(name == GREEN_HUE_HIGH_RANGE_KW)
746 else if(name == GREEN_HUE_BLEND_RANGE_KW)
751 else if(name == GREEN_SATURATION_OFFSET_KW)
756 else if(name == GREEN_INTENSITY_OFFSET_KW)
761 else if(name == CYAN_HUE_OFFSET_KW)
766 else if(name == CYAN_HUE_LOW_RANGE_KW)
771 else if(name == CYAN_HUE_HIGH_RANGE_KW)
776 else if(name == CYAN_HUE_BLEND_RANGE_KW)
781 else if(name == CYAN_SATURATION_OFFSET_KW)
786 else if(name == CYAN_INTENSITY_OFFSET_KW)
791 else if(name == BLUE_HUE_OFFSET_KW)
796 else if(name == BLUE_HUE_LOW_RANGE_KW)
801 else if(name == BLUE_HUE_HIGH_RANGE_KW)
806 else if(name == BLUE_HUE_BLEND_RANGE_KW)
811 else if(name == BLUE_SATURATION_OFFSET_KW)
816 else if(name == BLUE_INTENSITY_OFFSET_KW)
821 else if(name == MAGENTA_HUE_OFFSET_KW)
826 else if(name == MAGENTA_HUE_LOW_RANGE_KW)
831 else if(name == MAGENTA_HUE_HIGH_RANGE_KW)
836 else if(name == MAGENTA_HUE_BLEND_RANGE_KW)
841 else if(name == MAGENTA_SATURATION_OFFSET_KW)
846 else if(name == MAGENTA_INTENSITY_OFFSET_KW)
851 else if(name == WHITE_OBJECT_CLIP_KW)
867 propertyNames.push_back(MASTER_HUE_OFFSET_KW);
868 propertyNames.push_back(MASTER_SATURATION_OFFSET_KW);
869 propertyNames.push_back(MASTER_INTENSITY_OFFSET_KW);
870 propertyNames.push_back(MASTER_INTENSITY_LOW_CLIP_KW);
871 propertyNames.push_back(MASTER_INTENSITY_HIGH_CLIP_KW);
872 propertyNames.push_back(RED_HUE_OFFSET_KW);
873 propertyNames.push_back(RED_HUE_LOW_RANGE_KW);
874 propertyNames.push_back(RED_HUE_HIGH_RANGE_KW);
875 propertyNames.push_back(RED_HUE_BLEND_RANGE_KW);
876 propertyNames.push_back(RED_SATURATION_OFFSET_KW);
877 propertyNames.push_back(RED_INTENSITY_OFFSET_KW);
878 propertyNames.push_back(YELLOW_HUE_OFFSET_KW);
879 propertyNames.push_back(YELLOW_HUE_LOW_RANGE_KW);
880 propertyNames.push_back(YELLOW_HUE_HIGH_RANGE_KW);
881 propertyNames.push_back(YELLOW_HUE_BLEND_RANGE_KW);
882 propertyNames.push_back(YELLOW_SATURATION_OFFSET_KW);
883 propertyNames.push_back(YELLOW_INTENSITY_OFFSET_KW);
884 propertyNames.push_back(GREEN_HUE_OFFSET_KW);
885 propertyNames.push_back(GREEN_HUE_LOW_RANGE_KW);
886 propertyNames.push_back(GREEN_HUE_HIGH_RANGE_KW);
887 propertyNames.push_back(GREEN_HUE_BLEND_RANGE_KW);
888 propertyNames.push_back(GREEN_SATURATION_OFFSET_KW);
889 propertyNames.push_back(GREEN_INTENSITY_OFFSET_KW);
890 propertyNames.push_back(CYAN_HUE_OFFSET_KW);
891 propertyNames.push_back(CYAN_HUE_LOW_RANGE_KW);
892 propertyNames.push_back(CYAN_HUE_HIGH_RANGE_KW);
893 propertyNames.push_back(CYAN_HUE_BLEND_RANGE_KW);
894 propertyNames.push_back(CYAN_SATURATION_OFFSET_KW);
895 propertyNames.push_back(CYAN_INTENSITY_OFFSET_KW);
896 propertyNames.push_back(BLUE_HUE_OFFSET_KW);
897 propertyNames.push_back(BLUE_HUE_LOW_RANGE_KW);
898 propertyNames.push_back(BLUE_HUE_HIGH_RANGE_KW);
899 propertyNames.push_back(BLUE_HUE_BLEND_RANGE_KW);
900 propertyNames.push_back(BLUE_SATURATION_OFFSET_KW);
901 propertyNames.push_back(BLUE_INTENSITY_OFFSET_KW);
902 propertyNames.push_back(MAGENTA_HUE_OFFSET_KW);
903 propertyNames.push_back(MAGENTA_HUE_LOW_RANGE_KW);
904 propertyNames.push_back(MAGENTA_HUE_HIGH_RANGE_KW);
905 propertyNames.push_back(MAGENTA_HUE_BLEND_RANGE_KW);
906 propertyNames.push_back(MAGENTA_SATURATION_OFFSET_KW);
907 propertyNames.push_back(MAGENTA_INTENSITY_OFFSET_KW);
908 propertyNames.push_back(WHITE_OBJECT_CLIP_KW);
939 static const char MODULE[] =
"ossimHsiRemapper::loadState()";
944 << MODULE <<
" entering..." << endl;
949 if (prefix) tmpPrefix += prefix;
951 const char* lookupReturn;
953 lookupReturn = kwl.
find(tmpPrefix.
c_str(), MASTER_HUE_OFFSET_KW);
959 lookupReturn = kwl.
find(tmpPrefix.
c_str(), MASTER_SATURATION_OFFSET_KW);
965 lookupReturn = kwl.
find(tmpPrefix.
c_str(), MASTER_INTENSITY_OFFSET_KW);
971 lookupReturn = kwl.
find(tmpPrefix.
c_str(), MASTER_INTENSITY_LOW_CLIP_KW);
977 lookupReturn = kwl.
find(tmpPrefix.
c_str(), MASTER_INTENSITY_HIGH_CLIP_KW);
983 lookupReturn = kwl.
find(tmpPrefix.
c_str(), RED_HUE_OFFSET_KW);
989 lookupReturn = kwl.
find(tmpPrefix.
c_str(), RED_HUE_LOW_RANGE_KW);
995 lookupReturn = kwl.
find(tmpPrefix.
c_str(), RED_HUE_HIGH_RANGE_KW);
1001 lookupReturn = kwl.
find(tmpPrefix.
c_str(), RED_HUE_BLEND_RANGE_KW);
1007 lookupReturn = kwl.
find(tmpPrefix.
c_str(), RED_SATURATION_OFFSET_KW);
1013 lookupReturn = kwl.
find(tmpPrefix.
c_str(), RED_INTENSITY_OFFSET_KW);
1019 lookupReturn = kwl.
find(tmpPrefix.
c_str(), YELLOW_HUE_OFFSET_KW);
1025 lookupReturn = kwl.
find(tmpPrefix.
c_str(), YELLOW_HUE_LOW_RANGE_KW);
1031 lookupReturn = kwl.
find(tmpPrefix.
c_str(), YELLOW_HUE_HIGH_RANGE_KW);
1037 lookupReturn = kwl.
find(tmpPrefix.
c_str(), YELLOW_HUE_BLEND_RANGE_KW);
1043 lookupReturn = kwl.
find(tmpPrefix.
c_str(), YELLOW_SATURATION_OFFSET_KW);
1049 lookupReturn = kwl.
find(tmpPrefix.
c_str(), YELLOW_INTENSITY_OFFSET_KW);
1055 lookupReturn = kwl.
find(tmpPrefix.
c_str(), GREEN_HUE_OFFSET_KW);
1061 lookupReturn = kwl.
find(tmpPrefix.
c_str(), GREEN_HUE_LOW_RANGE_KW);
1067 lookupReturn = kwl.
find(tmpPrefix.
c_str(), GREEN_HUE_HIGH_RANGE_KW);
1073 lookupReturn = kwl.
find(tmpPrefix.
c_str(), GREEN_HUE_BLEND_RANGE_KW);
1079 lookupReturn = kwl.
find(tmpPrefix.
c_str(), GREEN_SATURATION_OFFSET_KW);
1085 lookupReturn = kwl.
find(tmpPrefix.
c_str(), GREEN_INTENSITY_OFFSET_KW);
1091 lookupReturn = kwl.
find(tmpPrefix.
c_str(), CYAN_HUE_OFFSET_KW);
1097 lookupReturn = kwl.
find(tmpPrefix.
c_str(), CYAN_HUE_LOW_RANGE_KW);
1103 lookupReturn = kwl.
find(tmpPrefix.
c_str(), CYAN_HUE_HIGH_RANGE_KW);
1109 lookupReturn = kwl.
find(tmpPrefix.
c_str(), CYAN_HUE_BLEND_RANGE_KW);
1115 lookupReturn = kwl.
find(tmpPrefix.
c_str(), CYAN_SATURATION_OFFSET_KW);
1121 lookupReturn = kwl.
find(tmpPrefix.
c_str(), CYAN_INTENSITY_OFFSET_KW);
1127 lookupReturn = kwl.
find(tmpPrefix.
c_str(), BLUE_HUE_OFFSET_KW);
1133 lookupReturn = kwl.
find(tmpPrefix.
c_str(), BLUE_HUE_LOW_RANGE_KW);
1139 lookupReturn = kwl.
find(tmpPrefix.
c_str(), BLUE_HUE_HIGH_RANGE_KW);
1145 lookupReturn = kwl.
find(tmpPrefix.
c_str(), BLUE_HUE_BLEND_RANGE_KW);
1151 lookupReturn = kwl.
find(tmpPrefix.
c_str(), BLUE_SATURATION_OFFSET_KW);
1157 lookupReturn = kwl.
find(tmpPrefix.
c_str(), BLUE_INTENSITY_OFFSET_KW);
1163 lookupReturn = kwl.
find(tmpPrefix.
c_str(), MAGENTA_HUE_OFFSET_KW);
1169 lookupReturn = kwl.
find(tmpPrefix.
c_str(), MAGENTA_HUE_LOW_RANGE_KW);
1175 lookupReturn = kwl.
find(tmpPrefix.
c_str(), MAGENTA_HUE_HIGH_RANGE_KW);
1181 lookupReturn = kwl.
find(tmpPrefix.
c_str(), MAGENTA_HUE_BLEND_RANGE_KW);
1187 lookupReturn = kwl.
find(tmpPrefix.
c_str(), MAGENTA_SATURATION_OFFSET_KW);
1193 lookupReturn = kwl.
find(tmpPrefix.
c_str(), MAGENTA_INTENSITY_OFFSET_KW);
1199 lookupReturn = kwl.
find(tmpPrefix.
c_str(), WHITE_OBJECT_CLIP_KW);
1224 const char* prefix)
const 1226 static const char MODULE[] =
"ossimHsiRemapper::saveStateTo()";
1231 << MODULE <<
"entering..." << endl;
1331 switch (color_group)
1356 <<
"ossimHsiRemapper::setSaturationOffset NOTICE: Range error!" 1553 if (offset >= -180.0 && offset <= 180.0)
1561 <<
"ossimHsiRemapper::setMasterHueOffset range error:" 1562 <<
"\nOffset of " << offset <<
" is out of range!" 1563 <<
"\nMust be equal to or greater than -180.0 and less than" 1564 <<
"\nor equal to 180.0" 1571 if (offset >= -1.0 && offset <= 1.0)
1579 <<
"ossimHsiRemapper::setMasterSaturationOffset range error:" 1580 <<
"\nOffset of " << offset <<
" is out of range!" 1581 <<
"\nMust be equal to or greater than -1.0 and less than" 1582 <<
"\nor equal to 1.0" 1589 if (offset >= -1.0 && offset <= 1.0)
1597 <<
"ossimHsiRemapper::setMasterIntensityOffset range error:" 1598 <<
"\nOffset of " << offset <<
" is out of range!" 1599 <<
"\nMust be equal to or greater than -1.0 and less than" 1600 <<
"\nor equal to 1.0" 1615 <<
"ossimHsiRemapper::setMasterIntensityClip range error:" 1616 <<
"\nLow clip of " << clip <<
" is out of range!" 1617 <<
"\nMust be equal to or greater than 0.0 and less than" 1633 <<
"ossimHsiRemapper::setMasterIntensityHighClip range error:" 1634 <<
"\nHigh clip of " << clip <<
" is out of range!" 1635 <<
"\nMust be greater than low clip of " 1643 if (offset >= -180.0 && offset <= 180.0)
1651 <<
"ossimHsiRemapper::setRedHueOffset range error:" 1652 <<
"\nOffset of " << offset <<
" is out of range!" 1653 <<
"\nMust be equal to or greater than -180.0 and less than" 1654 <<
"\nor equal to 180.0" 1669 if (r >= 315.0 && r < 360.0) r = r - 360.0;
1670 if (h >= 315.0 && h < 360.0) h = h - 360.0;
1672 if (r >= -45.0 && r <= 15.0 && r < h)
1679 <<
"ossimHsiRemapper::setRedHueLow range error:" 1680 <<
"\nRange of " << range <<
" is out of range!" 1687 if (range == 360.0) range = 0.0;
1698 if (r >= 315.0 && r < 360.0) r = r - 360.0;
1699 if (l >= 315.0 && l < 360.0) l = l - 360.0;
1701 if (r >= -15.0 && r <= 45 && l < r)
1708 <<
"ossimHsiRemapper::setRedHueHigh range error:" 1709 <<
"\nRange of " << range <<
" is out of range!" 1720 if ( range >= 0.0 &&
1721 range <= MAX_BLEND )
1725 if (range <= half_range)
1733 <<
"ossimHsiRemapper::setRedHueBlendRange range error:" 1734 <<
"\nRange of " << range <<
" is greater than the full range" 1735 <<
"\ndivided by 2!" 1744 <<
"ossimHsiRemapper::setRedHueBlendRange range error:" 1745 <<
"\nRange of " << range <<
" is out of range!" 1752 if (offset >= -1.0 && offset <= 1.0)
1760 <<
"ossimHsiRemapper::setRedSaturationOffset range error:" 1761 <<
"\nOffset of " << offset <<
" is out of range!" 1762 <<
"\nMust be equal to or greater than -1.0 and less than" 1763 <<
"\nor equal to 1.0" 1770 if (offset >= -1.0 && offset <= 1.0)
1778 <<
"ossimHsiRemapper::setRedIntensityOffset range error:" 1779 <<
"\nOffset of " << offset <<
" is out of range!" 1780 <<
"\nMust be equal to or greater than -1.0 and less than" 1781 <<
"\nor equal to 1.0" 1788 if (offset >= -180.0 && offset <= 180.0)
1796 <<
"ossimHsiRemapper::setYellowHueOffset range error:" 1797 <<
"\nOffset of " << offset <<
" is out of range!" 1798 <<
"\nMust be equal to or greater than -180.0 and less than" 1799 <<
"\nor equal to 180.0" 1810 if ( range >= 15.0 &&
1819 <<
"ossimHsiRemapper::setYellowHueLowRange range error:" 1820 <<
"\nRange of " << range <<
" is out of range!" 1831 if ( range >= 45.0 &&
1840 <<
"ossimHsiRemapper::setYellowHueHighRange range error:" 1841 <<
"\nRange of " << range <<
" is out of range!" 1852 if ( range >= 0.0 &&
1853 range <= MAX_BLEND )
1857 if (range <= half_range)
1865 <<
"ossimHsiRemapper::setYellowHueBlendRange range error:" 1866 <<
"\nRange of " << range <<
" is greater than the full range" 1867 <<
"\ndivided by 2!" 1876 <<
"ossimHsiRemapper::setYellowHueBlendRange range error:" 1877 <<
"\nRange of " << range <<
" is out of range!" 1884 if (offset >= -1.0 && offset <= 1.0)
1892 <<
"ossimHsiRemapper::setYellowSaturationOffset range error:" 1893 <<
"\nOffset of " << offset <<
" is out of range!" 1894 <<
"\nMust be equal to or greater than -1.0 and less than" 1895 <<
"\nor equal to 1.0" 1902 if (offset >= -1.0 && offset <= 1.0)
1910 <<
"ossimHsiRemapper::setYellowIntensityOffset range error:" 1911 <<
"\nOffset of " << offset <<
" is out of range!" 1912 <<
"\nMust be equal to or greater than -1.0 and less than" 1913 <<
"\nor equal to 1.0" 1920 if (offset >= -180.0 && offset <= 180.0)
1928 <<
"ossimHsiRemapper::setGreenHueOffset range error:" 1929 <<
"\nOffset of " << offset <<
" is out of range!" 1930 <<
"\nMust be equal to or greater than -180.0 and less than" 1931 <<
"\nor equal to 180.0" 1943 if ( range >= 75.0 &&
1952 <<
"ossimHsiRemapper::setGreenHueLowRange range error:" 1953 <<
"\nRange of " << range <<
" is out of range!" 1965 if ( range >= 105.0 &&
1974 <<
"ossimHsiRemapper::setGreenHueHighRange range error:" 1975 <<
"\nRange of " << range <<
" is out of range!" 1986 if ( range >= 0.0 &&
1987 range <= MAX_BLEND )
1991 if (range <= half_range)
1999 <<
"ossimHsiRemapper::setGreenHueBlendRange range error:" 2000 <<
"\nRange of " << range <<
" is greater than the full range" 2001 <<
"\ndivided by 2!" 2010 <<
"ossimHsiRemapper::setGreenHueBlendRange range error:" 2011 <<
"\nRange of " << range <<
" is out of range!" 2018 if (offset >= -1.0 && offset <= 1.0)
2026 <<
"ossimHsiRemapper::setGreenSaturationOffset range error:" 2027 <<
"\nOffset of " << offset <<
" is out of range!" 2028 <<
"\nMust be equal to or greater than -1.0 and less than" 2029 <<
"\nor equal to 1.0" 2036 if (offset >= -1.0 && offset <= 1.0)
2044 <<
"ossimHsiRemapper::setGreenIntensityOffset range error:" 2045 <<
"\nOffset of " << offset <<
" is out of range!" 2046 <<
"\nMust be equal to or greater than -1.0 and less than" 2047 <<
"\nor equal to 1.0" 2054 if (offset >= -180.0 && offset <= 180.0)
2062 <<
"ossimHsiRemapper::setCyanHueOffset range error:" 2063 <<
"\nOffset of " << offset <<
" is out of range!" 2064 <<
"\nMust be equal to or greater than -180.0 and less than" 2065 <<
"\nor equal to 180.0" 2077 if ( range >= 135.0 &&
2086 <<
"ossimHsiRemapper::setCyanHueLowRange range error:" 2087 <<
"\nRange of " << range <<
" is out of range!" 2099 if ( range >= 165.0 &&
2108 <<
"ossimHsiRemapper::setCyanHueHighRange range error:" 2109 <<
"\nRange of " << range <<
" is out of range!" 2120 if ( range >= 0.0 &&
2121 range <= MAX_BLEND )
2125 if (range <= half_range)
2133 <<
"ossimHsiRemapper::setCyanHueBlendRange range error:" 2134 <<
"\nRange of " << range <<
" is greater than the full range" 2135 <<
"\ndivided by 2!" 2144 <<
"ossimHsiRemapper::setCyanHueBlendRange range error:" 2145 <<
"\nRange of " << range <<
" is out of range!" 2152 if (offset >= -1.0 && offset <= 1.0)
2160 <<
"ossimHsiRemapper::setCyanSaturationOffset range error:" 2161 <<
"\nOffset of " << offset <<
" is out of range!" 2162 <<
"\nMust be equal to or greater than -1.0 and less than" 2163 <<
"\nor equal to 1.0" 2170 if (offset >= -1.0 && offset <= 1.0)
2178 <<
"ossimHsiRemapper::setCyanIntensityOffset range error:" 2179 <<
"\nOffset of " << offset <<
" is out of range!" 2180 <<
"\nMust be equal to or greater than -1.0 and less than" 2181 <<
"\nor equal to 1.0" 2188 if (offset >= -180.0 && offset <= 180.0)
2196 <<
"ossimHsiRemapper::setBlueHueOffset range error:" 2197 <<
"\nOffset of " << offset <<
" is out of range!" 2198 <<
"\nMust be equal to or greater than -180.0 and less than" 2199 <<
"\nor equal to 180.0" 2210 if ( range >= 195.0 &&
2219 <<
"ossimHsiRemapper::setBlueHueLowRange range error:" 2220 <<
"\nRange of " << range <<
" is out of range!" 2231 if ( range >= 225.0 &&
2240 <<
"ossimHsiRemapper::setBlueHueHighRange range error:" 2241 <<
"\nRange of " << range <<
" is out of range!" 2252 if ( range >= 0.0 &&
2253 range <= MAX_BLEND )
2257 if (range <= half_range)
2265 <<
"ossimHsiRemapper::setBlueHueBlendRange range error:" 2266 <<
"\nRange of " << range <<
" is greater than the full range" 2267 <<
"\ndivided by 2!" 2276 <<
"ossimHsiRemapper::setBlueHueBlendRange range error:" 2277 <<
"\nRange of " << range <<
" is out of range!" 2284 if (offset >= -1.0 && offset <= 1.0)
2292 <<
"ossimHsiRemapper::setBlueSaturationOffset range error:" 2293 <<
"\nOffset of " << offset <<
" is out of range!" 2294 <<
"\nMust be equal to or greater than -1.0 and less than" 2295 <<
"\nor equal to 1.0" 2302 if (offset >= -1.0 && offset <= 1.0)
2310 <<
"ossimHsiRemapper::setBlueIntensityOffset range error:" 2311 <<
"\nOffset of " << offset <<
" is out of range!" 2312 <<
"\nMust be equal to or greater than -1.0 and less than" 2313 <<
"\nor equal to 1.0" 2320 if (offset >= -180.0 && offset <= 180.0)
2328 <<
"ossimHsiRemapper::setMagentaHueOffset range error:" 2329 <<
"\nOffset of " << offset <<
" is out of range!" 2330 <<
"\nMust be equal to or greater than -180.0 and less than" 2331 <<
"\nor equal to 180.0" 2342 if ( range >= 255.0 &&
2351 <<
"ossimHsiRemapper::setMagentaHueLowRange range error:" 2352 <<
"\nRange of " << range <<
" is out of range!" 2363 if ( range >= 285.0 &&
2372 <<
"ossimHsiRemapper::setMagentaHueHighRange range error:" 2373 <<
"\nRange of " << range <<
" is out of range!" 2384 if ( range >= 0.0 &&
2385 range <= MAX_BLEND )
2389 if (range <= half_range)
2397 <<
"ossimHsiRemapper::setMagentaHueBlendRange range error:" 2398 <<
"\nRange of " << range <<
" is greater than the full range" 2399 <<
"\ndivided by 2!" 2408 <<
"ossimHsiRemapper::setMagentaHueBlendRange range error:" 2409 <<
"\nRange of " << range <<
" is out of range!" 2416 if (offset >= -1.0 && offset <= 1.0)
2424 <<
"ossimHsiRemapper::setMagentaSaturationOffset range error:" 2425 <<
"\nOffset of " << offset <<
" is out of range!" 2426 <<
"\nMust be equal to or greater than -1.0 and less than" 2427 <<
"\nor equal to 1.0" 2434 if (offset >= -1.0 && offset <= 1.0)
2442 <<
"ossimHsiRemapper::setMagentaIntensityOffset range error:" 2443 <<
"\nOffset of " << offset <<
" is out of range!" 2444 <<
"\nMust be equal to or greater than -1.0 and less than" 2445 <<
"\nor equal to 1.0" 2452 static const char MODULE[] =
"ossimHsiRemapper::calculateMinNormValue";
2462 << MODULE <<
" ERROR:" 2463 <<
"\nClass not initialized!" 2476 << MODULE <<
" Warning:" 2477 <<
"\nMixed minimum values for bands..." 2483 <<
"\nMixed maximum values for bands..." 2498 return (min_pix / max_pix);
2720 switch (color_group)
2745 <<
"ossimHsiRemapper::setHueOffset NOTICE: Range error!" << endl;
2751 switch (color_group)
2773 <<
"ossimHsiRemapper::setHueLowRange NOTICE: Range error!" 2780 switch (color_group)
2802 <<
"ossimHsiRemapper::setHueHighRange NOTICE: Range error!" 2809 switch (color_group)
2831 <<
"ossimHsiRemapper::setHueBlendRange NOTICE: Range error!" 2838 switch (color_group)
2863 <<
"ossimHsiRemapper::setSaturationOffset NOTICE: Range error!" 2871 switch (color_group)
2896 <<
"ossimHsiRemapper::setIntensityOffset NOTICE: Range error!" 2904 switch (color_group)
2929 <<
"ossimHsiRemapper::getHueOffset NOTICE: Range error!" 2938 switch (color_group)
2960 <<
"ossimHsiRemapper::getHueLowRange NOTICE: Range error!" 2969 switch (color_group)
2991 <<
"ossimHsiRemapper::getHueHighRange NOTICE: Range error!" 3000 switch (color_group)
3022 <<
"ossimHsiRemapper::getHueBlendRange NOTICE: Range error!" 3031 switch (color_group)
3056 <<
"ossimHsiRemapper::getSaturationOffset NOTICE: Range error!" 3065 switch (color_group)
3090 <<
"ossimHsiRemapper::getIntensityOffset NOTICE: Range error!" 3099 if ( (clip >= .8) && (clip <= 1.0) )
3107 <<
"HsiRemapper::setWhiteObjectClip range error:" 3108 <<
"\nClip of " << clip <<
" is out of range!" 3109 <<
"\nMust be between .8 and 1.0" 3127 return ossimString(
"HSI Remapper, filter with controls for all HSI(Hue, Saturation, and Intensity) adjustments.");
3137 os << setiosflags(ios::fixed) << setprecision(2)
3138 <<
"\nossimHsiRemapper:" 3191 return hr.
print(os);
void setMasterIntensityOffset(double offset)
void setYellowHueBlendRange(double range)
double theYellowHueLowRange
double getHueHighRange(int color_group) const
virtual void valueToString(ossimString &valueResult) const =0
virtual ossim_uint32 getWidth() const
double theMagentaIntensityOffset
virtual bool isSourceEnabled() const
double getHueOffset(int color_group) const
double getCyanSaturationOffset() const
virtual void setProperty(ossimRefPtr< ossimProperty > property)
virtual ossim_uint32 getNumberOfInputBands() const
void setMasterHueOffset(double offset)
virtual const ossim_float64 * getMaxPix() const
double getCyanHueBlendRange() const
virtual ossim_uint32 getNumberOfBands() const
ossim_float64 getS() const
double theRedHueBlendRange
void setGreenHueLowRange(double range)
double theCyanHueBlendRange
double theMagentaSaturationOffset
virtual void setImageRectangle(const ossimIrect &rect)
ossim_float64 getH() const
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
double getYellowHueHighRange() const
Represents serializable keyword/value map.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
void resetWhiteObjectClip()
double getMasterIntensityOffset() const
const char * find(const char *key) const
double getMagentaHueOffset() const
void setGreenSaturationOffset(double offset)
double theCyanSaturationOffset
virtual void copyTileBandToNormalizedBuffer(ossim_uint32 band, ossim_float64 *buf) const
Will copy this tiles specified band number to the normalized buffer.
void setMagentaHueHighRange(double range)
double getYellowHueLowRange() const
ossim_uint32 height() const
void setHueOffset(int color_group, double offset)
double getMasterIntensityHighClip() const
double getRedHueOffset() const
double getHueBlendRange(int color_group) const
static ossimString toString(bool aValue)
Numeric to string methods.
double getCyanHueOffset() const
virtual ossimRefPtr< ossimImageData > getTile(const ossimIrect &tile_rect, ossim_uint32 resLevel=0)
void setMagentaIntensityOffset(double offset)
void setCyanHueHighRange(double range)
double getBlueIntensityOffset() const
virtual ~ossimHsiRemapper()
double theBlueIntensityOffset
double getMagentaSaturationOffset() const
double getMasterSaturationOffset() const
virtual ossimDataObjectStatus getDataObjectStatus() const
virtual ossim_uint32 getHeight() const
double theBlueSaturationOffset
double getYellowHueBlendRange() const
double theMasterIntensityHighClip
void setYellowSaturationOffset(double offset)
double theNormalizedMinPix
void setMagentaHueBlendRange(double range)
double getWhiteObjectClip() const
void setGreenIntensityOffset(double offset)
void setHueBlendRange(int color_group, double range)
double theYellowHueOffset
virtual void initialize()
Initialize the data buffer.
void setMagentaHueOffset(double offset)
double getBlueHueBlendRange() const
double getYellowSaturationOffset() const
double theMagentaHueOffset
void setWhiteObjectClip(double clip)
void resetGroup(int color_group)
double theMasterIntensityOffset
virtual void initialize()
double getMasterIntensityLowClip() const
void setMagentaSaturationOffset(double offset)
double getMagentaIntensityOffset() const
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
void setSaturationOffset(int color_group, double offset)
double getGreenHueBlendRange() const
void setCyanHueLowRange(double range)
double getYellowIntensityOffset() const
void setI(ossim_float64 I)
ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
ossimRefPtr< ossimImageData > theTile
double getGreenHueHighRange() const
static ossimImageDataFactory * instance()
double getBlueHueLowRange() const
double getMagentaHueBlendRange() const
double getGreenIntensityOffset() const
void allocate(const ossimIrect &rect)
virtual ossimDataObjectStatus validate() const
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
double theYellowIntensityOffset
void setMagentaHueLowRange(double range)
void setMasterIntensityHighClip(double clip)
void setYellowHueOffset(double offset)
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
double calculateMinNormValue()
void setBlueHueHighRange(double range)
void setRedHueLowRange(double range)
virtual void setProperty(ossimRefPtr< ossimProperty > property)
double theWhiteObjectClip
virtual ossim_uint32 getSizePerBand() const
Returns the number of pixels in a single band in a tile.
ossimImageSource * theInputConnection
double theYellowHueHighRange
void setH(ossim_float64 H)
unsigned int ossim_uint32
ossim_float64 getI() const
double getHueLowRange(int color_group) const
double theGreenHueLowRange
void setRedHueHighRange(double range)
double getBlueSaturationOffset() const
double theRedIntensityOffset
void setBlueHueLowRange(double range)
void setRedHueOffset(double offset)
double theRedHueHighRange
void setCyanIntensityOffset(double offset)
virtual ostream & print(ostream &os) const
Outputs theErrorStatus as an ossimErrorCode and an ossimString.
void setCyanSaturationOffset(double offset)
double getGreenSaturationOffset() const
double theRedSaturationOffset
void setGreenHueOffset(double offset)
virtual void copyTileToNormalizedBuffer(ossim_float64 *buf) const
Copies entire tile to buf passed in.
double getBlueHueOffset() const
double theMagentaHueBlendRange
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
void setGreenHueHighRange(double range)
double getYellowHueOffset() const
double theMasterHueOffset
virtual void copyNormalizedBufferToTile(ossim_float64 *buf)
Copies buf passed in to tile.
void setYellowIntensityOffset(double offset)
void setIntensityOffset(int color_group, double offset)
double getGreenHueOffset() const
double theCyanHueHighRange
virtual ossimRefPtr< ossimImageData > create(ossimSource *owner, ossimScalarType scalar, ossim_uint32 bands=1) const
ossim_uint32 width() const
virtual void initialize()
void setGreenHueBlendRange(double range)
double getIntensityOffset(int color_group) const
double getRedHueBlendRange() const
ostream & operator<<(ostream &os, const ossimHsiRemapper &hr)
double theCyanIntensityOffset
void setCyanHueOffset(double offset)
virtual const ossim_float64 * getMinPix() const
double theGreenSaturationOffset
void setBlueHueBlendRange(double range)
virtual void makeBlank()
Initializes data to null pixel values.
void setBlueHueOffset(double offset)
double theBlueHueBlendRange
double theYellowSaturationOffset
#define OSSIM_DEFAULT_MIN_PIX_NORM_DOUBLE
double theCyanHueLowRange
double getMagentaHueLowRange() const
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
void setRedHueBlendRange(double range)
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
ossim_float64 getB() const
double theYellowHueBlendRange
double theBlueHueHighRange
double getRedIntensityOffset() const
double getCyanIntensityOffset() const
void setRedSaturationOffset(double offset)
void setS(ossim_float64 S)
double getSaturationOffset(int color_group) const
void setMasterSaturationOffset(double offset)
double theMasterSaturationOffset
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
void setMasterIntensityLowClip(double clip)
double getBlueHueHighRange() const
void setRedIntensityOffset(double offset)
virtual ossimString getShortName() const
ossim_float64 getG() const
#define RTTI_DEF1(cls, name, b1)
double getGreenHueLowRange() const
ossimDataObjectStatus
Definitions for data object status.
virtual ossimString getLongName() const
double getMagentaHueHighRange() const
double getMasterHueOffset() const
ossim_float64 getR() const
double theBlueHueLowRange
double getRedHueHighRange() const
double getRedSaturationOffset() const
double theMasterIntensityLowClip
double theGreenHueHighRange
void setYellowHueHighRange(double range)
double getCyanHueHighRange() const
void setCyanHueBlendRange(double range)
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
void setBlueSaturationOffset(double offset)
std::basic_ostream< char > ostream
Base class for char output streams.
void setCacheRefreshBit()
double getCyanHueLowRange() const
void setHueLowRange(int color_group, double range)
void setBlueIntensityOffset(double offset)
double theMagentaHueLowRange
void setYellowHueLowRange(double range)
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)
double getRedHueLowRange() const
double theGreenHueBlendRange
double theGreenIntensityOffset
void setHueHighRange(int color_group, double range)
double theMagentaHueHighRange