diff options
author | Constantin Jucovschi <cj@ubuntu.localdomain> | 2009-04-24 07:20:22 -0400 |
---|---|---|
committer | Constantin Jucovschi <cj@ubuntu.localdomain> | 2009-04-24 07:20:22 -0400 |
commit | 8f27e65bddd7d4b8515ce620fb485fdd78fcdf89 (patch) | |
tree | bd328a4dd4f92d32202241b5e3a7f36177792c5f /manuals_and_examples/examples | |
download | rasdaman-upstream-8f27e65bddd7d4b8515ce620fb485fdd78fcdf89.tar.gz rasdaman-upstream-8f27e65bddd7d4b8515ce620fb485fdd78fcdf89.tar.xz rasdaman-upstream-8f27e65bddd7d4b8515ce620fb485fdd78fcdf89.zip |
Initial commitv8.0
Diffstat (limited to 'manuals_and_examples/examples')
27 files changed, 1876 insertions, 0 deletions
diff --git a/manuals_and_examples/examples/c++/Makefile b/manuals_and_examples/examples/c++/Makefile new file mode 100644 index 0000000..3a23dd1 --- /dev/null +++ b/manuals_and_examples/examples/c++/Makefile @@ -0,0 +1,165 @@ +# -*-Makefile-*- +# +# This file is part of rasdaman community. +# +# Rasdaman community is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Rasdaman community is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with rasdaman community. If not, see <http://www.gnu.org/licenses/>. +# +# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann / +# rasdaman GmbH. +# +# For more information please see <http://www.rasdaman.org> +# or contact Peter Baumann via <baumann@rasdaman.com>. # Top Level makefile. This points to the various modules that have to be build +# and/or deployed +# +# MAKEFILE FOR: +# Compile and link example C++ programs; +# right now, works only with GNU Make! +# +# +################################################################## + + +######################### Definitions ############################ + +# choose C++ compiler +ifeq ($(OSTYPE),linux) +OSTYPE=linux-gnu +endif +ifeq ($(OSTYPE),Linux) +OSTYPE=linux-gnu +endif + +ifneq ($(OSTYPE),linux-gnu) +endif +ifneq ($(OSTYPE),linux-gnu) +CXX = CC +else +CXX = g++ +endif + +# RasDaMan central includes +CXXFLAGS = -I$(RMANHOME)/include + +ifeq ($(OSTYPE),solaris) + + CXXFLAGS += -DSOLARIS + + # enable exception handling + # exceptions are supported by default + + # use ANSI C + # is used by default + +else +ifeq ($(OSTYPE),linux-gnu) + + CXXFLAGS += -DLINUX -DEARLY_TEMPLATE + + # enable exception handling + # exceptions are supported by default + + # use ANSI C + # is used by default + +else + + CXXFLAGS += -DHPUX + + # enable exception handling + CXXFLAGS += +eh + + # use ANSI C + CXXFLAGS += +a1 + + # necessary for templates because of bug in nm + CXXFLAGS += -ptb + +endif +endif + +ifeq ($(OSTYPE),solaris) + LDFLAGS += -lmalloc -lsocket -lnsl +endif + +# add communication flags +CXXFLAGS += -DONCRPC + +# pre-installed exchange format libraries needed +FMTLIBS = /usr/lib/libnetpbm.a /usr/lib/libjpeg.a /usr/local/lib/libpng.a /usr/local/lib/libtiff.a + +# libraries needed for linkage (in particular: rasdaman + exchange formats) +LIBS += -L/usr/lib -L$(RMANHOME)/lib \ + -lclientcomm -lrasodmg -lcompression -lconversion -lclientcomm -lrasodmg -lraslib \ + -lppm -lpgm -lnetpbm -ljpeg -lpng -ltiff -lmfhdf -ldf -lcrypto \ + -lm -lz + + +########################### Targets ############################## + +# this global target first checks for required libraries +# disable target 'check' if you don't want this to be run +all: check avg-cell avg-cell-red lookup query insertppm + +# check whether exchange format libraries have been installed +.PHONY: check +check: + @for lib in $(FMTLIBS); \ + do \ + if [[ ! -f $$lib ]]; \ + then \ + echo "error: cannot find required library $$lib - package not installed?"; \ + fi \ + done + +avg-cell: avg-cell.o + $(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) + +avg-cell-red: avg-cell-red.o + $(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) + +lookup: lookup.o + $(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) + +query: query.o + $(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) + +insertppm: insertppm.o + $(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) + +.PHONY : clean +clean: + -rm *.o *.log *.dbg *.bm + -rm query insertppm lookup avg-cell avg-cell-red +ifeq ($(OSTYPE),solaris) + cd $(RMANHOME)/include/rasodmg/ptrepository; ptclean +else +ifneq ($(OSTYPE),linux-gnu) + -rm -R $(RMANHOME)/include/rasodmg/ptrepository/* +endif +endif + +######################## Dependencies ############################ + +avg-cell.o: avg-cell.cc + +avg-cell-red.o: avg-cell-red.cc + +lookup.o: lookup.cc + +query.o: query.cc + +insertppm.o: insertppm.cc + $(CXX) $(CXXFLAGS) -c insertppm.cc -I/usr/X11R6/include + +# end of Makefile diff --git a/manuals_and_examples/examples/c++/avg-cell-red.cc b/manuals_and_examples/examples/c++/avg-cell-red.cc new file mode 100644 index 0000000..4896a83 --- /dev/null +++ b/manuals_and_examples/examples/c++/avg-cell-red.cc @@ -0,0 +1,144 @@ +/* +* This file is part of rasdaman community. +* +* Rasdaman community is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* Rasdaman community is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with rasdaman community. If not, see <http://www.gnu.org/licenses/>. +* +* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann / +rasdaman GmbH. +* +* For more information please see <http://www.rasdaman.org> +* or contact Peter Baumann via <baumann@rasdaman.com>. +*/ +/************************************************************* + * + * + * PURPOSE: + * Example program for computing the avg cell value + * for each image in a given 2-D RGB collection. + * + * + ************************************************************/ + +#include <iostream> + +// Linux needs this for template instantiation +#ifdef EARLY_TEMPLATE +#define __EXECUTABLE__ +#ifdef __GNUG__ +#include "raslib/template_inst.hh" +#endif +#endif + + +// rasdl generated data type file: +// (contains predefined RGB pixel structure) +#include "basictypes.hh" + + +int main( int ac, char** av ) +{ + char rasmgrName[255]; + int rasmgrPort; + char baseName[255]; + char collName[255]; + char userName[255]; + char userPass[255]; + + double sum; + + if( ac != 7 ) + { + cout << "Usage: avg-cell-red rasmgr_name rasmgr_port base_name collection_name user_name user_passwd" << endl; + return -1; + } + + strcpy( rasmgrName, av[1] ); + rasmgrPort = strtoul( av[2], NULL, 0); + strcpy( baseName, av[3] ); + strcpy( collName, av[4] ); + strcpy( userName, av[5] ); + strcpy( userPass, av[6] ); + + r_Database database; + r_Transaction transaction; + r_Ref< r_Set< r_Ref< r_Marray< RGBPixel > > > > image_set; + r_Iterator< r_Ref< r_Marray< RGBPixel > > > iter; + r_Ref< r_Marray< RGBPixel > > image; + r_Range i,j; + long pixelcount; + + try + { + database.set_servername( rasmgrName, rasmgrPort ); + database.set_useridentification( userName, userPass ); + + cout << "Opening database " << baseName + << " on " << rasmgrName << "... " << flush; + database.open( baseName ); + cout << "OK" << endl; + + cout << "Starting read-only transaction ... " << flush; + transaction.begin( r_Transaction::read_only ); + cout << "OK" << endl; + + cout << "Looking up collection " << collName << " ..." << flush; + image_set = database.lookup_object( collName ); + cout << "OK" << endl; + + cout << "Collection contains " << image_set->cardinality() + << " entries" << endl; + + iter = image_set->create_iterator(); + for( iter.reset(); iter.not_done(); iter++ ) + { + RGBPixel pixel; + image = *iter; + sum = 0.0; + for ( i=image->spatial_domain()[0].low(); i<=image->spatial_domain()[0].high(); i++ ) + { + for ( j=image->spatial_domain()[1].low(); j<=image->spatial_domain()[1].high(); j++ ) + { + pixel = (*image)[ r_Point(i,j) ]; + sum += pixel.red; + } + } + pixelcount = + ( image->spatial_domain()[0].high() - image->spatial_domain()[0].low() + 1 ) + * ( image->spatial_domain()[1].high() - image->spatial_domain()[1].low() + 1 ); + cout << " avg over " << pixelcount + << " red pixels is " + << sum / pixelcount + << endl << flush; + } + + cout << "Committing transaction ... " << flush; + transaction.commit(); + cout << "OK" << endl; + + cout << "Closing database ... " << flush; + database.close(); + cout << "OK" << endl; + } + catch( r_Error& errorObj ) + { + cerr << errorObj.what() << endl; + return -1; + } + + return 0; +} + +/* + * end of avg-cell-red.cc + */ diff --git a/manuals_and_examples/examples/c++/avg-cell.cc b/manuals_and_examples/examples/c++/avg-cell.cc new file mode 100644 index 0000000..c0012e1 --- /dev/null +++ b/manuals_and_examples/examples/c++/avg-cell.cc @@ -0,0 +1,136 @@ +/* +* This file is part of rasdaman community. +* +* Rasdaman community is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* Rasdaman community is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with rasdaman community. If not, see <http://www.gnu.org/licenses/>. +* +* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann / +rasdaman GmbH. +* +* For more information please see <http://www.rasdaman.org> +* or contact Peter Baumann via <baumann@rasdaman.com>. +*/ +/************************************************************* + * + * + * PURPOSE: + * Example program for computing the avg cell value + * for each n-D 8-bit grey image in a given collection. + * + * + ************************************************************/ + +#include <iostream> + +// Linux needs this for template instantiation +#ifdef EARLY_TEMPLATE +#define __EXECUTABLE__ +#ifdef __GNUG__ +#include "raslib/template_inst.hh" +#endif +#endif + +// rasdl generated data type file: +// (contains predefined RGBPixel structure) +#include "basictypes.hh" + + +int main( int ac, char** av ) +{ + char rasmgrName[255]; + int rasmgrPort; + char baseName[255]; + char collName[255]; + char userName[255]; + char userPass[255]; + r_Base_Type *celltype; + double sum; + + if( ac != 7 ) + { + cout << "Usage: avg-cell rasmgr_name rasmgr_port base_name collection_name user_name user_passwd" << endl; + return -1; + } + + strcpy( rasmgrName, av[1] ); + rasmgrPort = strtoul( av[2], NULL, 0); + strcpy( baseName, av[3] ); + strcpy( collName, av[4] ); + strcpy( userName, av[5] ); + strcpy( userPass, av[6] ); + + r_Database database; + r_Transaction transaction; + r_Ref< r_Set< r_Ref< r_Marray< RGBPixel > > > > image_set; + r_Iterator< r_Ref< r_Marray< RGBPixel > > > iter; + r_Ref< r_Marray< RGBPixel > > image; + r_Range i; + + try + { + database.set_servername( rasmgrName, rasmgrPort ); + database.set_useridentification( userName, userPass ); + + cout << "Opening database " << baseName + << " on " << rasmgrName << "... " << flush; + database.open( baseName ); + cout << "OK" << endl; + + cout << "Starting read-only transaction ... " << flush; + transaction.begin( r_Transaction::read_only ); + cout << "OK" << endl; + + cout << "Looking up collection " << collName << " ..." << flush; + image_set = database.lookup_object( collName ); + cout << "OK" << endl; + + cout << "Collection contains " << image_set->cardinality() + << " entries" << endl; + + iter = image_set->create_iterator(); + for( iter.reset(); iter.not_done(); iter++ ) + { + image = *iter; + if ( image->get_type_length() != 1 ) + cout << "skipping image because of non-int cell type" << endl; + else + { + unsigned char *pixelfield = (unsigned char*) image->get_array(); + sum = 0.0; + for ( i=0; i < image->get_array_size(); i++ ) + sum += pixelfield[i]; + cout << " avg over " << image->get_array_size() + << " pixels is " << sum/image->get_array_size() << endl; + } + } + + cout << "Committing transaction ... " << flush; + transaction.commit(); + cout << "OK" << endl; + + cout << "Closing database ... " << flush; + database.close(); + cout << "OK" << endl; + } + catch( r_Error& errorObj ) + { + cerr << errorObj.what() << endl; + return -1; + } + + return 0; +} + +/* + * end of avg-cell.cc + */ diff --git a/manuals_and_examples/examples/c++/basictypes.hh b/manuals_and_examples/examples/c++/basictypes.hh new file mode 100644 index 0000000..adbda31 --- /dev/null +++ b/manuals_and_examples/examples/c++/basictypes.hh @@ -0,0 +1,206 @@ +/* +* This file is part of rasdaman community. +* +* Rasdaman community is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* Rasdaman community is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with rasdaman community. If not, see <http://www.gnu.org/licenses/>. +* +* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann / +rasdaman GmbH. +* +* For more information please see <http://www.rasdaman.org> +* or contact Peter Baumann via <baumann@rasdaman.com>. +*/ +//------------------------------------------------------------ +// This file is created automatically by the rasdl processor. +// +// DO NOT EDIT +//------------------------------------------------------------ + +#ifndef __BASICTYPES_HH_ +#define __BASICTYPES_HH_ + +//------------------------------------------------------------ +// Includes +//------------------------------------------------------------ + +#include "rasdaman.hh" + +/*[2,25]*//* TYPEDEF ------------------------- GreyImage */ +typedef r_Marray<r_Char> GreyImage; + +/*[3,24]*//* TYPEDEF ------------------------- GreySet */ +typedef r_Set<r_Ref<GreyImage> > GreySet; + +/*[6,28]*//* TYPEDEF ------------------------- BoolImage */ +typedef r_Marray<r_Boolean> BoolImage; + +/*[7,24]*//* TYPEDEF ------------------------- BoolSet */ +typedef r_Set<r_Ref<BoolImage> > BoolSet; + +/*[10,1]*//* STRUCT -------------------------- RGBPixel */ +struct RGBPixel { + r_Char red; + r_Char green; + r_Char blue; +}; +/*[11,29]*//* TYPEDEF ------------------------- RGBImage */ +typedef r_Marray<RGBPixel> RGBImage; + +/*[12,23]*//* TYPEDEF ------------------------- RGBSet */ +typedef r_Set<r_Ref<RGBImage> > RGBSet; + +/*[15,35]*//* TYPEDEF ------------------------- ULongImage */ +typedef r_Marray<r_ULong > ULongImage; + +/*[16,25]*//* TYPEDEF ------------------------- ULongSet */ +typedef r_Set<r_Ref<ULongImage> > ULongSet; + +/*[19,26]*//* TYPEDEF ------------------------- GreyCube */ +typedef r_Marray<r_Char> GreyCube; + +/*[20,23]*//* TYPEDEF ------------------------- GreySet3 */ +typedef r_Set<r_Ref<GreyCube> > GreySet3; + +/*[24,29]*//* TYPEDEF ------------------------- BoolString */ +typedef r_Marray<r_Boolean> BoolString; + +/*[25,25]*//* TYPEDEF ------------------------- BoolSet1 */ +typedef r_Set<r_Ref<BoolString> > BoolSet1; + +/*[27,29]*//* TYPEDEF ------------------------- BoolCube */ +typedef r_Marray<r_Boolean> BoolCube; + +/*[28,23]*//* TYPEDEF ------------------------- BoolSet3 */ +typedef r_Set<r_Ref<BoolCube> > BoolSet3; + +/*[30,26]*//* TYPEDEF ------------------------- GreyString */ +typedef r_Marray<r_Char> GreyString; + +/*[31,25]*//* TYPEDEF ------------------------- GreySet1 */ +typedef r_Set<r_Ref<GreyString> > GreySet1; + +/*[33,27]*//* TYPEDEF ------------------------- ShortString */ +typedef r_Marray<r_Short > ShortString; + +/*[34,26]*//* TYPEDEF ------------------------- ShortSet1 */ +typedef r_Set<r_Ref<ShortString> > ShortSet1; + +/*[36,27]*//* TYPEDEF ------------------------- ShortImage */ +typedef r_Marray<r_Short > ShortImage; + +/*[37,25]*//* TYPEDEF ------------------------- ShortSet */ +typedef r_Set<r_Ref<ShortImage> > ShortSet; + +/*[39,27]*//* TYPEDEF ------------------------- ShortCube */ +typedef r_Marray<r_Short > ShortCube; + +/*[40,24]*//* TYPEDEF ------------------------- ShortSet3 */ +typedef r_Set<r_Ref<ShortCube> > ShortSet3; + +/*[42,36]*//* TYPEDEF ------------------------- UShortString */ +typedef r_Marray<r_UShort > UShortString; + +/*[43,27]*//* TYPEDEF ------------------------- UShortSet1 */ +typedef r_Set<r_Ref<UShortString> > UShortSet1; + +/*[45,36]*//* TYPEDEF ------------------------- UShortImage */ +typedef r_Marray<r_UShort > UShortImage; + +/*[46,26]*//* TYPEDEF ------------------------- UShortSet */ +typedef r_Set<r_Ref<UShortImage> > UShortSet; + +/*[48,36]*//* TYPEDEF ------------------------- UShortCube */ +typedef r_Marray<r_UShort > UShortCube; + +/*[49,25]*//* TYPEDEF ------------------------- UShortSet3 */ +typedef r_Set<r_Ref<UShortCube> > UShortSet3; + +/*[51,26]*//* TYPEDEF ------------------------- LongString */ +typedef r_Marray<r_Long > LongString; + +/*[52,25]*//* TYPEDEF ------------------------- LongSet1 */ +typedef r_Set<r_Ref<LongString> > LongSet1; + +/*[54,26]*//* TYPEDEF ------------------------- LongImage */ +typedef r_Marray<r_Long > LongImage; + +/*[55,24]*//* TYPEDEF ------------------------- LongSet */ +typedef r_Set<r_Ref<LongImage> > LongSet; + +/*[57,26]*//* TYPEDEF ------------------------- LongCube */ +typedef r_Marray<r_Long > LongCube; + +/*[58,23]*//* TYPEDEF ------------------------- LongSet3 */ +typedef r_Set<r_Ref<LongCube> > LongSet3; + +/*[60,35]*//* TYPEDEF ------------------------- ULongString */ +typedef r_Marray<r_ULong > ULongString; + +/*[61,26]*//* TYPEDEF ------------------------- ULongSet1 */ +typedef r_Set<r_Ref<ULongString> > ULongSet1; + +/*[63,35]*//* TYPEDEF ------------------------- ULongCube */ +typedef r_Marray<r_ULong > ULongCube; + +/*[64,24]*//* TYPEDEF ------------------------- ULongSet3 */ +typedef r_Set<r_Ref<ULongCube> > ULongSet3; + +/*[66,30]*//* TYPEDEF ------------------------- RGBString */ +typedef r_Marray<RGBPixel> RGBString; + +/*[67,24]*//* TYPEDEF ------------------------- RGBSet1 */ +typedef r_Set<r_Ref<RGBString> > RGBSet1; + +/*[69,30]*//* TYPEDEF ------------------------- RGBCube */ +typedef r_Marray<RGBPixel> RGBCube; + +/*[70,22]*//* TYPEDEF ------------------------- RGBSet3 */ +typedef r_Set<r_Ref<RGBCube> > RGBSet3; + +/*[72,27]*//* TYPEDEF ------------------------- FloatString */ +typedef r_Marray<r_Float> FloatString; + +/*[73,26]*//* TYPEDEF ------------------------- FloatSet1 */ +typedef r_Set<r_Ref<FloatString> > FloatSet1; + +/*[75,27]*//* TYPEDEF ------------------------- FloatImage */ +typedef r_Marray<r_Float> FloatImage; + +/*[76,25]*//* TYPEDEF ------------------------- FloatSet */ +typedef r_Set<r_Ref<FloatImage> > FloatSet; + +/*[78,27]*//* TYPEDEF ------------------------- FloatCube */ +typedef r_Marray<r_Float> FloatCube; + +/*[79,24]*//* TYPEDEF ------------------------- FloatSet3 */ +typedef r_Set<r_Ref<FloatCube> > FloatSet3; + +/*[81,28]*//* TYPEDEF ------------------------- DoubleString */ +typedef r_Marray<r_Double> DoubleString; + +/*[82,27]*//* TYPEDEF ------------------------- DoubleSet1 */ +typedef r_Set<r_Ref<DoubleString> > DoubleSet1; + +/*[84,28]*//* TYPEDEF ------------------------- DoubleImage */ +typedef r_Marray<r_Double> DoubleImage; + +/*[85,26]*//* TYPEDEF ------------------------- DoubleSet */ +typedef r_Set<r_Ref<DoubleImage> > DoubleSet; + +/*[87,28]*//* TYPEDEF ------------------------- DoubleCube */ +typedef r_Marray<r_Double> DoubleCube; + +/*[88,25]*//* TYPEDEF ------------------------- DoubleSet3 */ +typedef r_Set<r_Ref<DoubleCube> > DoubleSet3; + +#endif diff --git a/manuals_and_examples/examples/c++/lookup.cc b/manuals_and_examples/examples/c++/lookup.cc new file mode 100644 index 0000000..b4817fa --- /dev/null +++ b/manuals_and_examples/examples/c++/lookup.cc @@ -0,0 +1,146 @@ +/* +* This file is part of rasdaman community. +* +* Rasdaman community is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* Rasdaman community is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with rasdaman community. If not, see <http://www.gnu.org/licenses/>. +* +* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann / +rasdaman GmbH. +* +* For more information please see <http://www.rasdaman.org> +* or contact Peter Baumann via <baumann@rasdaman.com>. +*/ +/************************************************************* + * + * + * PURPOSE: + * Example program for looking up the content of a collection. + * + * + ************************************************************/ + +#include <iostream> + +// Linux needs this for template instantiation +#ifdef EARLY_TEMPLATE +#define __EXECUTABLE__ +#ifdef __GNUG__ +#include "raslib/template_inst.hh" +#endif +#endif + + +// this file is generated by the rasdl processor +#include "basictypes.hh" + + +int main( int ac, char** av ) +{ + char rasmgrName[255]; + int rasmgrPort; + char baseName[255]; + char collName[255]; + char userName[255]; + char userPass[255]; + + if( ac != 7 ) + { + cout << "Usage: lookup rasmgr_name rasmgr_port base_name collection_name user_name user_passwd" << endl; + return -1; + } + + strcpy( rasmgrName, av[1] ); + rasmgrPort = strtoul( av[2], NULL, 0); + strcpy( baseName, av[3] ); + strcpy( collName, av[4] ); + strcpy( userName, av[5] ); + strcpy( userPass, av[6] ); + + r_Database database; + r_Transaction transaction; + r_Ref< r_Set< r_Ref< r_GMarray > > > image_set; + r_Ref< r_GMarray > image; + r_Iterator< r_Ref< r_GMarray > > iter; + int i; + + try + { + database.set_servername( rasmgrName, rasmgrPort ); + database.set_useridentification( userName, userPass ); + + cout << "Opening database " << baseName + << " on " << rasmgrName << "... " << flush; + + database.open( baseName ); + cout << "OK" << endl; + + cout << "Starting read-only transaction ... " << flush; + transaction.begin( r_Transaction::read_only ); + cout << "OK" << endl; + + cout << "Looking up collection " << collName << " ..." << flush; + image_set = database.lookup_object( collName ); + cout << "OK" << endl; + + cout << "Collection" << endl; + cout << " oid...................: " << image_set->get_oid() << endl; + cout << " type name.............: " << image_set->get_object_name() << endl; + cout << " type structure........: " + << ( image_set->get_type_structure() ? image_set->get_type_structure() : "<nn>" ) + << endl; + + cout << " type schema...........: " << flush; + if( image_set->get_type_schema() ) + image_set->get_type_schema()->print_status( cout ); + else + cout << "<nn>" << flush; + cout << endl; + cout << " number of entries.....: " << image_set->cardinality() << endl; + + cout << " Element type schema...: " << flush; + if( image_set->get_element_type_schema() ) + image_set->get_element_type_schema()->print_status( cout ); + else + cout << "<nn>" << flush; + cout << endl << endl; + + iter = image_set->create_iterator(); + for( i=1, iter.reset(); iter.not_done(); iter++, i++ ) + { + cout << "Image " << i << endl; + image = *iter; + image->print_status( cout ); + cout << endl; + } + cout << endl; + + cout << "Committing transaction ... " << flush; + transaction.commit(); + cout << "OK" << endl; + + cout << "Closing database ... " << flush; + database.close(); + cout << "OK" << endl; + } + catch( r_Error& errorObj ) + { + cerr << errorObj.what() << endl; + return -1; + } + + return 0; +} + +/* + * end of lookup.cc + */ diff --git a/manuals_and_examples/examples/c++/query.cc b/manuals_and_examples/examples/c++/query.cc new file mode 100644 index 0000000..9bcf16e --- /dev/null +++ b/manuals_and_examples/examples/c++/query.cc @@ -0,0 +1,172 @@ +/* +* This file is part of rasdaman community. +* +* Rasdaman community is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* Rasdaman community is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with rasdaman community. If not, see <http://www.gnu.org/licenses/>. +* +* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann / +rasdaman GmbH. +* +* For more information please see <http://www.rasdaman.org> +* or contact Peter Baumann via <baumann@rasdaman.com>. +*/ +/************************************************************* + * + * + * PURPOSE: + * Example program for RasML query invocation from C++. + * + * + ************************************************************/ + +#include <iostream> + +// Linux needs this for template instantiation +#ifdef EARLY_TEMPLATE +#define __EXECUTABLE__ +#ifdef __GNUG__ +#include "raslib/template_inst.hh" +#endif +#endif + +// this file is generated by the rasdl processor +#include "basictypes.hh" + + +int main( int ac, char** av ) +{ + char rasmgrName[255]; + int rasmgrPort; + char baseName[255]; + char collName[255]; + char userName[255]; + char userPass[255]; + + if( ac != 7 ) + { + cout << "Usage: query rasmgr_name rasmgr_port base_name collection_name user_name user_passwd" << endl; + return -1; + } + + strcpy( rasmgrName, av[1] ); + rasmgrPort = strtoul( av[2], NULL, 0); + strcpy( baseName, av[3] ); + strcpy( collName, av[4] ); + strcpy( userName, av[5] ); + strcpy( userPass, av[6] ); + + r_Minterval select_domain = r_Minterval("[0:4,0:4]"); + r_Minterval where_domain = r_Minterval("[8:9,8:9]"); + r_ULong threshold_value = 10; + + r_Database database; + r_Transaction transaction; + r_Set< r_Ref< r_GMarray > > image_set; + r_Ref< r_GMarray > image; + r_Iterator< r_Ref< r_GMarray > > iter; + + try + { + database.set_servername( rasmgrName, rasmgrPort ); + database.set_useridentification( userName, userPass ); + + cout << "Opening database " << baseName + << " on " << rasmgrName << "... " << flush; + + database.open( baseName ); + cout << "OK" << endl; + + cout << "Starting read-only transaction ... " << flush; + transaction.begin( r_Transaction::read_only ); + cout << "OK" << endl; + + cout << "Creating the query object ..." << flush; + r_OQL_Query query("select a$1 from $2 as a where some_cells( a$3 > $4 )"); + cout << "OK, Query string is: " << query.get_query() << endl; + + cout << "Substituting query parameters ..." << flush; + query << select_domain << collName << where_domain << threshold_value; + cout << "OK, Query string is: " << query.get_query() << endl; + + cout << "Executing the query ..." << flush; + try + { + r_oql_execute( query, image_set ); + } + catch( r_Error& errorObj ) + { + cout << "FAILED" << endl << errorObj.what() << endl; + + cout << "Aborting transaction ... " << flush; + transaction.abort(); + cout << "OK" << endl; + + cout << "Closing database ... " << flush; + database.close(); + cout << "OK" << endl; + return -1; + } + cout << "OK" << endl << endl; + + cout << "Collection" << endl; + cout << " Oid...................: " << image_set.get_oid() << endl; + cout << " Type Name.............: " << image_set.get_object_name() << endl; + cout << " Type Structure........: " + << ( image_set.get_type_structure() ? image_set.get_type_structure() : "<nn>" ) + << endl; + cout << " Type Schema...........: " << flush; + if( image_set.get_type_schema() ) + image_set.get_type_schema()->print_status( cout ); + else + cout << "<nn>" << flush; + cout << endl; + cout << " Number of entries.....: " << image_set.cardinality() << endl; + cout << " Element Type Schema...: " << flush; + if( image_set.get_element_type_schema() ) + image_set.get_element_type_schema()->print_status( cout ); + else + cout << "<nn>" << flush; + cout << endl << endl; + + iter = image_set.create_iterator(); + + int i; + for ( i=1, iter.reset(); iter.not_done(); iter++, i++ ) + { + cout << "Image " << i << endl; + image= *iter; + image->print_status( cout ); + cout << endl; + } + cout << endl; + + cout << "Committing transaction ... " << flush; + transaction.commit(); + cout << "OK" << endl; + + cout << "Closing database ... " << flush; + database.close(); + cout << "OK" << endl; + } + catch( r_Error& errorObj ) + { + cerr << errorObj.what() << endl; + return -1; + } + + return 0; +} + +/* + * end of query.cc + */ diff --git a/manuals_and_examples/examples/c++/query2.cc b/manuals_and_examples/examples/c++/query2.cc new file mode 100644 index 0000000..6388e78 --- /dev/null +++ b/manuals_and_examples/examples/c++/query2.cc @@ -0,0 +1,181 @@ +/* +* This file is part of rasdaman community. +* +* Rasdaman community is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* Rasdaman community is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with rasdaman community. If not, see <http://www.gnu.org/licenses/>. +* +* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann / +rasdaman GmbH. +* +* For more information please see <http://www.rasdaman.org> +* or contact Peter Baumann via <baumann@rasdaman.com>. +*/ +/************************************************************* + * + * + * PURPOSE: + * Example program for rasql query invocation from C++, showing a + * typical mapping scenario. + * + * + * BUGS: + * - needs this link cmd line + * query2: query2.o + * $(CXX) $(LDFLAGS) -o $@ $^ \ + * -L$(RMANHOME)/lib -lrasodmg -lclientcomm -lcompression -lconversion -lraslib -lnetwork -ljpeg -lpng -ltiff -lmfhdf -ldf -lcrypt o -lclientcomm -lm -lz + * + ************************************************************/ + +#include <iostream> + +// Linux needs this for template instantiation +#ifdef EARLY_TEMPLATE +#define __EXECUTABLE__ +#ifdef __GNUG__ +#include "raslib/template_inst.hh" +#endif +#endif + +// this file is generated by the rasdl processor +#include "basictypes.hh" + +// connectivity constants +char *host = "localhost"; +int port = 7001; +char *db = "RASBASE"; +char *userName = "rasguest"; +char *userPass = "rasguest"; + +// demo program settings +// - collection ("map") name +char *collection = "rgb"; +// - coordinates of map bbox to be retrieved +unsigned int xImageLo = 100; +unsigned int xImageHi = 200; +unsigned int yImageLo = 100; +unsigned int yImageHi = 200; +// - target window size +unsigned int xSize = 10; +unsigned int ySize = 10; + +// global connection objects +r_Database database; +r_Transaction transaction; + +// sample image accessing function, typical for mapping applications +// input: collection ("map") name, source image coordinates, target window size +// output: ptr to image array +// precondition: we're accessing an RGB image, so that we can select the "green" channel of it +// note: the most important parts contain markups at the beginning of the line +unsigned char *readImage( const char *collection, int xImageLo, int xImageHi, int yImageLo, int yImageHi, int xSize, int ySize ) throw (r_Error) +{ + r_Set< r_Ref< r_GMarray > > imageSet; // result set + r_Ref< r_GMarray > image; + r_Iterator< r_Ref< r_GMarray > > iter; + + // function result + unsigned char *result = NULL; + + try + { + cout << "creating query..." << flush; + // parameters: + // $1 map bbox coordinate, lower x + // $2 map bbox coordinate, upper x + // $3 map bbox coordinate, lower y + // $4 map bbox coordinate, upper y + // $5 result window x size + // $6 result window y size + // $7 collection (i.e., map) name +/* 1 */ r_OQL_Query query("select scale(img.green[$1:$2,$3:$4],[1:$5,1:$6]) from $7 as img"); + + cout << "substituting parameters ..." << flush; +/* 2 */ query << xImageLo << xImageHi << yImageLo << yImageHi << xSize << ySize << collection; + cout << "[query: " << query.get_query() << "]..."; + + cout << "executing query..." << flush; +/* 3 */ r_oql_execute( query, imageSet ); + + // now we assume a result has come back + iter = imageSet.create_iterator(); + iter.reset(); +/* 4 */ result = (unsigned char*) (*iter)->get_array(); + + } + catch(r_Error& e) + { + cout << "Error: query failed: " << e.what() << flush; + throw; + } + + return result; +} + +// simple wrapper, handling db connectivity and demo output +int main() +{ + try + { + database.set_servername( host, port ); + database.set_useridentification( userName, userPass ); + + cout << "Opening database " << db << " on " << host << "..." << flush; + database.open( db ); + + cout << "starting read-only transaction..." << flush; + transaction.begin( r_Transaction::read_only ); + + // the real workhorse: fetch image data + unsigned char *imgPtr = readImage( collection, xImageLo, xImageHi, yImageLo, yImageHi, xSize, ySize ); + + cout << "result image:" << endl << hex; + for (int i = 0; i < xSize; i++) + { + for (int j = 0; j < ySize; j++) + { + register unsigned char c = *imgPtr; + cout << " " << setw(2) << (unsigned short) (c & 0xFF); + imgPtr++; + } + cout << endl; + } + cout << dec; + } + catch(r_Error& e) + { + cout << "Error: cannot access database: " << e.what() << endl << flush; + } + + + // ignore any (previous) errors for connection close + try + { + cout << "aborting transaction..." << flush; + transaction.abort(); + + cout << "closing database..." << flush; + database.close(); + + cout << "done." << endl; + } + catch(r_Error &e) + { + cout << "Error closing connection: " << e.what() << endl << flush; + } + + return 0; +} + +/* + * end of query2.cc + */ diff --git a/manuals_and_examples/examples/images/anthur.ppm b/manuals_and_examples/examples/images/anthur.ppm new file mode 100644 index 0000000..38a7be3 --- /dev/null +++ b/manuals_and_examples/examples/images/anthur.ppm @@ -0,0 +1,5 @@ +P6 +# CREATOR: XV Version 3.10b Rev: 12/31/97 +400 344 +255 +wÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøÿÿÿÿÿÿwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐø" " wÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐøwÐø" diff --git a/manuals_and_examples/examples/images/anthur.tif b/manuals_and_examples/examples/images/anthur.tif Binary files differnew file mode 100644 index 0000000..2f841d2 --- /dev/null +++ b/manuals_and_examples/examples/images/anthur.tif diff --git a/manuals_and_examples/examples/images/arrow.pgm b/manuals_and_examples/examples/images/arrow.pgm Binary files differnew file mode 100644 index 0000000..74feaa0 --- /dev/null +++ b/manuals_and_examples/examples/images/arrow.pgm diff --git a/manuals_and_examples/examples/images/arrow.tif b/manuals_and_examples/examples/images/arrow.tif Binary files differnew file mode 100644 index 0000000..2911b21 --- /dev/null +++ b/manuals_and_examples/examples/images/arrow.tif diff --git a/manuals_and_examples/examples/images/mr_1.pgm b/manuals_and_examples/examples/images/mr_1.pgm Binary files differnew file mode 100644 index 0000000..6722dbd --- /dev/null +++ b/manuals_and_examples/examples/images/mr_1.pgm diff --git a/manuals_and_examples/examples/images/mr_1.tif b/manuals_and_examples/examples/images/mr_1.tif Binary files differnew file mode 100644 index 0000000..785fcb9 --- /dev/null +++ b/manuals_and_examples/examples/images/mr_1.tif diff --git a/manuals_and_examples/examples/images/mr_2.pgm b/manuals_and_examples/examples/images/mr_2.pgm Binary files differnew file mode 100644 index 0000000..1fc6b18 --- /dev/null +++ b/manuals_and_examples/examples/images/mr_2.pgm diff --git a/manuals_and_examples/examples/images/mr_2.tif b/manuals_and_examples/examples/images/mr_2.tif Binary files differnew file mode 100644 index 0000000..d3c92cc --- /dev/null +++ b/manuals_and_examples/examples/images/mr_2.tif diff --git a/manuals_and_examples/examples/images/mr_3.pgm b/manuals_and_examples/examples/images/mr_3.pgm Binary files differnew file mode 100644 index 0000000..f9a0499 --- /dev/null +++ b/manuals_and_examples/examples/images/mr_3.pgm diff --git a/manuals_and_examples/examples/images/mr_3.tif b/manuals_and_examples/examples/images/mr_3.tif Binary files differnew file mode 100644 index 0000000..29c6f58 --- /dev/null +++ b/manuals_and_examples/examples/images/mr_3.tif diff --git a/manuals_and_examples/examples/java/AvgCell.java b/manuals_and_examples/examples/java/AvgCell.java new file mode 100644 index 0000000..787f2a4 --- /dev/null +++ b/manuals_and_examples/examples/java/AvgCell.java @@ -0,0 +1,145 @@ +/* +* This file is part of rasdaman community. +* +* Rasdaman community is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* Rasdaman community is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with rasdaman community. If not, see <http://www.gnu.org/licenses/>. +* +* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann / +rasdaman GmbH. +* +* For more information please see <http://www.rasdaman.org> +* or contact Peter Baumann via <baumann@rasdaman.com>. +*/ +/************************************************************* + * + * + * PURPOSE: Example Java program for computing the avg cell value + * for each n-D 8-bit grey image in a given collection. + * + * + ************************************************************/ + +import rasj.*; +import rasj.odmg.*; +import org.odmg.*; +import java.util.*; + +/** Example Java program for computing the avg cell value + * for each n-D 8-bit grey image in a given collection. + * + * set the server name with -server, the database name with -database, the collection name with -collection, + * the port number with -port, the user login with -user, the password with -passwd + */ +public class AvgCell +{ + public static void main(String[] args) + { + String server = "localhost"; + String base = "RASBASE"; + String coll = "mr"; + String port = "7001"; + String user = "rasguest"; + String passwd = "rasguest"; + + double sum; + + for (int i=args.length-1; i>=0; i--) + { + //System.out.println(args[i]); + if (args[i].equals("-server")) + server = args[i+1]; + if (args[i].equals("-database")) + base = args[i+1]; + if (args[i].equals("-collection")) + coll = args[i+1]; + if (args[i].equals("-port")) + port = args[i+1]; + if (args[i].equals("-user")) + user = args[i+1]; + if (args[i].equals("-passwd")) + passwd = args[i+1]; + } + //System.out.println(server+base+coll+port+user+passwd); + + DBag resultBag = null; + RasGMArray result = null; + Transaction myTa = null; + Database myDb = null; + OQLQuery myQu = null; + + try + { + Implementation myApp = new RasImplementation("http://"+server+":"+port); + ((RasImplementation)myApp).setUserIdentification(user, passwd); + myDb = myApp.newDatabase(); + + System.out.println("Opening database ..."); + myDb.open(base, Database.OPEN_READ_ONLY); + + System.out.println("Starting transaction ..."); + myTa = myApp.newTransaction(); + myTa.begin(); + + System.out.println("Retrieving MDDs ..."); + myQu = myApp.newOQLQuery(); + myQu.create("select img from " + coll + " as img"); + resultBag = (DBag)myQu.execute(); + if (resultBag != null) + { + Iterator iter = resultBag.iterator(); + while (iter.hasNext()) + { + result = (RasGMArray)iter.next(); + System.out.println(result); + if(result.getTypeLength() != 1) + System.out.println("skipping image because of non-int cell type"); + else + { + byte[] pixelfield = result.getArray(); + sum = 0.0; + long size = result.getArraySize(); + for(int i=0; i<size; i++) + sum += pixelfield[i]; + System.out.println("Avarage over " + size + " pixels is " + ((sum/size)+128)); + } + + } + System.out.println("All results"); + } + + System.out.println( "Committing transaction ..." ); + myTa.commit(); + + System.out.println( "Closing database ..." ); + myDb.close(); + + } + catch (org.odmg.ODMGException e) + { + System.out.println("An exception has occurred: " + e.getMessage()); + System.out.println("Try to abort the transaction ..."); + if(myTa != null) myTa.abort(); + + try + { + System.out.println("Try to close the database ..."); + if(myDb != null) myDb.close(); + } + catch ( org.odmg.ODMGException exp ) + { + System.err.println("Could not close the database: " + exp.getMessage()); + } + } + System.out.println( "Done." ); + } +} diff --git a/manuals_and_examples/examples/java/Lookup.java b/manuals_and_examples/examples/java/Lookup.java new file mode 100644 index 0000000..4b5eefc --- /dev/null +++ b/manuals_and_examples/examples/java/Lookup.java @@ -0,0 +1,130 @@ +/* +* This file is part of rasdaman community. +* +* Rasdaman community is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* Rasdaman community is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with rasdaman community. If not, see <http://www.gnu.org/licenses/>. +* +* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann / +rasdaman GmbH. +* +* For more information please see <http://www.rasdaman.org> +* or contact Peter Baumann via <baumann@rasdaman.com>. +*/ +/************************************************************* + * + * + * PURPOSE: Example Java program for looking up a collection + * + * + ************************************************************/ + +import rasj.*; +import rasj.odmg.*; +import org.odmg.*; +import java.util.*; + +/** + * Example Java program for looking up a collection + * + * set the server name with -server, the database name with -database, the collection name with -collection, + * the port number with -port, the user login with -user, the password with -passwd + */ +public class Lookup +{ + public static void main(String[] args) + { + String server = "localhost"; + String base = "RASBASE"; + String coll = "rockies"; + String port = "7001"; + String user = "rasguest"; + String passwd = "rasguest"; + + for (int i=args.length-1; i>=0; i--) + { + //System.out.println(args[i]); + if (args[i].equals("-server")) + server = args[i+1]; + if (args[i].equals("-database")) + base = args[i+1]; + if (args[i].equals("-collection")) + coll = args[i+1]; + if (args[i].equals("-port")) + port = args[i+1]; + if (args[i].equals("-user")) + user = args[i+1]; + if (args[i].equals("-passwd")) + passwd = args[i+1]; + } + //System.out.println(server+base+coll+port+user+passwd); + + DBag resultBag = null; + Object result = null; + Transaction myTa = null; + Database myDb = null; + OQLQuery myQu = null; + + try + { + Implementation myApp = new RasImplementation("http://"+server+":"+port); + ((RasImplementation)myApp).setUserIdentification(user, passwd); + myDb = myApp.newDatabase(); + + System.out.println("Opening database ..."); + myDb.open(base, Database.OPEN_READ_ONLY); + + System.out.println("Starting transaction ..."); + myTa = myApp.newTransaction(); + myTa.begin(); + + System.out.println("Retrieving results ..."); + myQu = myApp.newOQLQuery(); + myQu.create("select img from "+coll+" as img"); + resultBag = (DBag)myQu.execute(); + if (resultBag != null) + { + Iterator iter = resultBag.iterator(); + while (iter.hasNext()) + { + result = iter.next(); + System.out.println(result); + } + System.out.println("All results"); + } + + System.out.println( "Committing transaction ..." ); + myTa.commit(); + + System.out.println( "Closing database ..." ); + myDb.close(); + + } + catch (org.odmg.ODMGException e) + { + System.out.println("An exception has occurred: " + e.getMessage()); + System.out.println("Try to abort the transaction ..."); + if(myTa != null) myTa.abort(); + + try + { + System.out.println("Try to close the database ..."); + if(myDb != null) myDb.close(); + } + catch ( org.odmg.ODMGException exp ) + { + System.err.println("Could not close the database: " + exp.getMessage()); + } + } + System.out.println( "Done." ); + } +} diff --git a/manuals_and_examples/examples/java/Makefile b/manuals_and_examples/examples/java/Makefile new file mode 100644 index 0000000..c97eff2 --- /dev/null +++ b/manuals_and_examples/examples/java/Makefile @@ -0,0 +1,45 @@ +# -*-Makefile-*- +# +# This file is part of rasdaman community. +# +# Rasdaman community is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Rasdaman community is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with rasdaman community. If not, see <http://www.gnu.org/licenses/>. +# +# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann / +# rasdaman GmbH. +# +# For more information please see <http://www.rasdaman.org> +# or contact Peter Baumann via <baumann@rasdaman.com>. # Top Level makefile. This points to the various modules that have to be build +# and/or deployed +# +# MAKEFILE FOR: +# Compile example Java programs; +# +################################################################## + +######################## Dependencies ############################ + +all: AvgCell.class Lookup.class Query.class +clean: + rm *.class + +AvgCell.class: AvgCell.java + javac $< + +Lookup.class: Lookup.java + javac $< + +Query.class: Query.java + javac $< + +# end of Makefile diff --git a/manuals_and_examples/examples/java/Query.java b/manuals_and_examples/examples/java/Query.java new file mode 100644 index 0000000..9fd3d9c --- /dev/null +++ b/manuals_and_examples/examples/java/Query.java @@ -0,0 +1,225 @@ +/* +* This file is part of rasdaman community. +* +* Rasdaman community is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* Rasdaman community is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with rasdaman community. If not, see <http://www.gnu.org/licenses/>. +* +* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann / +rasdaman GmbH. +* +* For more information please see <http://www.rasdaman.org> +* or contact Peter Baumann via <baumann@rasdaman.com>. +*/ +/************************************************************* + * + * + * PURPOSE: Example Java program for reading a query out of a file + * and send it to the server and write the result into a log file + * + * + ************************************************************/ + +import rasj.*; +import rasj.odmg.*; +import org.odmg.*; +import java.util.*; +import java.io.*; + +/** + * Example Java program for reading a query out of a file + * and send it to the server and write the result into a log file + * + * set the server name with -server, the database name with -database, the collection name with -collection, + * set port number with -port, the user login with -user, the password with -passwd, + * the path to log file with -logfile, path to query file with -queryfile + */ +public class Query +{ + + public static void main( String[] args ) + { + String server = "localhost"; + String port = "7001"; + String base = "RASBASE"; + String coll = "rockies"; + String user = "rasguest"; + String passwd = "rasguest"; + String file = ""; + String query = ""; + String log = ""; + String ret = ""; + + for (int i=args.length-1; i>=0; i--) + { + //System.out.println(args[i]); + if (args[i].equals("-server")) + server = args[i+1]; + if (args[i].equals("-port")) + port = args[i+1]; + if (args[i].equals("-database")) + base = args[i+1]; + if (args[i].equals("-collection")) + coll = args[i+1]; + if (args[i].equals("-logfile")) + log = args[i+1]; + if (args[i].equals("-user")) + user = args[i+1]; + if (args[i].equals("-passwd")) + passwd = args[i+1]; + if (args[i].equals("-queryfile")) + { + try + { + file = args[i+1]; + //System.out.println(file); + FileReader fr = new FileReader(file); + BufferedReader in = new BufferedReader(fr); + String s; + + while((s = in.readLine()) != null) + { + String t = s.trim(); + while(t.regionMatches(0, "--", 0, 2)) + { + s = in.readLine(); + t = s.trim(); + } + query = query +" "+ s; + } + + } + catch(FileNotFoundException e) + { + ret = ret+" Query-file not found!"+e.getMessage(); + System.err.println(ret); + } + catch(IOException e) + { + ret = ret+" Could not read Query-file!"+e.getMessage(); + System.err.println(ret); + } + + } + + } + + + Transaction myTa = null; + Database myDb = null; + int accessMode = Database.OPEN_READ_ONLY; + + try + { + Implementation myApp = new RasImplementation("http://"+server+":"+port); + ((RasImplementation)myApp).setUserIdentification(user, passwd); + OQLQuery myQu = myApp.newOQLQuery(); + + if(query.equals("")) + query="select avg_cells(a) from "+ coll+" as a"; + //query="create collection UpdateULong1 ULongSet"; + //query="insert into UpdateULong1 values $1"; + + myQu.create(query); + + StringTokenizer strTok = new StringTokenizer(query, "$"); + RasMInterval domain; + RasGMArray mddConst; + if(strTok.hasMoreTokens()) + strTok.nextToken(); + + while(strTok.hasMoreTokens()) + { + strTok.nextToken(); + domain = new RasMInterval("[0:10,0:10]"); + RasStorageLayout stl = new RasStorageLayout(); + stl.setTileSize(100); + mddConst = new RasGMArray(domain, 4, stl); + mddConst.setObjectTypeName("ULongImage"); + //System.out.println(mddConst); + myQu.bind(mddConst); + } + + //check if is an update Query + if((query.indexOf("select") == -1) && + (query.indexOf("SELECT") == -1)) + accessMode = Database.OPEN_READ_WRITE; + + myDb = myApp.newDatabase(); + //System.out.println( "Opening database ..." ); + myDb.open( base, accessMode ); + + //System.out.println( "Starting transaction ..." ); + myTa = myApp.newTransaction(); + myTa.begin(); + + //System.out.println( "Executing query..." ); + DBag result = (DBag) myQu.execute(); + + //System.out.println( "Committing transaction ..." ); + myTa.commit(); + + //System.out.println( "Closing database ..." ); + myDb.close(); + + //System.out.println( " Done." ); + } + catch(RasException e) + { + ret = ret+"RasException: "+e.getMessage(); + System.err.println(ret); + } + catch (org.odmg.ODMGException e) + { + ret = ret + query + "\n Failed:\n " + e.getMessage() + "\n"; + System.err.println(ret); + //System.err.println("Try to abort the transaction ..."); + if(myTa != null) myTa.abort(); + + try + { + //System.err.println("Try to close the database ..."); + if(myDb != null) myDb.close(); + } + catch ( org.odmg.ODMGException exp ) + { + ret = ret+" Could not close the database: " + exp.getMessage(); + System.err.println(ret); + } + + } + if(!log.equals("")) + { + try + { + FileOutputStream fos = new FileOutputStream(log, true); + PrintWriter pw = new PrintWriter(fos); + if(ret.equals("")) + ret = "OK."; + pw.write(ret); + pw.close(); + } + catch(FileNotFoundException e) + { + ret = ret+" Log-file not found!"+e.getMessage(); + System.out.println(ret); + } + catch(IOException e) + { + ret = ret+" Could not write Log-file!"+e.getMessage(); + System.out.println(ret); + } + } + + } + +} diff --git a/manuals_and_examples/examples/queries/boolean-masking.ql b/manuals_and_examples/examples/queries/boolean-masking.ql new file mode 100644 index 0000000..d5b7282 --- /dev/null +++ b/manuals_and_examples/examples/queries/boolean-masking.ql @@ -0,0 +1,5 @@ +-- rview-Query
+select rgb.green > 130c
+ and rgb.red < 150c
+ and rgb.blue < 140c
+from rgb
diff --git a/manuals_and_examples/examples/queries/sdom.ql b/manuals_and_examples/examples/queries/sdom.ql new file mode 100644 index 0000000..aa39b24 --- /dev/null +++ b/manuals_and_examples/examples/queries/sdom.ql @@ -0,0 +1,3 @@ +-- rview-Query
+select sdom( mr )[1].hi
+from mr
diff --git a/manuals_and_examples/examples/queries/trim-sdom.ql b/manuals_and_examples/examples/queries/trim-sdom.ql new file mode 100644 index 0000000..d881db2 --- /dev/null +++ b/manuals_and_examples/examples/queries/trim-sdom.ql @@ -0,0 +1,4 @@ +-- rview-Query
+select rgb[ sdom(rgb)[0].hi - 99 : sdom(rgb)[0].hi,
+ sdom(rgb)[1].hi - 99 : sdom(rgb)[1].hi ]
+from rgb
diff --git a/manuals_and_examples/examples/queries/trim.ql b/manuals_and_examples/examples/queries/trim.ql new file mode 100644 index 0000000..16079ec --- /dev/null +++ b/manuals_and_examples/examples/queries/trim.ql @@ -0,0 +1,3 @@ +-- rview-Query
+select rgb[ 0:99, 0:99 ]
+from rgb
diff --git a/manuals_and_examples/examples/queries/where.ql b/manuals_and_examples/examples/queries/where.ql new file mode 100644 index 0000000..9e4eb14 --- /dev/null +++ b/manuals_and_examples/examples/queries/where.ql @@ -0,0 +1,4 @@ +-- rview-Query
+select mr
+from mr
+where some_cells( mr[ 120:160, 55:75 ] > 110 )
diff --git a/manuals_and_examples/examples/rasdl/basictypes.dl b/manuals_and_examples/examples/rasdl/basictypes.dl new file mode 100644 index 0000000..60c9123 --- /dev/null +++ b/manuals_and_examples/examples/rasdl/basictypes.dl @@ -0,0 +1,157 @@ +/* +* This file is part of rasdaman community. +* +* Rasdaman community is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* Rasdaman community is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with rasdaman community. If not, see <http://www.gnu.org/licenses/>. +* +* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann / +rasdaman GmbH. +* +* For more information please see <http://www.rasdaman.org> +* or contact Peter Baumann via <baumann@rasdaman.com>. +*/ +// --------------------------------------------------------------------- +// +// +// PURPOSE: +// This file contains type definitions to challenge the rasdl utilit. +// Rasdl needs to read them and react appropriately. Reports are done +// to stdout. +// +// +// COMMENTS: +// ./. +// +// +// --------------------------------------------------------------------- + + +// --- good defs ------------------------------------------------------- +// --- bad defs -------------------------------------------------------- + + + +// example 1 +typedef marray <char,2> GreyImage; +typedef set<GreyImage> GreySet; + +// example 2 +typedef marray <boolean,2> BoolImage; +typedef set<BoolImage> BoolSet; + +// example 3 +struct RGBPixel { char red, green, blue; }; +typedef marray <RGBPixel,2> RGBImage; +typedef set<RGBImage> RGBSet; + +// example 4 +typedef marray <unsigned long, 2> ULongImage; +typedef set<ULongImage> ULongSet; + +// example 5 +typedef marray <char, 3> GreyCube; +typedef set<GreyCube> GreySet3; + + +// heavily expanded types (Andreas) +typedef marray <boolean, 1> BoolString; +typedef set<BoolString> BoolSet1; + +typedef marray <boolean, 3> BoolCube; +typedef set<BoolCube> BoolSet3; + +typedef marray <char, 1> GreyString; +typedef set<GreyString> GreySet1; + +typedef marray <octet, 1> OctetString; +typedef set<OctetString> OctetSet1; + +typedef marray <octet, 2> OctetImage; +typedef set<OctetImage> OctetSet; + +typedef marray <octet, 3> OctetCube; +typedef set<OctetCube> OctetSet3; + +typedef marray <short, 1> ShortString; +typedef set<ShortString> ShortSet1; + +typedef marray <short, 2> ShortImage; +typedef set<ShortImage> ShortSet; + +typedef marray <short, 3> ShortCube; +typedef set<ShortCube> ShortSet3; + +typedef marray <unsigned short, 1> UShortString; +typedef set<UShortString> UShortSet1; + +typedef marray <unsigned short, 2> UShortImage; +typedef set<UShortImage> UShortSet; + +typedef marray <unsigned short, 3> UShortCube; +typedef set<UShortCube> UShortSet3; + +typedef marray <long, 1> LongString; +typedef set<LongString> LongSet1; + +typedef marray <long, 2> LongImage; +typedef set<LongImage> LongSet; + +typedef marray <long, 3> LongCube; +typedef set<LongCube> LongSet3; + +typedef marray <unsigned long, 1> ULongString; +typedef set<ULongString> ULongSet1; + +typedef marray <unsigned long, 3> ULongCube; +typedef set<ULongCube> ULongSet3; + +typedef marray <RGBPixel, 1> RGBString; +typedef set<RGBString> RGBSet1; + +typedef marray <RGBPixel, 3> RGBCube; +typedef set<RGBCube> RGBSet3; + +typedef marray <float, 1> FloatString; +typedef set<FloatString> FloatSet1; + +typedef marray <float, 2> FloatImage; +typedef set<FloatImage> FloatSet; + +typedef marray <float, 3> FloatCube; +typedef set<FloatCube> FloatSet3; + +typedef marray <float, 4> FloatCube4; +typedef set<FloatCube4> FloatSet4; + +typedef marray <double, 1> DoubleString; +typedef set<DoubleString> DoubleSet1; + +typedef marray <double, 2> DoubleImage; +typedef set<DoubleImage> DoubleSet; + +typedef marray <double, 3> DoubleCube; +typedef set<DoubleCube> DoubleSet3; + +typedef marray <complex, 1> Gauss1; +typedef set<Gauss1> GaussSet1; + +typedef marray<complexd, 1> Gauss2; +typedef set<Gauss2> GaussSet2; + +typedef marray <complex, 2> Gauss1Image; +typedef set<Gauss1Image> Gauss1Set; + +typedef marray<complexd, 2> Gauss2Image; +typedef set<Gauss2Image> Gauss2Set; + +// --- end ----------------------------------------------------------- |