| 2111 | } |
| 2112 | |
| 2113 | ViewerColorSpaceEnum |
| 2114 | Project::getDefaultColorSpaceForBitDepth(ImageBitDepthEnum bitdepth) const |
| 2115 | { |
| 2116 | switch (bitdepth) { |
| 2117 | case eImageBitDepthByte: |
| 2118 | |
| 2119 | return colorspaceParamIndexToEnum(_imp->colorSpace8u->getValue()); |
| 2120 | case eImageBitDepthShort: |
| 2121 | |
| 2122 | return colorspaceParamIndexToEnum(_imp->colorSpace16u->getValue()); |
| 2123 | case eImageBitDepthHalf: // same colorspace as float |
| 2124 | case eImageBitDepthFloat: |
| 2125 | |
| 2126 | return colorspaceParamIndexToEnum(_imp->colorSpace32f->getValue()); |
| 2127 | case eImageBitDepthNone: |
| 2128 | assert(false); |
| 2129 | break; |
| 2130 | } |
| 2131 | |
| 2132 | return eViewerColorSpaceLinear; |
| 2133 | } |
| 2134 | |
| 2135 | // Functions to escape / unescape characters from XML strings |
| 2136 | // Note that the unescape function matches the escape function, |
no test coverage detected