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"
71 conf.setGeometry(channel.getGeometry());
81 throw std::runtime_error(
"Channel: getChannel(i) with i>0");
87 const Channel & getChannel(
size_t i)
const {
89 throw std::runtime_error(
"Channel: getChannel(i) with i>0");
94 Channel & getAlphaChannel(
size_t i=0){
95 throw std::runtime_error(
"Channel: getAlphaChannel() impossible");
100 const Channel & getAlphaChannel(
size_t i=0)
const {
101 throw std::runtime_error(
"Channel: getAlphaChannel() impossible");
127 setView(src, channel);
131 void setView(
const ImageFrame & src,
size_t channel){
133 conf.channels.set(1,0);
137 void setView(
const Channel & src){
139 conf.channels.set(1,0);
161 Channel & getChannel(
size_t i);
163 const Channel & getChannel(
size_t i)
const;
165 Channel & getAlphaChannel(
size_t i=0);
167 const Channel & getAlphaChannel(
size_t i=0)
const;
172 const std::vector<ChannelView> & getChannelVector()
const {
174 return channelVector;
181 mutable std::vector<ChannelView> channelVector;
virtual void setScaling(double scale, double offset)
Set linear scaling.
Definition ValueScaling.h:135
View to a single channel.
Definition ImageChannel.h:112
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:174
const std::type_info & getType() const
Get the storage type.
Definition ImageLike.h:100
Multi-channel ImageFrame.
Definition ImageChannel.h:148
void updateChannelVector() const
Updates channel vector. Copies scaling of the host image.
Definition ImageChannel.cpp:94
Definition DataSelector.cpp:1277