31 #ifndef IMAGE_CHANNEL_H_
32 #define IMAGE_CHANNEL_H_ "ImageFrame 0.9, 2011.09.25 Markus.Peura@fmi.fi"
34 #include <drain/TypeUtils.h>
38 #include <drain/CastableIterator.h>
40 #include "drain/util/VariableMap.h"
41 #include "ImageFrame.h"
73 conf.setGeometry(channel.getGeometry());
83 throw std::runtime_error(
"Channel: getChannel(i) with i>0");
89 const Channel & getChannel(
size_t i)
const {
91 throw std::runtime_error(
"Channel: getChannel(i) with i>0");
96 Channel & getAlphaChannel(
size_t i=0){
97 throw std::runtime_error(
"Channel: getAlphaChannel() impossible");
102 const Channel & getAlphaChannel(
size_t i=0)
const {
103 throw std::runtime_error(
"Channel: getAlphaChannel() impossible");
129 setView(src, channel);
133 void setView(
const ImageFrame & src,
size_t channel){
135 conf.channels.set(1,0);
139 void setView(
const Channel & src){
141 conf.channels.set(1,0);
163 Channel & getChannel(
size_t i);
165 const Channel & getChannel(
size_t i)
const;
167 Channel & getAlphaChannel(
size_t i=0);
169 const Channel & getAlphaChannel(
size_t i=0)
const;
174 const std::vector<ChannelView> & getChannelVector()
const {
176 return channelVector;
183 mutable std::vector<ChannelView> channelVector;
virtual void setScaling(double scale, double offset)
Set linear scaling.
Definition: ValueScaling.h:136
View to a single channel.
Definition: ImageChannel.h:114
Image with static geometry.
Definition: ImageChannel.h:60
Image with static geometry.
Definition: ImageFrame.h:67
void setStorageType(const std::type_info &type)
Sets the storage type of the image - typically unsigned char, unsigned int or float....
Definition: ImageFrame.cpp:62
void setView(const ImageFrame &src, size_t channelStart, size_t channelCount, bool catenate=false)
Sets the image to view the data and scaling of another image.
Definition: ImageFrame.cpp:115
const std::type_info & getType() const
Get the storage type.
Definition: ImageLike.h:100
const CoordinatePolicy & getCoordinatePolicy() const
Coord policy.
Definition: ImageLike.h:167
Multi-channel ImageFrame.
Definition: ImageChannel.h:150
void updateChannelVector() const
Updates channel vector. Copies scaling of the host image.
Definition: ImageChannel.cpp:94
Definition: DataSelector.cpp:1277