32 #include <Filter/Rescale.hh>
33 #include <Base/Image/ImageIO.hh>
34 #include <Base/Image/ImageConvert.hh>
35 #include <Base/Debug/TimeMeasure.hh>
41 #define StorageType unsigned char
42 #define OutputImageType unsigned char
44 #define StorageType float
45 #define OutputImageType float
48 int main(
int argc,
char *argv[])
57 if (argc-argind<1 || argind<1){
58 cerr << argv[0] <<
" [parameter] <im1> <im2> [ <im3> ... ] \n";
67 for (
int i=argind; i<argc; i++){
73 BIASERR(
"error loading image "<<argv[i]);
76 cerr <<
"read "<<argv[i]<<endl;
81 BIASERR(
"error converting image "<<argv[i]);
89 name <<
"rescale-"<<setw(4)<<setfill(
'0')<<i-argind<<
".ppm";
void Print(std::ostream &os=std::cout) const
void AddDebugLevel(const long int lv)
Down-, Upsampling routines and Resize.
static int ConvertST(const BIAS::ImageBase &source, BIAS::ImageBase &dest, ImageBase::EStorageType targetST)
Function to convert the storage type of images e.g.
virtual int Filter(const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
scales the src to dst using the downsampling factor from SetFactor()
static int Save(const std::string &filename, const ImageBase &img, const enum TFileFormat FileFormat=FF_auto, const bool sync=BIAS_DEFAULT_SYNC, const int c_jpeg_quality=BIAS_DEFAULT_IMAGE_QUALITY, const bool forceNewID=BIAS_DEFAULT_FORCENEWID, const bool &writeMetaData=true)
Export image as file using extrnal libs.
static int Load(const std::string &FileName, ImageBase &img)
first tries a call to Read MIP image and if that fails, tries to Import Image with all other availabl...
class TimeMeasure contains functions for timing real time and cpu time.