31#ifndef IMAGE_CHANNEL_H_
32#define IMAGE_CHANNEL_H_ "ImageFrame 0.9, 2011.09.25 Markus.Peura@fmi.fi"
37#include <drain/CastableIterator.h>
39#include "ImageFrame.h"
76 conf.setGeometry(channel.getGeometry());
86 throw std::runtime_error(
"Channel: getChannel(i) with i>0");
92 const Channel & getChannel(
size_t i)
const {
94 throw std::runtime_error(
"Channel: getChannel(i) with i>0");
99 Channel & getAlphaChannel(
size_t i=0){
100 throw std::runtime_error(
"Channel: getAlphaChannel() impossible");
105 const Channel & getAlphaChannel(
size_t i=0)
const {
106 throw std::runtime_error(
"Channel: getAlphaChannel() impossible");
132 setView(src, channel);
136 void setView(
const ImageFrame & src,
size_t channel){
138 conf.channels.set(1,0);
142 void setView(
const Channel & src){
144 conf.channels.set(1,0);
169 Channel & getChannel(
size_t i);
171 const Channel & getChannel(
size_t i)
const;
173 Channel & getAlphaChannel(
size_t i=0);
175 const Channel & getAlphaChannel(
size_t i=0)
const;
180 const std::vector<ChannelView> & getChannelVector()
const {
182 return channelVector;
189 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:117
Image with static geometry.
Definition ImageChannel.h:58
Image with static geometry.
Definition ImageFrame.h:62
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:142
const CoordinatePolicy & getCoordinatePolicy() const
Coord policy.
Definition ImageLike.h:179
const std::type_info & getType() const
Get the storage type.
Definition ImageLike.h:105
Multi-channel ImageFrame.
Definition ImageChannel.h:153
void updateChannelVector() const
Updates channel vector. Copies scaling of the host image.
Definition ImageChannel.cpp:94