diff --git a/src/common/config.cpp b/src/common/config.cpp index e7db5946..d189e056 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -4,25 +4,27 @@ #include #endif -/******************************************************************************************************************************* - * Interfaces, types, parameters and constants * - *******************************************************************************************************************************/ -namespace terastitcher -{ - /******************* - * PARAMETERS * - ******************** - ---------------------------------------------------------------------------------------------------------------------------*/ - std::string version = num2str(TERASTITCHER_MAJOR) + "." + num2str(TERASTITCHER_MINOR) + "." + num2str(TERASTITCHER_PATCH); - std::string teraconverter_version = num2str(TERACONVERTER_MAJOR) + "." + num2str(TERACONVERTER_MINOR) + "." + num2str(TERACONVERTER_PATCH); - std::string terastitcher2_version = num2str(TERASTITCHER2_MAJOR) + "." + num2str(TERASTITCHER2_MINOR) + "." + num2str(TERASTITCHER2_PATCH); - std::string mdatagenerator_version = "1.0.0"; - std::string mergedisplacement_version = "1.0.0"; - int DEBUG = NO_DEBUG; //debug level -#ifdef WITH_QT - std::string qtversion = QT_VERSION_STR; -#else - std::string qtversion = ""; -#endif - /*-------------------------------------------------------------------------------------------------------------------------*/ -} \ No newline at end of file +/******************************************************************************************************************************* + * Interfaces, types, parameters and constants * + *******************************************************************************************************************************/ +namespace terastitcher +{ + /******************* + * PARAMETERS * + ******************** + ---------------------------------------------------------------------------------------------------------------------------*/ + std::string version = num2str(TERASTITCHER_MAJOR) + "." + num2str(TERASTITCHER_MINOR) + "." + num2str(TERASTITCHER_PATCH); + std::string teraconverter_version = num2str(TERACONVERTER_MAJOR) + "." + num2str(TERACONVERTER_MINOR) + "." + num2str(TERACONVERTER_PATCH); + std::string terastitcher2_version = num2str(TERASTITCHER2_MAJOR) + "." + num2str(TERASTITCHER2_MINOR) + "." + num2str(TERASTITCHER2_PATCH); + std::string mdatagenerator_version = "1.0.0"; + std::string mergedisplacement_version = "1.0.0"; + int DEBUG = NO_DEBUG; //debug level +#ifdef WITH_QT + std::string qtversion = QT_VERSION_STR; +#else + std::string qtversion = ""; +#endif + /*-------------------------------------------------------------------------------------------------------------------------*/ +} + + diff --git a/src/crossmips/CrossMIPs.h b/src/crossmips/CrossMIPs.h index a335ed95..ae841061 100644 --- a/src/crossmips/CrossMIPs.h +++ b/src/crossmips/CrossMIPs.h @@ -88,7 +88,7 @@ typedef struct { /***************************************** MAIN FUNCTION ***********************************************/ NCC_descr_t *norm_cross_corr_mips ( iom::real_t *A, iom::real_t *B, int dimk, int dimi, int dimj, int nk, int ni, int nj, - int delayk, int delayi, int delayj, int side, NCC_parms_t *NCC_params = 0 ) throw (iom::exception); //Alessandro - 23/03/2013 - exceptions are thrown if preconditions do not hold + int delayk, int delayi, int delayj, int side, NCC_parms_t *NCC_params = 0 ) ; //Alessandro - 23/03/2013 - exceptions are thrown if preconditions do not hold /* * returns an alignment between volume A and B; the two volumes are assumed to have the same dimensions * INPUT PARAMETERS: diff --git a/src/crossmips/compute_funcs.cu b/src/crossmips/compute_funcs.cu index 575989ea..b009bb53 100755 --- a/src/crossmips/compute_funcs.cu +++ b/src/crossmips/compute_funcs.cu @@ -1322,7 +1322,7 @@ int compute_MAX_ind ( iom::real_t *vect, int len ) { * failed : INPUT/OUTPUT : initialized to false, it is changed to true if the maximum is not centered in NCCnew */ void compute_Neighborhood ( NCC_parms_t *NCC_params, iom::real_t *NCC, int delayu, int delayv, int newu, int newv, int ind_max, - iom::real_t *MIP_1, iom::real_t *MIP_2, int dimu, int dimv, iom::real_t *NCCnew, int &du, int &dv, bool &failed) throw (iom::exception){ + iom::real_t *MIP_1, iom::real_t *MIP_2, int dimu, int dimv, iom::real_t *NCCnew, int &du, int &dv, bool &failed) { // --- CRISTIAN MOD START --- (to optimize NCC computation) int ph = dimu / TILE_SIDE; diff --git a/src/crossmips/compute_funcs.h b/src/crossmips/compute_funcs.h index 10454ea3..5efb92c4 100644 --- a/src/crossmips/compute_funcs.h +++ b/src/crossmips/compute_funcs.h @@ -119,7 +119,7 @@ iom::real_t compute_NCC ( iom::real_t *MIP_1, iom::real_t *MIP_2, int dimu, int int compute_MAX_ind ( iom::real_t *vect, int len ); void compute_Neighborhood ( NCC_parms_t *NCC_params, iom::real_t *NCC, int delayu, int delayv, int newu, int newv, int ind, - iom::real_t *MIP_1, iom::real_t *MIP_2, int dimu, int dimv, iom::real_t *NCCnew, int &du, int &dv, bool &failed) throw (iom::exception); + iom::real_t *MIP_1, iom::real_t *MIP_2, int dimu, int dimv, iom::real_t *NCCnew, int &du, int &dv, bool &failed) ; /* Returns an NCC map of of size (2*newu+1) x (2*newv+1) centered around the NCC maximum or returns filed = true * if this map cannot be found (it is: newu = newv = NCC_params->wRangeThr) diff --git a/src/crossmips/libcrossmips.cpp b/src/crossmips/libcrossmips.cpp index f8f8b87d..56e30210 100644 --- a/src/crossmips/libcrossmips.cpp +++ b/src/crossmips/libcrossmips.cpp @@ -100,7 +100,7 @@ bool write_3D_stack ( char *fname, iom::real_t *stck, int dimi, int dimj, int di NCC_descr_t *norm_cross_corr_mips ( iom::real_t *A, iom::real_t *B, int dimk, int dimi, int dimj, int nk, int ni, int nj, - int delayk, int delayi, int delayj, int side, NCC_parms_t *NCC_params ) throw (iom::exception){ + int delayk, int delayi, int delayj, int side, NCC_parms_t *NCC_params ) { #if CM_VERBOSE > 1 printf("\nin libcrossmips::norm_cross_corr_mips(A[%.6f-%.6f], B[%.6f-%.6f], dimk[%d], dimi[%d], dimj[%d], nk[%d], ni[%d], nj[%d], delayk[%d], delayi[%d], delayj[%d], side[%d]\n", A[0], A[(dimk-1)*dimj*dimi + (dimi-1)*dimj + dimj -1], B[0], B[(dimk-1)*dimj*dimi + (dimi-1)*dimj + dimj -1], dimk, dimi, dimj, nk, ni, nj, delayk, delayi, delayj, side ); diff --git a/src/imagemanager/BDVVolume.cpp b/src/imagemanager/BDVVolume.cpp index 06790838..8dbd1ad1 100644 --- a/src/imagemanager/BDVVolume.cpp +++ b/src/imagemanager/BDVVolume.cpp @@ -68,7 +68,7 @@ BDVVolume::BDVVolume(void) : VirtualVolume() } -BDVVolume::BDVVolume(const char* _root_dir, int res, int tp, void *_BDV_descr ) throw (IOException) +BDVVolume::BDVVolume(const char* _root_dir, int res, int tp, void *_BDV_descr ) : VirtualVolume() // _root_dir can be NULL { if ( _root_dir ) { @@ -102,7 +102,7 @@ BDVVolume::BDVVolume(const char* _root_dir, int res, int tp, void *_BDV_descr ) active[c] = c; // all channels are assumed active } -BDVVolume::~BDVVolume(void) throw (iim::IOException) +BDVVolume::~BDVVolume(void) { if ( BDV_descr ) BDV_HDF5close(BDV_descr); @@ -132,7 +132,7 @@ BDVVolume::~BDVVolume(void) throw (iim::IOException) //loads given subvolume in a 1-D array of float -real32* BDVVolume::loadSubvolume(int V0,int V1, int H0, int H1, int D0, int D1, list *involved_blocks, bool release_blocks) throw (IOException) +real32* BDVVolume::loadSubvolume(int V0,int V1, int H0, int H1, int D0, int D1, list *involved_blocks, bool release_blocks) { /**/iim::debug(iim::LEV3, strprintf("V0=%d, V1=%d, H0=%d, H1=%d, D0=%d, D1=%d, %s", V0, V1, H0, H1, D0, D1, (involved_blocks? ", involved_stacks" : "")).c_str(), __iim__current__function__); @@ -166,7 +166,7 @@ real32* BDVVolume::loadSubvolume(int V0,int V1, int H0, int H1, int D0, int D1, //loads given subvolume in a 1-D array of uint8 while releasing stacks slices memory when they are no longer needed //---03 nov 2011: added color support -uint8* BDVVolume::loadSubvolume_to_UINT8(int V0,int V1, int H0, int H1, int D0, int D1, int *channels, int ret_type) throw (IOException, iom::exception) +uint8* BDVVolume::loadSubvolume_to_UINT8(int V0,int V1, int H0, int H1, int D0, int D1, int *channels, int ret_type) { /**/iim::debug(iim::LEV3, strprintf("V0=%d, V1=%d, H0=%d, H1=%d, D0=%d, D1=%d, *channels=%d, ret_type=%d", V0, V1, H0, H1, D0, D1, channels ? *channels : -1, ret_type).c_str(), __iim__current__function__); diff --git a/src/imagemanager/BDVVolume.h b/src/imagemanager/BDVVolume.h index a1e8515b..95e62158 100644 --- a/src/imagemanager/BDVVolume.h +++ b/src/imagemanager/BDVVolume.h @@ -48,7 +48,7 @@ class BDVVolume : public iim::VirtualVolume BDVVolume(void); //Given the reference system, initializes all object's members using stack's directories hierarchy - //void init() throw (iim::IOException); + //void init() ; //rotate stacks matrix around D axis (accepted values are theta=0,90,180,270) //void rotate(int theta); @@ -57,13 +57,13 @@ class BDVVolume : public iim::VirtualVolume //void mirror(iim::axis mrr_axis); // iannello returns the number of channels of images composing the volume - void initChannels ( ) throw (iim::IOException) { } + void initChannels ( ) { } public: //CONSTRUCTORS-DECONSTRUCTOR - BDVVolume(const char* _root_dir, int res = 0, int tp = 0, void *BDV_descr = 0 ) throw (iim::IOException); + BDVVolume(const char* _root_dir, int res = 0, int tp = 0, void *BDV_descr = 0 ) ; - virtual ~BDVVolume(void) throw (iim::IOException); + virtual ~BDVVolume(void) ; //GET methods float getVXL_1(){return VXL_1;} @@ -87,17 +87,17 @@ class BDVVolume : public iim::VirtualVolume //void print( bool print_stacks = false ); //loads given subvolume in a 1-D array of iim::real32 while releasing stacks slices memory when they are no longer needed - inline iim::real32 *loadSubvolume_to_real32(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1) throw (iim::IOException) { + inline iim::real32 *loadSubvolume_to_real32(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1) { return loadSubvolume(V0,V1,H0,H1,D0,D1,0,true); } //loads given subvolume in a 1-D array and puts used Stacks into 'involved_stacks' iff not null iim::real32 *loadSubvolume(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1, - std::list *involved_blocks = 0, bool release_blocks = false) throw (iim::IOException); + std::list *involved_blocks = 0, bool release_blocks = false) ; //loads given subvolume in a 1-D array of iim::uint8 while releasing stacks slices memory when they are no longer needed iim::uint8 *loadSubvolume_to_UINT8(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1, - int *channels=0, int ret_type=iim::DEF_IMG_DEPTH) throw (iim::IOException, iom::exception); + int *channels=0, int ret_type=iim::DEF_IMG_DEPTH) ; // needed to enable the detection by the factory of volume format through use of the default constructor friend class iim::VirtualVolume; diff --git a/src/imagemanager/ComposedVolume.cpp b/src/imagemanager/ComposedVolume.cpp index e63387a9..0a827c8e 100755 --- a/src/imagemanager/ComposedVolume.cpp +++ b/src/imagemanager/ComposedVolume.cpp @@ -58,26 +58,26 @@ ComposedVolume::ComposedVolume(void) : VirtualVolume() } -ComposedVolume::~ComposedVolume(void) throw (iim::IOException) +ComposedVolume::~ComposedVolume(void) { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); } -void ComposedVolume::init() throw (IOException) +void ComposedVolume::init() { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); } -iim::real32 *ComposedVolume::loadSubvolume_to_real32(int V0,int V1, int H0, int H1, int D0, int D1) throw (iim::IOException) { +iim::real32 *ComposedVolume::loadSubvolume_to_real32(int V0,int V1, int H0, int H1, int D0, int D1) { throw iom::exception(iom::strprintf("not implemented yet"), __iom__current__function__); } iim::uint8 *ComposedVolume::loadSubvolume_to_UINT8(int V0,int V1, int H0, int H1, int D0, int D1, - int *channels, int ret_type) throw (iim::IOException, iom::exception) { + int *channels, int ret_type) { if ( (ret_type != iim::NATIVE_RTYPE) && (ret_type != iim::DEF_IMG_DEPTH) ) { // return type should be converted, but not to 8 bits per channel @@ -94,7 +94,7 @@ iim::uint8 *ComposedVolume::loadSubvolume_to_UINT8(int V0,int V1, int H0, int H1 // return 'volume_format' attribute of node from the given xml. -std::string ComposedVolume::getVolumeFormat(const std::string& xml_path) throw (iom::exception) +std::string ComposedVolume::getVolumeFormat(const std::string& xml_path) { // open xml TiXmlDocument xml; diff --git a/src/imagemanager/ComposedVolume.h b/src/imagemanager/ComposedVolume.h index 9d643970..64ff51fd 100755 --- a/src/imagemanager/ComposedVolume.h +++ b/src/imagemanager/ComposedVolume.h @@ -45,7 +45,7 @@ class iim::ComposedVolume : public iim::VirtualVolume //***OBJECT PRIVATE METHODS**** //Given the reference system, initializes all object's members using stack's directories hierarchy - void init() throw (iim::IOException); + void init() ; //rotate stacks matrix around D axis (accepted values are theta=0,90,180,270) void rotate(int theta); @@ -68,7 +68,7 @@ class iim::ComposedVolume : public iim::VirtualVolume // objects passed to constructors will not be deallocated by the destructor ComposedVolume(void); - virtual ~ComposedVolume(void) throw (iim::IOException); + virtual ~ComposedVolume(void) ; //GET methods float getVXL_1(){return VXL_1;} @@ -80,13 +80,13 @@ class iim::ComposedVolume : public iim::VirtualVolume iim::ref_sys getREF_SYS(){return reference_system;} // return 'volume_format' attribute of node from the given xml. - static std::string getVolumeFormat(const std::string& xml_path) throw (iom::exception); + static std::string getVolumeFormat(const std::string& xml_path) ; - iim::real32 *loadSubvolume_to_real32(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1) throw (iim::IOException); + iim::real32 *loadSubvolume_to_real32(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1) ; //loads given subvolume in a 1-D array of iim::uint8 while releasing stacks slices memory when they are no longer needed iim::uint8 *loadSubvolume_to_UINT8(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1, - int *channels=0, int ret_type=iim::DEF_IMG_DEPTH) throw (iim::IOException, iom::exception); + int *channels=0, int ret_type=iim::DEF_IMG_DEPTH) ; //loads given subvolume in a 1-D array of iim::uint8 and copy it into 'buffer' starting from offsets virtual iim::uint8 *loadSubvolume( @@ -94,7 +94,7 @@ class iim::ComposedVolume : public iim::VirtualVolume iim::uint8 *buffer=0, int bufSize_V=0, int bufSize_H=0, int bufSize_D=0, int bufSize_C=0, int bufOffs_V=0, int bufOffs_H=0, int bufOffs_D=0, int bufOffs_C=0 /*ret_type=iim::DEF_IMG_DEPTH*/ - ) throw (iim::IOException, iom::exception) = 0; + ) = 0; // return true if the given dimension is tiled virtual bool isTiled(iim::dimension d) {return false;} diff --git a/src/imagemanager/HDF5Mngr.cpp b/src/imagemanager/HDF5Mngr.cpp index 896fd00b..bef6c3c1 100644 --- a/src/imagemanager/HDF5Mngr.cpp +++ b/src/imagemanager/HDF5Mngr.cpp @@ -802,7 +802,7 @@ void readSubvol ( int V0, int V1, int H0, int H1, int D0, int D1, int setup, uns * HDF5 Manager implementation ****************************************************************************/ -void BDV_HDF5init ( std::string fname, void *&descr, int vxl_nbytes ) throw (iim::IOException) { +void BDV_HDF5init ( std::string fname, void *&descr, int vxl_nbytes ) { #ifdef ENABLE_BDV_HDF5 BDV_HDF5_fdescr_t *int_descr = new BDV_HDF5_fdescr_t(fname.c_str(),vxl_nbytes); descr = int_descr; diff --git a/src/imagemanager/HDF5Mngr.h b/src/imagemanager/HDF5Mngr.h index 8556daf3..3a0da263 100755 --- a/src/imagemanager/HDF5Mngr.h +++ b/src/imagemanager/HDF5Mngr.h @@ -52,7 +52,7 @@ */ -void BDV_HDF5init ( std::string fname, void *&descr, int vxl_nbytes = 1 ) throw (iim::IOException); +void BDV_HDF5init ( std::string fname, void *&descr, int vxl_nbytes = 1 ) ; /* opens or creates an HDF5 file fname according to the BigDataViewer format and returns an opaque descriptor * * fname: HDF5 filename diff --git a/src/imagemanager/IMS_HDF5Mngr.cpp b/src/imagemanager/IMS_HDF5Mngr.cpp index 382455c8..dfb926c0 100644 --- a/src/imagemanager/IMS_HDF5Mngr.cpp +++ b/src/imagemanager/IMS_HDF5Mngr.cpp @@ -2092,7 +2092,7 @@ herr_t IMS_HDF5_fdescr_t::addFinalInfo ( ) { * HDF5 Manager implementation ****************************************************************************/ -void IMS_HDF5init ( std::string fname, void *&descr, bool loadstruct, int vxl_nbytes, void *obj_info, void *root_attr_info ) throw (iim::IOException) { +void IMS_HDF5init ( std::string fname, void *&descr, bool loadstruct, int vxl_nbytes, void *obj_info, void *root_attr_info ) { #ifdef ENABLE_IMS_HDF5 IMS_HDF5_fdescr_t *int_descr = new IMS_HDF5_fdescr_t(fname.c_str(),loadstruct,vxl_nbytes,(IMS_obj_list_t *)obj_info,(IMS_attr_list_t *)root_attr_info); descr = int_descr; @@ -2103,7 +2103,7 @@ void IMS_HDF5init ( std::string fname, void *&descr, bool loadstruct, int vxl_nb #endif } -void *IMS_HDF5get_olist ( void *descr, std::string fname, int height, int width, int z_points, int n_chans, int n_timepoints, float abs_V, float abs_H ) throw (iim::IOException) { +void *IMS_HDF5get_olist ( void *descr, std::string fname, int height, int width, int z_points, int n_chans, int n_timepoints, float abs_V, float abs_H ) { #ifdef ENABLE_IMS_HDF5 if ( descr ) return ((IMS_HDF5_fdescr_t *) descr)->extractOLIST(); @@ -2116,7 +2116,7 @@ void *IMS_HDF5get_olist ( void *descr, std::string fname, int height, int width, #endif } -void *IMS_HDF5adjust_olist ( void *olist, std::string fname, int height, int width, int z_points, iim::uint32 *chans, int n_chans, float abs_V, float abs_H ) throw (iim::IOException) { +void *IMS_HDF5adjust_olist ( void *olist, std::string fname, int height, int width, int z_points, iim::uint32 *chans, int n_chans, float abs_V, float abs_H ) { #ifdef ENABLE_IMS_HDF5 return ((void *) adjust_obj_list((IMS_obj_list_t *)olist,fname,height,width,z_points,chans,n_chans,abs_V,abs_H)); #else @@ -2126,7 +2126,7 @@ void *IMS_HDF5adjust_olist ( void *olist, std::string fname, int height, int wid #endif } -void *IMS_HDF5get_rootalist ( void *descr ) throw (iim::IOException) { +void *IMS_HDF5get_rootalist ( void *descr ) { #ifdef ENABLE_IMS_HDF5 if ( descr ) return ((IMS_HDF5_fdescr_t *) descr)->extractROOTALIST(); @@ -2139,7 +2139,7 @@ void *IMS_HDF5get_rootalist ( void *descr ) throw (iim::IOException) { #endif } -int IMS_HDF5n_resolutions ( void *descr ) throw (iim::IOException) { +int IMS_HDF5n_resolutions ( void *descr ) { #ifdef ENABLE_IMS_HDF5 return ((IMS_HDF5_fdescr_t *) descr)->getN_RES(); #else @@ -2150,7 +2150,7 @@ int IMS_HDF5n_resolutions ( void *descr ) throw (iim::IOException) { } -void IMS_HDF5set_histogram ( void *descr, histogram_t *buf, int r, int ch, int tp ) throw (iim::IOException) { +void IMS_HDF5set_histogram ( void *descr, histogram_t *buf, int r, int ch, int tp ) { #ifdef ENABLE_IMS_HDF5 ((IMS_HDF5_fdescr_t *) descr)->setHistogram(buf,r,ch,tp); #else @@ -2161,7 +2161,7 @@ void IMS_HDF5set_histogram ( void *descr, histogram_t *buf, int r, int ch, int t } -void IMS_HDF5set_thumbnail ( void *descr, iim::uint8 *buf, iim::uint32 thumbnail_sz ) throw (iim::IOException) { +void IMS_HDF5set_thumbnail ( void *descr, iim::uint8 *buf, iim::uint32 thumbnail_sz ) { #ifdef ENABLE_IMS_HDF5 ((IMS_HDF5_fdescr_t *) descr)->setThumbnail(buf,thumbnail_sz); #else @@ -2173,7 +2173,7 @@ void IMS_HDF5set_thumbnail ( void *descr, iim::uint8 *buf, iim::uint32 thumbnail -void IMS_HDF5close ( void *descr ) throw (iim::IOException) { +void IMS_HDF5close ( void *descr ) { #ifdef ENABLE_IMS_HDF5 ((IMS_HDF5_fdescr_t *) descr)->addFinalInfo(); delete (IMS_HDF5_fdescr_t *) descr; @@ -2185,7 +2185,7 @@ void IMS_HDF5close ( void *descr ) throw (iim::IOException) { } -void IMS_HDF5setVxlSize ( void *descr, double szV, double szH, double szD ) throw (iim::IOException) { +void IMS_HDF5setVxlSize ( void *descr, double szV, double szH, double szD ) { #ifdef ENABLE_IMS_HDF5 IMS_HDF5_fdescr_t *int_descr = (IMS_HDF5_fdescr_t *) descr; @@ -2198,7 +2198,7 @@ void IMS_HDF5setVxlSize ( void *descr, double szV, double szH, double szD ) thro } -void IMS_HDF5getVxlSize ( void *descr, double &szV, double &szH, double &szD ) throw (iim::IOException) { +void IMS_HDF5getVxlSize ( void *descr, double &szV, double &szH, double &szD ) { #ifdef ENABLE_IMS_HDF5 IMS_HDF5_fdescr_t *int_descr = (IMS_HDF5_fdescr_t *) descr; @@ -2213,7 +2213,7 @@ void IMS_HDF5getVxlSize ( void *descr, double &szV, double &szH, double &szD ) t } -void IMS_HDF5addResolution ( void *file_descr, iim::sint64 height, iim::sint64 width, iim::sint64 depth, int nchans, int r, bool is_first ) throw (iim::IOException) { +void IMS_HDF5addResolution ( void *file_descr, iim::sint64 height, iim::sint64 width, iim::sint64 depth, int nchans, int r, bool is_first ) { #ifdef ENABLE_IMS_HDF5 IMS_HDF5_fdescr_t *int_descr = (IMS_HDF5_fdescr_t *) file_descr; @@ -2228,7 +2228,7 @@ void IMS_HDF5addResolution ( void *file_descr, iim::sint64 height, iim::sint64 w void IMS_HDF5addChans ( void *file_descr, iim::sint64 height, iim::sint64 width, iim::sint64 depth, - float vxlszV, float vxlszH, float vxlszD, bool *res, int res_size, int chans, int block_height, int block_width, int block_depth ) throw (iim::IOException) { + float vxlszV, float vxlszH, float vxlszD, bool *res, int res_size, int chans, int block_height, int block_width, int block_depth ) { #ifdef ENABLE_IMS_HDF5 IMS_HDF5_fdescr_t *int_descr = (IMS_HDF5_fdescr_t *) file_descr; @@ -2254,7 +2254,7 @@ void IMS_HDF5addChans ( void *file_descr, iim::sint64 height, iim::sint64 width, } -void IMS_HDF5addTimepoint ( void *file_descr, int tp, std::string params ) throw (iim::IOException) { +void IMS_HDF5addTimepoint ( void *file_descr, int tp, std::string params ) { #ifdef ENABLE_IMS_HDF5 IMS_HDF5_fdescr_t *int_descr = (IMS_HDF5_fdescr_t *) file_descr; @@ -2268,7 +2268,7 @@ void IMS_HDF5addTimepoint ( void *file_descr, int tp, std::string params ) throw } -void IMS_HDF5writeHyperslab ( void *file_descr, iim::uint8 *buf, iim::sint64 *dims_buf, iim::sint64 *hl, int r, int s, int tp ) throw (iim::IOException) { +void IMS_HDF5writeHyperslab ( void *file_descr, iim::uint8 *buf, iim::sint64 *dims_buf, iim::sint64 *hl, int r, int s, int tp ) { #ifdef ENABLE_IMS_HDF5 IMS_HDF5_fdescr_t *int_descr = (IMS_HDF5_fdescr_t *) file_descr; @@ -2288,7 +2288,7 @@ void IMS_HDF5getVolumeInfo ( void *descr, int tp, int res, void *&volume_descr, float &VXL_1, float &VXL_2, float &VXL_3, float &ORG_V, float &ORG_H, float &ORG_D, iim::uint32 &DIM_V, iim::uint32 &DIM_H, iim::uint32 &DIM_D, - int &DIM_C, int &BYTESxCHAN, int &DIM_T, int &t0, int &t1 ) throw (iim::IOException) { + int &DIM_C, int &BYTESxCHAN, int &DIM_T, int &t0, int &t1 ) { #ifdef ENABLE_IMS_HDF5 @@ -2335,7 +2335,7 @@ void IMS_HDF5getVolumeInfo ( void *descr, int tp, int res, void *&volume_descr, } -void IMS_HDF5getSubVolume ( void *descr, int V0, int V1, int H0, int H1, int D0, int D1, int chan, iim::uint8 *buf, int red_factor, int depth_conv_algo ) throw (iim::IOException) { +void IMS_HDF5getSubVolume ( void *descr, int V0, int V1, int H0, int H1, int D0, int D1, int chan, iim::uint8 *buf, int red_factor, int depth_conv_algo ) { #ifdef ENABLE_IMS_HDF5 IMS_volume_descr_t *int_volume_descr = (IMS_volume_descr_t *) descr; @@ -2407,7 +2407,7 @@ void IMS_HDF5getSubVolume ( void *descr, int V0, int V1, int H0, int H1, int D0, #endif } -void IMS_HDF5closeVolume ( void *descr ) throw (iim::IOException) { +void IMS_HDF5closeVolume ( void *descr ) { #ifdef ENABLE_IMS_HDF5 IMS_volume_descr_t *int_volume_descr = (IMS_volume_descr_t *) descr; if ( int_volume_descr->datasets_id ) diff --git a/src/imagemanager/IMS_HDF5Mngr.h b/src/imagemanager/IMS_HDF5Mngr.h index c21f6af2..bfb6978e 100755 --- a/src/imagemanager/IMS_HDF5Mngr.h +++ b/src/imagemanager/IMS_HDF5Mngr.h @@ -92,7 +92,7 @@ struct histogram_t { -void IMS_HDF5init ( std::string fname, void *&descr, bool loadstruct = false, int vxl_nbytes = 1, void *obj_info = (void *)0, void *root_attr_info = (void *)0 ) throw (iim::IOException); +void IMS_HDF5init ( std::string fname, void *&descr, bool loadstruct = false, int vxl_nbytes = 1, void *obj_info = (void *)0, void *root_attr_info = (void *)0 ) ; /* opens or creates an HDF5 file fname according to the BigDataViewer format and returns an opaque descriptor * * fname: HDF5 filename @@ -102,48 +102,48 @@ void IMS_HDF5init ( std::string fname, void *&descr, bool loadstruct = false, in * file to be created; the description is deallocated after it is used and cannot be used by the caller */ -void *IMS_HDF5get_olist ( void *descr, std::string fname = "", int height = 0, int width = 0, int z_points = 0, int n_chans = 1, int n_timepoints = 1, float abs_V = 0.0, float abs_H = 0.0 ) throw (iim::IOException); +void *IMS_HDF5get_olist ( void *descr, std::string fname = "", int height = 0, int width = 0, int z_points = 0, int n_chans = 1, int n_timepoints = 1, float abs_V = 0.0, float abs_H = 0.0 ) ; /* return a structure describing a hierarchical file structure in terms of groups and attributes * if 'descr' is not null, the other parameters are not used and the returned structure is the one of the file which descriptor is 'descr' * if 'descr' is null a default strucutre is built using the other parameters to set some attributes */ -void *IMS_HDF5adjust_olist ( void *olist, std::string fname, int height, int width, int z_points, iim::uint32 *chans, int n_chans, float abs_V = 0.0, float abs_H = 0.0 ) throw (iim::IOException); +void *IMS_HDF5adjust_olist ( void *olist, std::string fname, int height, int width, int z_points, iim::uint32 *chans, int n_chans, float abs_V = 0.0, float abs_H = 0.0 ) ; /* adjust the structure 'olist' which describes a hierarchical file structure in terms of groups and attributes * the other parameters are used to change some groups and attributes * the adjusted file structure is returned */ -void *IMS_HDF5get_rootalist ( void *descr ) throw (iim::IOException); +void *IMS_HDF5get_rootalist ( void *descr ) ; /* */ - int IMS_HDF5n_resolutions ( void *descr ) throw (iim::IOException); + int IMS_HDF5n_resolutions ( void *descr ) ; /* returns how many resolutions there are in the HDF5 file handled by descr * It is assumed that all resolutions from 0 to the interger returned minus 1 are available */ - void IMS_HDF5setVxlSize ( void *descr, double szV, double szH, double szD ) throw (iim::IOException); + void IMS_HDF5setVxlSize ( void *descr, double szV, double szH, double szD ) ; /* set voxel size at resolution 0 */ - void IMS_HDF5getVxlSize ( void *descr, double &szV, double &szH, double &szD ) throw (iim::IOException); + void IMS_HDF5getVxlSize ( void *descr, double &szV, double &szH, double &szD ) ; /* return voxel size at resolution 0 */ -void IMS_HDF5close ( void *descr ) throw (iim::IOException); +void IMS_HDF5close ( void *descr ) ; /* close the HDF5 file represented by descr and deallocates the descriptor * * descr: opaque descriptor of the HDF5 file */ -void IMS_HDF5set_histogram ( void *descr, histogram_t *buf, int r = 0, int ch = 0, int tp = 0 ) throw (iim::IOException); +void IMS_HDF5set_histogram ( void *descr, histogram_t *buf, int r = 0, int ch = 0, int tp = 0 ) ; /* set the histogram of channel ch at time point tp at resolution r to be saved when the file is closed * (has effect only if the file is being created) */ -void IMS_HDF5set_thumbnail ( void *descr, iim::uint8 *buf, iim::uint32 thumbnail_sz ) throw (iim::IOException); +void IMS_HDF5set_thumbnail ( void *descr, iim::uint8 *buf, iim::uint32 thumbnail_sz ) ; /* set the thumbnail to be saved when the file is closed (has effect only if the file is being created) */ -void IMS_HDF5addResolution ( void *file_descr, iim::sint64 height, iim::sint64 width, iim::sint64 depth, int nchans, int r = 0, bool is_first = false ) throw (iim::IOException); +void IMS_HDF5addResolution ( void *file_descr, iim::sint64 height, iim::sint64 width, iim::sint64 depth, int nchans, int r = 0, bool is_first = false ) ; /* add resolution r * * height: image height at resolution 0 @@ -156,7 +156,7 @@ void IMS_HDF5addResolution ( void *file_descr, iim::sint64 height, iim::sint64 w void IMS_HDF5addChans ( void *file_descr, iim::sint64 height, iim::sint64 width, iim::sint64 depth, - float vxlszV, float vxlszH, float vxlszD, bool *res, int res_size, int chans, int block_height = -1, int block_width = -1, int block_depth = -1 ) throw (iim::IOException); + float vxlszV, float vxlszH, float vxlszD, bool *res, int res_size, int chans, int block_height = -1, int block_width = -1, int block_depth = -1 ) ; /* creates chan descriptors with resolution and subdivisions datasets * * file_descr: @@ -175,12 +175,12 @@ void IMS_HDF5addChans ( void *file_descr, iim::sint64 height, iim::sint64 width, */ -void IMS_HDF5addTimepoint ( void *file_descr, int tp = 0, std::string params = "" ) throw (iim::IOException); +void IMS_HDF5addTimepoint ( void *file_descr, int tp = 0, std::string params = "" ) ; /* add time point at time tp (first time point is the default) */ -void IMS_HDF5writeHyperslab ( void *file_descr, iim::uint8 *buf, iim::sint64 *dims, iim::sint64 *hl, int r, int s, int tp = 0 ) throw (iim::IOException); +void IMS_HDF5writeHyperslab ( void *file_descr, iim::uint8 *buf, iim::sint64 *dims, iim::sint64 *hl, int r, int s, int tp = 0 ) ; /* write one hyperslab to file */ @@ -189,17 +189,17 @@ void IMS_HDF5getVolumeInfo ( void *descr, int tp, int res, void *&volume_descr, float &VXL_1, float &VXL_2, float &VXL_3, float &ORG_V, float &ORG_H, float &ORG_D, iim::uint32 &DIM_V, iim::uint32 &DIM_H, iim::uint32 &DIM_D, - int &DIM_C, int &BYTESxCHAN, int &DIM_T, int &t0, int &t1 ) throw (iim::IOException); + int &DIM_C, int &BYTESxCHAN, int &DIM_T, int &t0, int &t1 ) ; /* Open a volume (i.e. a resolution) and return the opaque descriptor of the volume and the corresponding metadata */ -void IMS_HDF5getSubVolume ( void *descr, int V0, int V1, int H0, int H1, int D0, int D1, int chan, iim::uint8 *buf, int red_factor = 1, int depth_conv_algo = iim::DEPTH_CONVERSION_DEFAULT ) throw (iim::IOException); +void IMS_HDF5getSubVolume ( void *descr, int V0, int V1, int H0, int H1, int D0, int D1, int chan, iim::uint8 *buf, int red_factor = 1, int depth_conv_algo = iim::DEPTH_CONVERSION_DEFAULT ) ; /* must copy a subvolume into buffer buf; voxels have to be converted to 8-bit if needed */ -void IMS_HDF5closeVolume ( void *descr ) throw (iim::IOException); +void IMS_HDF5closeVolume ( void *descr ) ; #endif diff --git a/src/imagemanager/MultiCycleVolume.cpp b/src/imagemanager/MultiCycleVolume.cpp index fe8e2723..75f2367a 100755 --- a/src/imagemanager/MultiCycleVolume.cpp +++ b/src/imagemanager/MultiCycleVolume.cpp @@ -56,7 +56,7 @@ using namespace std; using namespace iim; -MultiCycleVolume::MultiCycleVolume ( string _cycles_dir, float _norm_factor_D ) throw (iim::IOException, iom::exception) : +MultiCycleVolume::MultiCycleVolume ( string _cycles_dir, float _norm_factor_D ) : ComposedVolume() { root_dir = new char[_cycles_dir.size() + 1]; @@ -119,7 +119,7 @@ ComposedVolume() { initChannels(); } -MultiCycleVolume::MultiCycleVolume ( const char *xml_filepath ) throw (iim::IOException, iom::exception) +MultiCycleVolume::MultiCycleVolume ( const char *xml_filepath ) : ComposedVolume() { //extracting field from XML TiXmlDocument xml; @@ -143,7 +143,7 @@ MultiCycleVolume::MultiCycleVolume ( const char *xml_filepath ) throw (iim::IOEx initChannels(); } -MultiCycleVolume::~MultiCycleVolume ( ) throw (iim::IOException) { +MultiCycleVolume::~MultiCycleVolume ( ) { if ( CYCLES ) { for ( int i=0; i 3 printf("\t\t\t\tin MultiCycleVolume::initFromXML(char *xml_filename = %s)\n", xml_filepath); #endif @@ -448,7 +448,7 @@ void MultiCycleVolume::initFromXML(const char *xml_filename) throw (IOException) } -void MultiCycleVolume::saveXML(const char *xml_filename, const char *xml_filepath) throw (IOException) { +void MultiCycleVolume::saveXML(const char *xml_filename, const char *xml_filepath) { #if VM_VERBOSE > 3 printf("\t\t\t\tin MultiCycleVolume::saveXML(char *xml_filename = %s)\n", xml_filename); #endif @@ -570,7 +570,7 @@ void MultiCycleVolume::saveXML(const char *xml_filename, const char *xml_filepat } -//void MultiCycleVolume::saveCyclesXML(const char *xml_filename, const char *xml_filepath) throw (IOException) { +//void MultiCycleVolume::saveCyclesXML(const char *xml_filename, const char *xml_filepath) { // #if VM_VERBOSE > 3 // printf("\t\t\t\tin MultiCycleVolume::saveLayersXML(char *xml_filename = %s)\n", xml_filename); // #endif @@ -622,7 +622,7 @@ void MultiCycleVolume::initDISPS(int i, int _DIM_V, int _DIM_H) { } -void MultiCycleVolume::insertDisplacement(int i, int k, Displacement *displacement) throw (IOException) { +void MultiCycleVolume::insertDisplacement(int i, int k, Displacement *displacement) { displacement->evalReliability(dir_vertical); displacement->evalReliability(dir_horizontal); @@ -644,7 +644,7 @@ iim::uint8 *MultiCycleVolume::loadSubvolume( int V0,int V1, int H0, int H1, int D0, int D1, int *n_chans, int ret_type, iim::uint8 *buffer, int bufSize_V, int bufSize_H, int bufSize_D, int bufSize_C, int bufOffs_V, int bufOffs_H, int bufOffs_D, int bufOffs_C -) throw (iim::IOException, iom::exception) { +) { //throw IOException("in MultiCycleVolume::loadSubvolume(...): not implemented yet"); diff --git a/src/imagemanager/MultiCycleVolume.h b/src/imagemanager/MultiCycleVolume.h index b4331b90..37b3c397 100755 --- a/src/imagemanager/MultiCycleVolume.h +++ b/src/imagemanager/MultiCycleVolume.h @@ -85,16 +85,16 @@ class MultiCycleVolume : public iim::ComposedVolume { void init ( ); - void initChannels ( ) throw (iim::IOException); + void initChannels ( ) ; iim::VirtualVolume *getCYCLE ( int i ) { return CYCLES[i]; } public: - MultiCycleVolume ( std::string _cycles_dir, float _norm_factor_D = CLI_DEF_NORM3 ) throw (iim::IOException, iom::exception); + MultiCycleVolume ( std::string _cycles_dir, float _norm_factor_D = CLI_DEF_NORM3 ) ; - MultiCycleVolume ( const char *_cycles_dir ) throw (iim::IOException, iom::exception); + MultiCycleVolume ( const char *_cycles_dir ) ; - ~MultiCycleVolume ( ) throw (iim::IOException); + ~MultiCycleVolume ( ) ; int getN_CYCLES() {return N_CYCLES;} //int getOVERLAP_D(int i) {return nominal_D_overlap[i];} @@ -162,18 +162,18 @@ class MultiCycleVolume : public iim::ComposedVolume { vm::VirtualStack*** getSTACKS() {return 0;} //XML methods - void initFromXML(const char *xml_filename) throw (iim::IOException); - void saveXML(const char *xml_filename=0, const char *xml_filepath=0) throw (iim::IOException); - //void saveCyclesXML(const char *xml_filename=0, const char *xml_filepath=0) throw (iim::IOException); + void initFromXML(const char *xml_filename) ; + void saveXML(const char *xml_filename=0, const char *xml_filepath=0) ; + //void saveCyclesXML(const char *xml_filename=0, const char *xml_filepath=0) ; - void insertDisplacement(int i, int k, Displacement *displacement) throw (iim::IOException); + void insertDisplacement(int i, int k, Displacement *displacement) ; //loads given subvolume in a 1-D array of iim::uint8 and copy it into 'buffer' starting from offsets virtual iim::uint8 *loadSubvolume( int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1, int *n_chans=0, int ret_type=iim::DEF_IMG_DEPTH, iim::uint8 *buffer=0, int bufSize_V=0, int bufSize_H=0, int bufSize_D=0, int bufSize_C=0, int bufOffs_V=0, int bufOffs_H=0, int bufOffs_D=0, int bufOffs_C=0 - ) throw (iim::IOException, iom::exception); + ) ; // needed to extract layer volumes friend class TPAlgo2MST; diff --git a/src/imagemanager/MultiSliceVolume.cpp b/src/imagemanager/MultiSliceVolume.cpp index f19aa4f2..23c08ada 100755 --- a/src/imagemanager/MultiSliceVolume.cpp +++ b/src/imagemanager/MultiSliceVolume.cpp @@ -140,7 +140,7 @@ MultiSliceVolume::MultiSliceVolume ( const char *xml_filepath ) : ComposedVolume layers_new_xml_fnames = (std::string *) 0; } -MultiSliceVolume::~MultiSliceVolume ( ) throw (iim::IOException) { +MultiSliceVolume::~MultiSliceVolume ( ) { if ( LAYERS ) { for ( int i=0; i 3 printf("\t\t\t\tin MultiSliceVolume::initFromXML(char *xml_filename = %s)\n", xml_filepath); #endif @@ -429,7 +429,7 @@ void MultiSliceVolume::initFromXML(const char *xml_filename) throw (IOException) } -void MultiSliceVolume::saveXML(const char *xml_filename, const char *xml_filepath) throw (IOException) { +void MultiSliceVolume::saveXML(const char *xml_filename, const char *xml_filepath) { #if VM_VERBOSE > 3 printf("\t\t\t\tin MultiSliceVolume::saveXML(char *xml_filename = %s)\n", xml_filename); #endif @@ -558,7 +558,7 @@ void MultiSliceVolume::saveXML(const char *xml_filename, const char *xml_filepat } -//void MultiSliceVolume::saveLayersXML(const char *xml_filename, const char *xml_filepath) throw (IOException) { +//void MultiSliceVolume::saveLayersXML(const char *xml_filename, const char *xml_filepath) { // #if VM_VERBOSE > 3 // printf("\t\t\t\tin MultiSliceVolume::saveLayersXML(char *xml_filename = %s)\n", xml_filename); // #endif @@ -610,7 +610,7 @@ void MultiSliceVolume::initDISPS(int i, int _DIM_V, int _DIM_H) { } -void MultiSliceVolume::insertDisplacement(int i, int j, int k, Displacement *displacement) throw (IOException) { +void MultiSliceVolume::insertDisplacement(int i, int j, int k, Displacement *displacement) { displacement->evalReliability(dir_vertical); displacement->evalReliability(dir_horizontal); @@ -632,7 +632,7 @@ iim::uint8 *MultiSliceVolume::loadSubvolume( int V0,int V1, int H0, int H1, int D0, int D1, int *n_chans, int ret_type, iim::uint8 *buffer, int bufSize_V, int bufSize_H, int bufSize_D, int bufSize_C, int bufOffs_V, int bufOffs_H, int bufOffs_D, int bufOffs_C -) throw (iim::IOException, iom::exception) { +) { //throw IOException("in MultiSliceVolume::loadSubvolume(...): not implemented yet"); diff --git a/src/imagemanager/MultiSliceVolume.h b/src/imagemanager/MultiSliceVolume.h index a50e3e17..4cb02a42 100755 --- a/src/imagemanager/MultiSliceVolume.h +++ b/src/imagemanager/MultiSliceVolume.h @@ -84,7 +84,7 @@ class MultiSliceVolume : public iim::ComposedVolume { void init ( ); - void initChannels ( ) throw (iim::IOException); + void initChannels ( ) ; iim::VirtualVolume *getLAYER ( int i ) { return LAYERS[i]; } @@ -93,7 +93,7 @@ class MultiSliceVolume : public iim::ComposedVolume { MultiSliceVolume ( const char *_layers_dir ); - ~MultiSliceVolume ( ) throw (iim::IOException); + ~MultiSliceVolume ( ) ; int getN_LAYERS() {return N_LAYERS;} int getOVERLAP_D(int i) {return nominal_D_overlap[i];} @@ -164,18 +164,18 @@ class MultiSliceVolume : public iim::ComposedVolume { vm::VirtualStack*** getSTACKS() {return 0;} //XML methods - void initFromXML(const char *xml_filename) throw (iim::IOException); - void saveXML(const char *xml_filename=0, const char *xml_filepath=0) throw (iim::IOException); - //void saveLayersXML(const char *xml_filename=0, const char *xml_filepath=0) throw (iim::IOException); + void initFromXML(const char *xml_filename) ; + void saveXML(const char *xml_filename=0, const char *xml_filepath=0) ; + //void saveLayersXML(const char *xml_filename=0, const char *xml_filepath=0) ; - void insertDisplacement(int i, int j, int k, Displacement *displacement) throw (iim::IOException); + void insertDisplacement(int i, int j, int k, Displacement *displacement) ; //loads given subvolume in a 1-D array of iim::uint8 and copy it into 'buffer' starting from offsets virtual iim::uint8 *loadSubvolume( int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1, int *n_chans=0, int ret_type=iim::DEF_IMG_DEPTH, iim::uint8 *buffer=0, int bufSize_V=0, int bufSize_H=0, int bufSize_D=0, int bufSize_C=0, int bufOffs_V=0, int bufOffs_H=0, int bufOffs_D=0, int bufOffs_C=0 - ) throw (iim::IOException, iom::exception); + ) ; // needed to extract layer volumes friend class TPAlgo2MST; diff --git a/src/imagemanager/RawVolume.cpp b/src/imagemanager/RawVolume.cpp index a23f725d..7173926b 100644 --- a/src/imagemanager/RawVolume.cpp +++ b/src/imagemanager/RawVolume.cpp @@ -42,9 +42,9 @@ using namespace iim; -static char *get_path ( const char *_file_name ) throw (IOException); +static char *get_path ( const char *_file_name ) ; -RawVolume::RawVolume(const char* _file_name) throw (IOException) +RawVolume::RawVolume(const char* _file_name) : VirtualVolume(get_path(_file_name), 1.0f, 1.0f, 1.0f) { /**/iim::debug(iim::LEV3, strprintf("_file_name = \"%s\"", _file_name).c_str(), __iim__current__function__); @@ -60,7 +60,7 @@ RawVolume::RawVolume(const char* _file_name) throw (IOException) } -RawVolume::~RawVolume(void) throw (iim::IOException) +RawVolume::~RawVolume(void) { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); @@ -78,7 +78,7 @@ RawVolume::~RawVolume(void) throw (iim::IOException) } -void RawVolume::init ( ) throw (IOException) +void RawVolume::init ( ) { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); @@ -131,7 +131,7 @@ void RawVolume::init ( ) throw (IOException) // sz shold not be deallocated } -void RawVolume::initChannels ( ) throw (IOException) +void RawVolume::initChannels ( ) { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); @@ -145,7 +145,7 @@ void RawVolume::initChannels ( ) throw (IOException) } -real32 *RawVolume::loadSubvolume_to_real32(int V0,int V1, int H0, int H1, int D0, int D1) throw (IOException) +real32 *RawVolume::loadSubvolume_to_real32(int V0,int V1, int H0, int H1, int D0, int D1) { /**/iim::debug(iim::LEV3, strprintf("V0=%d, V1=%d, H0=%d, H1=%d, D0=%d, D1=%d", V0, V1, H0, H1, D0, D1).c_str(), __iim__current__function__); @@ -171,7 +171,7 @@ real32 *RawVolume::loadSubvolume_to_real32(int V0,int V1, int H0, int H1, int D0 } -uint8 *RawVolume::loadSubvolume_to_UINT8(int V0,int V1, int H0, int H1, int D0, int D1, int *channels, int ret_type) throw (IOException, iom::exception) +uint8 *RawVolume::loadSubvolume_to_UINT8(int V0,int V1, int H0, int H1, int D0, int D1, int *channels, int ret_type) { /**/iim::debug(iim::LEV3, strprintf("V0=%d, V1=%d, H0=%d, H1=%d, D0=%d, D1=%d, *channels=%d, ret_type=%d", V0, V1, H0, H1, D0, D1, channels ? *channels : -1, ret_type).c_str(), __iim__current__function__); @@ -285,7 +285,7 @@ static char path_buffer[PATH_BUF_LEN]; static const char *suffixes[] = { ".raw", ".RAW", ".v3draw", ".V3DRAW", ".tif", "" }; static int suf_lens[] = { 3, 3, 6, 6, 3 }; -char *get_path ( const char *_file_name ) throw (IOException) { +char *get_path ( const char *_file_name ) { strcpy(path_buffer,_file_name); char *tPtr = 0; for ( int i=0; !tPtr && *suffixes[i] != '\0'; i++ ) diff --git a/src/imagemanager/RawVolume.h b/src/imagemanager/RawVolume.h index 561aa952..80d4cdd5 100644 --- a/src/imagemanager/RawVolume.h +++ b/src/imagemanager/RawVolume.h @@ -60,16 +60,16 @@ class RawVolume : public iim::VirtualVolume RawVolume(void); - void init ( ) throw (iim::IOException); + void init ( ) ; // iannello returns the number of channels of images composing the volume - void initChannels ( ) throw (iim::IOException); + void initChannels ( ) ; public: - RawVolume(const char* _file_name) throw (iim::IOException); + RawVolume(const char* _file_name) ; - virtual ~RawVolume(void) throw (iim::IOException); + virtual ~RawVolume(void) ; // returns a unique ID that identifies the volume format std::string getPrintableFormat(){return iim::RAW_FORMAT;} @@ -91,10 +91,10 @@ class RawVolume : public iim::VirtualVolume std::string getFFMT(){return ffmt;} iim::VirtualFmtMngr *getFMT_MNGR(){return fmtMngr;} - iim::real32 *loadSubvolume_to_real32(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1) throw (iim::IOException); + iim::real32 *loadSubvolume_to_real32(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1) ; iim::uint8 *loadSubvolume_to_UINT8(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1, - int *channels=0, int ret_type=iim::DEF_IMG_DEPTH) throw (iim::IOException, iom::exception); + int *channels=0, int ret_type=iim::DEF_IMG_DEPTH) ; // needed to enable the detection by the factory of volume format through use of the default constructor friend class iim::VirtualVolume; diff --git a/src/imagemanager/SimpleVolume.cpp b/src/imagemanager/SimpleVolume.cpp index 87dea229..65cd66f2 100644 --- a/src/imagemanager/SimpleVolume.cpp +++ b/src/imagemanager/SimpleVolume.cpp @@ -65,7 +65,7 @@ SimpleVolume::SimpleVolume(void) : VirtualVolume() STACKS = 0; } -SimpleVolume::SimpleVolume(const char* _root_dir) throw (IOException) +SimpleVolume::SimpleVolume(const char* _root_dir) : VirtualVolume(_root_dir, 1.0f, 1.0f, 1.0f) { /**/iim::debug(iim::LEV3, strprintf("_root_dir = \"%s\"", root_dir).c_str(), __iim__current__function__); @@ -83,7 +83,7 @@ SimpleVolume::SimpleVolume(const char* _root_dir) throw (IOException) } -SimpleVolume::~SimpleVolume(void) throw (iim::IOException) +SimpleVolume::~SimpleVolume(void) { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); @@ -100,7 +100,7 @@ SimpleVolume::~SimpleVolume(void) throw (iim::IOException) } -void SimpleVolume::init() throw (iim::IOException) +void SimpleVolume::init() { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); @@ -173,7 +173,7 @@ void SimpleVolume::init() throw (iim::IOException) } } -void SimpleVolume::initChannels ( ) throw (IOException) +void SimpleVolume::initChannels ( ) { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); @@ -244,7 +244,7 @@ void SimpleVolume::resetDOWNSAMPLINGFACTOR() { } -real32 *SimpleVolume::loadSubvolume_to_real32(int V0,int V1, int H0, int H1, int D0, int D1) throw (IOException) +real32 *SimpleVolume::loadSubvolume_to_real32(int V0,int V1, int H0, int H1, int D0, int D1) { /**/iim::debug(iim::LEV3, strprintf("V0 = %d, V1 = %d, H0 = %d, H1 = %d, D0 = %d, D1 = %d", V0, V1, H0, H1, D0, D1).c_str(), __iim__current__function__); @@ -305,7 +305,7 @@ real32 *SimpleVolume::loadSubvolume_to_real32(int V0,int V1, int H0, int H1, int } -uint8 *SimpleVolume::loadSubvolume_to_UINT8(int V0,int V1, int H0, int H1, int D0, int D1, int *channels, int ret_type) throw (IOException, iom::exception) { +uint8 *SimpleVolume::loadSubvolume_to_UINT8(int V0,int V1, int H0, int H1, int D0, int D1, int *channels, int ret_type) { /**/iim::debug(iim::LEV3, strprintf("V0=%d, V1=%d, H0=%d, H1=%d, D0=%d, D1=%d, *channels=%d, ret_type=%d", V0, V1, H0, H1, D0, D1, channels ? *channels : -1, ret_type).c_str(), __iim__current__function__); diff --git a/src/imagemanager/SimpleVolume.h b/src/imagemanager/SimpleVolume.h index 01a4151d..0d1c5159 100644 --- a/src/imagemanager/SimpleVolume.h +++ b/src/imagemanager/SimpleVolume.h @@ -50,16 +50,16 @@ class SimpleVolume : public iim::VirtualVolume SimpleVolume(void); - void init ( ) throw (iim::IOException); + void init ( ) ; // iannello returns the number of channels of images composing the volume - void initChannels ( ) throw (iim::IOException); + void initChannels ( ) ; public: - SimpleVolume(const char* _root_dir) throw (iim::IOException); + SimpleVolume(const char* _root_dir) ; - virtual ~SimpleVolume(void) throw (iim::IOException); + virtual ~SimpleVolume(void) ; // returns a unique ID that identifies the volume format std::string getPrintableFormat(){return iim::SIMPLE_FORMAT;} @@ -82,10 +82,10 @@ class SimpleVolume : public iim::VirtualVolume void setDOWNSAMPLINGFACTOR( int f ); void resetDOWNSAMPLINGFACTOR(); - iim::real32 *loadSubvolume_to_real32(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1) throw (iim::IOException); + iim::real32 *loadSubvolume_to_real32(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1) ; iim::uint8 *loadSubvolume_to_UINT8(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1, - int *channels=0, int ret_type=iim::DEF_IMG_DEPTH) throw (iim::IOException, iom::exception); + int *channels=0, int ret_type=iim::DEF_IMG_DEPTH) ; // needed to enable the detection by the factory of volume format through use of the default constructor friend class iim::VirtualVolume; diff --git a/src/imagemanager/SimpleVolumeRaw.cpp b/src/imagemanager/SimpleVolumeRaw.cpp index 2c33c04e..043405bb 100644 --- a/src/imagemanager/SimpleVolumeRaw.cpp +++ b/src/imagemanager/SimpleVolumeRaw.cpp @@ -61,7 +61,7 @@ SimpleVolumeRaw::SimpleVolumeRaw(void) : VirtualVolume() STACKS = 0; } -SimpleVolumeRaw::SimpleVolumeRaw(const char* _root_dir) throw (IOException) +SimpleVolumeRaw::SimpleVolumeRaw(const char* _root_dir) : VirtualVolume(_root_dir, 1.0f, 1.0f, 1.0f) { /**/iim::debug(iim::LEV3, strprintf("_root_dir = \"%s\"", _root_dir).c_str(), __iim__current__function__); @@ -79,7 +79,7 @@ SimpleVolumeRaw::SimpleVolumeRaw(const char* _root_dir) throw (IOException) } -SimpleVolumeRaw::~SimpleVolumeRaw(void) throw (iim::IOException) +SimpleVolumeRaw::~SimpleVolumeRaw(void) { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); @@ -99,7 +99,7 @@ SimpleVolumeRaw::~SimpleVolumeRaw(void) throw (iim::IOException) } -void SimpleVolumeRaw::init() throw (IOException) +void SimpleVolumeRaw::init() { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); @@ -166,7 +166,7 @@ void SimpleVolumeRaw::init() throw (IOException) } } -void SimpleVolumeRaw::initChannels ( ) throw (IOException) +void SimpleVolumeRaw::initChannels ( ) { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); @@ -224,7 +224,7 @@ void SimpleVolumeRaw::resetDOWNSAMPLINGFACTOR() { } -real32 *SimpleVolumeRaw::loadSubvolume_to_real32(int V0,int V1, int H0, int H1, int D0, int D1) throw (IOException) +real32 *SimpleVolumeRaw::loadSubvolume_to_real32(int V0,int V1, int H0, int H1, int D0, int D1) { /**/iim::debug(iim::LEV3, strprintf("V0=%d, V1=%d, H0=%d, H1=%d, D0=%d, D1=%d", V0, V1, H0, H1, D0, D1).c_str(), __iim__current__function__); @@ -289,7 +289,7 @@ real32 *SimpleVolumeRaw::loadSubvolume_to_real32(int V0,int V1, int H0, int H1, } -uint8 *SimpleVolumeRaw::loadSubvolume_to_UINT8(int V0,int V1, int H0, int H1, int D0, int D1, int *channels, int ret_type) throw (IOException, iom::exception) +uint8 *SimpleVolumeRaw::loadSubvolume_to_UINT8(int V0,int V1, int H0, int H1, int D0, int D1, int *channels, int ret_type) { /**/iim::debug(iim::LEV3, strprintf("V0=%d, V1=%d, H0=%d, H1=%d, D0=%d, D1=%d, *channels=%d, ret_type=%d", V0, V1, H0, H1, D0, D1, channels ? *channels : -1, ret_type).c_str(), __iim__current__function__); diff --git a/src/imagemanager/SimpleVolumeRaw.h b/src/imagemanager/SimpleVolumeRaw.h index 007cf493..7c009054 100644 --- a/src/imagemanager/SimpleVolumeRaw.h +++ b/src/imagemanager/SimpleVolumeRaw.h @@ -50,16 +50,16 @@ class SimpleVolumeRaw : public iim::VirtualVolume SimpleVolumeRaw(void); - void init ( ) throw (iim::IOException); + void init ( ) ; // iannello returns the number of channels of images composing the volume - void initChannels ( ) throw (iim::IOException); + void initChannels ( ) ; public: - SimpleVolumeRaw(const char* _root_dir) throw (iim::IOException); + SimpleVolumeRaw(const char* _root_dir) ; - virtual ~SimpleVolumeRaw(void) throw (iim::IOException); + virtual ~SimpleVolumeRaw(void) ; // returns a unique ID that identifies the volume format std::string getPrintableFormat(){return iim::SIMPLE_RAW_FORMAT;} @@ -82,10 +82,10 @@ class SimpleVolumeRaw : public iim::VirtualVolume void setDOWNSAMPLINGFACTOR( int f ); void resetDOWNSAMPLINGFACTOR(); - iim::real32 *loadSubvolume_to_real32(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1) throw (iim::IOException); + iim::real32 *loadSubvolume_to_real32(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1) ; iim::uint8 *loadSubvolume_to_UINT8(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1, - int *channels=0, int ret_type=iim::DEF_IMG_DEPTH) throw (iim::IOException, iom::exception); + int *channels=0, int ret_type=iim::DEF_IMG_DEPTH) ; // needed to enable the detection by the factory of volume format through use of the default constructor friend class iim::VirtualVolume; diff --git a/src/imagemanager/Stack.cpp b/src/imagemanager/Stack.cpp index dfc5a50f..79ee55e8 100644 --- a/src/imagemanager/Stack.cpp +++ b/src/imagemanager/Stack.cpp @@ -69,7 +69,7 @@ using namespace std; using namespace iim; -Stack::Stack(VirtualVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, char* _DIR_NAME) throw (IOException) +Stack::Stack(VirtualVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, char* _DIR_NAME) { /**/iim::debug(iim::LEV3, strprintf("_ROW_INDEX=%d, _COL_INDEX=%d, _DIR_NAME=%s", _ROW_INDEX, _COL_INDEX, _DIR_NAME).c_str(), __iim__current__function__); @@ -91,7 +91,7 @@ Stack::Stack(VirtualVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, char* _D init(); } -Stack::Stack(VirtualVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, FILE* bin_file) throw (IOException) +Stack::Stack(VirtualVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, FILE* bin_file) { /**/iim::debug(iim::LEV3, strprintf("_ROW_INDEX=%d, _COL_INDEX=%d", _ROW_INDEX, _COL_INDEX).c_str(), __iim__current__function__); @@ -160,7 +160,7 @@ void Stack::binarizeInto(FILE* file) } } -void Stack::unBinarizeFrom(FILE* file) throw (IOException) +void Stack::unBinarizeFrom(FILE* file) { /**/iim::debug(iim::LEV3, strprintf("_ROW_INDEX=%d, _COL_INDEX=%d", ROW_INDEX, COL_INDEX).c_str(), __iim__current__function__); @@ -235,7 +235,7 @@ void Stack::unBinarizeFrom(FILE* file) throw (IOException) } //Initializes all object's members given DIR_NAME -void Stack::init() throw (IOException) +void Stack::init() { /**/iim::debug(iim::LEV3, strprintf("_ROW_INDEX=%d, _COL_INDEX=%d", ROW_INDEX, COL_INDEX).c_str(), __iim__current__function__); diff --git a/src/imagemanager/Stack.h b/src/imagemanager/Stack.h index bd7237c6..5fa7f8c6 100644 --- a/src/imagemanager/Stack.h +++ b/src/imagemanager/Stack.h @@ -65,12 +65,12 @@ class iim::Stack Stack(void); //Initializes all object's members given DIR_NAME - void init() throw (iim::IOException); + void init() ; public: - Stack(iim::VirtualVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, FILE* bin_file) throw (iim::IOException); - Stack(iim::VirtualVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, char* _DIR_NAME) throw (iim::IOException); + Stack(iim::VirtualVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, FILE* bin_file) ; + Stack(iim::VirtualVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, char* _DIR_NAME) ; ~Stack(void); //GET methods @@ -96,7 +96,7 @@ class iim::Stack //binarizing-unbinarizing methods void binarizeInto(FILE* file); - void unBinarizeFrom(FILE* file) throw (iim::IOException); + void unBinarizeFrom(FILE* file) ; //loads/releases images of current stack (from 'first_file' to 'last_file' extremes included, if not specified loads entire stack) void loadStack (int first_file=-1, int last_file=-1); diff --git a/src/imagemanager/StackRaw.cpp b/src/imagemanager/StackRaw.cpp index fd7486bb..578cbf7e 100644 --- a/src/imagemanager/StackRaw.cpp +++ b/src/imagemanager/StackRaw.cpp @@ -64,7 +64,7 @@ using namespace std; using namespace iim; -StackRaw::StackRaw(VirtualVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, char* _DIR_NAME) throw (IOException) +StackRaw::StackRaw(VirtualVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, char* _DIR_NAME) { /**/iim::debug(iim::LEV3, strprintf("_ROW_INDEX=%d, _COL_INDEX=%d, _DIR_NAME=%s", _ROW_INDEX, _COL_INDEX, _DIR_NAME).c_str(), __iim__current__function__); @@ -84,7 +84,7 @@ StackRaw::StackRaw(VirtualVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, ch init(); } -StackRaw::StackRaw(VirtualVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, FILE* bin_file) throw (IOException) +StackRaw::StackRaw(VirtualVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, FILE* bin_file) { /**/iim::debug(iim::LEV3, strprintf("_ROW_INDEX=%d, _COL_INDEX=%d", _ROW_INDEX, _COL_INDEX).c_str(), __iim__current__function__); @@ -151,7 +151,7 @@ void StackRaw::binarizeInto(FILE* file) } } -void StackRaw::unBinarizeFrom(FILE* file) throw (IOException) +void StackRaw::unBinarizeFrom(FILE* file) { /**/iim::debug(iim::LEV3, strprintf("ROW_INDEX=%d, COL_INDEX=%d", ROW_INDEX, COL_INDEX).c_str(), __iim__current__function__); diff --git a/src/imagemanager/StackRaw.h b/src/imagemanager/StackRaw.h index c4342064..89907f49 100644 --- a/src/imagemanager/StackRaw.h +++ b/src/imagemanager/StackRaw.h @@ -63,8 +63,8 @@ class StackRaw public: - StackRaw(iim::VirtualVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, FILE* bin_file) throw (iim::IOException); - StackRaw(iim::VirtualVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, char* _DIR_NAME) throw (iim::IOException); + StackRaw(iim::VirtualVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, FILE* bin_file) ; + StackRaw(iim::VirtualVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, char* _DIR_NAME) ; ~StackRaw(void); //GET methods @@ -90,7 +90,7 @@ class StackRaw //binarizing-unbinarizing methods void binarizeInto(FILE* file); - void unBinarizeFrom(FILE* file) throw (iim::IOException); + void unBinarizeFrom(FILE* file) ; //loads/releases images of current stack (from 'first_file' to 'last_file' extremes included, if not specified loads entire stack) void loadStack (int first_file=-1, int last_file=-1); diff --git a/src/imagemanager/StackedVolume.cpp b/src/imagemanager/StackedVolume.cpp index 0a20bce7..d55ebb36 100644 --- a/src/imagemanager/StackedVolume.cpp +++ b/src/imagemanager/StackedVolume.cpp @@ -77,7 +77,7 @@ StackedVolume::StackedVolume(void) : VirtualVolume() STACKS = 0; } -StackedVolume::StackedVolume(const char* _root_dir) throw (IOException) +StackedVolume::StackedVolume(const char* _root_dir) : VirtualVolume(_root_dir) // iannello ADDED { /**/iim::debug(iim::LEV3, strprintf("_root_dir = \"%s\"", _root_dir).c_str(), __iim__current__function__); @@ -112,7 +112,7 @@ StackedVolume::StackedVolume(const char* _root_dir) throw (IOException) } } -StackedVolume::StackedVolume(const char* _root_dir, ref_sys _reference_system, float _VXL_1, float _VXL_2, float _VXL_3, bool overwrite_mdata, bool save_mdata) throw (IOException) +StackedVolume::StackedVolume(const char* _root_dir, ref_sys _reference_system, float _VXL_1, float _VXL_2, float _VXL_3, bool overwrite_mdata, bool save_mdata) : VirtualVolume(_root_dir) // iannello ADDED { /**/iim::debug(iim::LEV3, strprintf("_root_dir=%s, ref_sys reference_system={%d,%d,%d}, VXL_1=%.4f, VXL_2=%.4f, VXL_3=%.4f", @@ -156,7 +156,7 @@ StackedVolume::StackedVolume(const char* _root_dir, ref_sys _reference_system, f initChannels(); } -StackedVolume::~StackedVolume(void) throw (iim::IOException) +StackedVolume::~StackedVolume(void) { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); @@ -176,7 +176,7 @@ StackedVolume::~StackedVolume(void) throw (iim::IOException) int StackedVolume::getStacksHeight(){return STACKS[0][0]->getHEIGHT();} int StackedVolume::getStacksWidth(){return STACKS[0][0]->getWIDTH();} -void StackedVolume::save(char* metadata_filepath) throw (IOException) +void StackedVolume::save(char* metadata_filepath) { /**/iim::debug(iim::LEV3, strprintf("metadata_filepath = \"%s\"", metadata_filepath).c_str(), __iim__current__function__); @@ -220,7 +220,7 @@ void StackedVolume::save(char* metadata_filepath) throw (IOException) fclose(file); } -void StackedVolume::load(char* metadata_filepath) throw (IOException) +void StackedVolume::load(char* metadata_filepath) { /**/iim::debug(iim::LEV3, strprintf("metadata_filepath = \"%s\"", metadata_filepath).c_str(), __iim__current__function__); @@ -424,7 +424,7 @@ void StackedVolume::load(char* metadata_filepath) throw (IOException) fclose(file); } -void StackedVolume::init() throw (IOException) +void StackedVolume::init() { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); @@ -617,7 +617,7 @@ void StackedVolume::init() throw (IOException) } } -void StackedVolume::initChannels ( ) throw (IOException) +void StackedVolume::initChannels ( ) { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); @@ -924,7 +924,7 @@ void StackedVolume::extractCoordinates(Stack* stk, int z, int* crd_1, int* crd_2 } //loads given subvolume in a 1-D array of float -real32* StackedVolume::loadSubvolume(int V0,int V1, int H0, int H1, int D0, int D1, list *involved_stacks, bool release_stacks) throw (IOException) +real32* StackedVolume::loadSubvolume(int V0,int V1, int H0, int H1, int D0, int D1, list *involved_stacks, bool release_stacks) { /**/iim::debug(iim::LEV3, strprintf("V0=%d, V1=%d, H0=%d, H1=%d, D0=%d, D1=%d%s", V0, V1, H0, H1, D0, D1, (involved_stacks? ", involved_stacks" : "")).c_str(), __iim__current__function__); @@ -997,7 +997,7 @@ real32* StackedVolume::loadSubvolume(int V0,int V1, int H0, int H1, int D0, int //loads given subvolume in a 1-D array of uint8 while releasing stacks slices memory when they are no longer needed //---03 nov 2011: added color support -uint8* StackedVolume::loadSubvolume_to_UINT8(int V0,int V1, int H0, int H1, int D0, int D1, int *channels, int ret_type) throw (IOException, iom::exception) +uint8* StackedVolume::loadSubvolume_to_UINT8(int V0,int V1, int H0, int H1, int D0, int D1, int *channels, int ret_type) { /**/iim::debug(iim::LEV3, strprintf("V0=%d, V1=%d, H0=%d, H1=%d, D0=%d, D1=%d, *channels=%d, ret_type=%d", V0, V1, H0, H1, D0, D1, channels ? *channels : -1, ret_type).c_str(), __iim__current__function__); diff --git a/src/imagemanager/StackedVolume.h b/src/imagemanager/StackedVolume.h index 798fa9e0..8ff40bd4 100644 --- a/src/imagemanager/StackedVolume.h +++ b/src/imagemanager/StackedVolume.h @@ -63,7 +63,7 @@ class iim::StackedVolume : public iim::VirtualVolume StackedVolume(void); //Given the reference system, initializes all object's members using stack's directories hierarchy - void init() throw (iim::IOException); + void init() ; //rotate stacks matrix around D axis (accepted values are theta=0,90,180,270) void rotate(int theta); @@ -75,16 +75,16 @@ class iim::StackedVolume : public iim::VirtualVolume void extractCoordinates(Stack* stk, int z, int* crd_1, int* crd_2, int* crd_3); // iannello returns the number of channels of images composing the volume - void initChannels ( ) throw (iim::IOException); + void initChannels ( ) ; public: //CONSTRUCTORS-DECONSTRUCTOR - StackedVolume(const char* _root_dir) throw (iim::IOException); + StackedVolume(const char* _root_dir) ; StackedVolume(const char* _root_dir, iim::ref_sys _reference_system, float _VXL_1, float _VXL_2, float _VXL_3, - bool overwrite_mdata = false, bool save_mdata=true) throw (iim::IOException); - virtual ~StackedVolume(void) throw (iim::IOException); + bool overwrite_mdata = false, bool save_mdata=true) ; + virtual ~StackedVolume(void) ; //GET methods // iannello char* getSTACKS_DIR(){return stacks_dir;} @@ -123,21 +123,21 @@ class iim::StackedVolume : public iim::VirtualVolume void print( bool print_stacks = false ); //saving-loading methods to/from metadata binary file - void save(char* metadata_filepath) throw (iim::IOException); - void load(char* metadata_filepath) throw (iim::IOException); + void save(char* metadata_filepath) ; + void load(char* metadata_filepath) ; //loads given subvolume in a 1-D array of iim::real32 while releasing stacks slices memory when they are no longer needed - inline iim::real32 *loadSubvolume_to_real32(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1) throw (iim::IOException) { + inline iim::real32 *loadSubvolume_to_real32(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1) { return loadSubvolume(V0,V1,H0,H1,D0,D1,0,true); } //loads given subvolume in a 1-D array and puts used Stacks into 'involved_stacks' iff not null iim::real32 *loadSubvolume(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1, - std::list *involved_stacks = 0, bool release_stacks = false) throw (iim::IOException); + std::list *involved_stacks = 0, bool release_stacks = false) ; //loads given subvolume in a 1-D array of iim::uint8 while releasing stacks slices memory when they are no longer needed iim::uint8 *loadSubvolume_to_UINT8(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1, - int *channels=0, int ret_type=iim::DEF_IMG_DEPTH) throw (iim::IOException, iom::exception); + int *channels=0, int ret_type=iim::DEF_IMG_DEPTH) ; //releases allocated memory of stacks diff --git a/src/imagemanager/TiledMCVolume.cpp b/src/imagemanager/TiledMCVolume.cpp index 65e405de..fc63a242 100644 --- a/src/imagemanager/TiledMCVolume.cpp +++ b/src/imagemanager/TiledMCVolume.cpp @@ -63,7 +63,7 @@ TiledMCVolume::TiledMCVolume(void) : VirtualVolume() vol_ch = 0; } -TiledMCVolume::TiledMCVolume(const char* _root_dir) throw (IOException) +TiledMCVolume::TiledMCVolume(const char* _root_dir) : VirtualVolume(_root_dir) // iannello ADDED { /**/iim::debug(iim::LEV3, strprintf("_root_dir=%s", _root_dir).c_str(), __iim__current__function__); @@ -93,7 +93,7 @@ TiledMCVolume::TiledMCVolume(const char* _root_dir) throw (IOException) } } -TiledMCVolume::TiledMCVolume(const char* _root_dir, ref_sys _reference_system, float _VXL_1, float _VXL_2, float _VXL_3, bool overwrite_mdata, bool save_mdata) throw (IOException) +TiledMCVolume::TiledMCVolume(const char* _root_dir, ref_sys _reference_system, float _VXL_1, float _VXL_2, float _VXL_3, bool overwrite_mdata, bool save_mdata) : VirtualVolume(_root_dir) // iannello ADDED { /**/iim::debug(iim::LEV3, strprintf("_root_dir=%s, ref_sys reference_system={%d,%d,%d}, VXL_1=%.4f, VXL_2=%.4f, VXL_3=%.4f", @@ -133,7 +133,7 @@ TiledMCVolume::TiledMCVolume(const char* _root_dir, ref_sys _reference_system, f initChannels(); } -TiledMCVolume::~TiledMCVolume(void) throw (iim::IOException) +TiledMCVolume::~TiledMCVolume(void) { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); @@ -147,7 +147,7 @@ TiledMCVolume::~TiledMCVolume(void) throw (iim::IOException) } -void TiledMCVolume::save(char* metadata_filepath) throw (IOException) +void TiledMCVolume::save(char* metadata_filepath) { /**/iim::debug(iim::LEV3, strprintf("metadata_filepath=%s", metadata_filepath).c_str(), __iim__current__function__); @@ -207,7 +207,7 @@ void TiledMCVolume::save(char* metadata_filepath) throw (IOException) fclose(file); } -void TiledMCVolume::load(char* metadata_filepath) throw (IOException) +void TiledMCVolume::load(char* metadata_filepath) { /**/iim::debug(iim::LEV3, strprintf("metadata_filepath=%s", metadata_filepath).c_str(), __iim__current__function__); @@ -422,7 +422,7 @@ void TiledMCVolume::load(char* metadata_filepath) throw (IOException) fclose(file); } -void TiledMCVolume::init() throw (IOException) +void TiledMCVolume::init() { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); @@ -605,7 +605,7 @@ void TiledMCVolume::init() throw (IOException) //} } -void TiledMCVolume::initChannels ( ) throw (IOException) +void TiledMCVolume::initChannels ( ) { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); @@ -791,7 +791,7 @@ void TiledMCVolume::mirror(axis mrr_axis) } //loads given subvolume in a 1-D array of float -real32* TiledMCVolume::loadSubvolume(int V0,int V1, int H0, int H1, int D0, int D1, list *involved_blocks, bool release_blocks) throw (IOException) +real32* TiledMCVolume::loadSubvolume(int V0,int V1, int H0, int H1, int D0, int D1, list *involved_blocks, bool release_blocks) { /**/iim::debug(iim::LEV3, strprintf("V0=%d, V1=%d, H0=%d, H1=%d, D0=%d, D1=%d, %s", V0, V1, H0, H1, D0, D1, (involved_blocks? ", involved_stacks" : "")).c_str(), __iim__current__function__); @@ -825,7 +825,7 @@ real32* TiledMCVolume::loadSubvolume(int V0,int V1, int H0, int H1, int D0, int //loads given subvolume in a 1-D array of uint8 while releasing stacks slices memory when they are no longer needed //---03 nov 2011: added color support -uint8* TiledMCVolume::loadSubvolume_to_UINT8(int V0,int V1, int H0, int H1, int D0, int D1, int *channels, int ret_type) throw (IOException, iom::exception) +uint8* TiledMCVolume::loadSubvolume_to_UINT8(int V0,int V1, int H0, int H1, int D0, int D1, int *channels, int ret_type) { /**/iim::debug(iim::LEV3, strprintf("V0=%d, V1=%d, H0=%d, H1=%d, D0=%d, D1=%d, *channels=%d, ret_type=%d", V0, V1, H0, H1, D0, D1, channels ? *channels : -1, ret_type).c_str(), __iim__current__function__); diff --git a/src/imagemanager/TiledMCVolume.h b/src/imagemanager/TiledMCVolume.h index 1a267d17..e95353e0 100644 --- a/src/imagemanager/TiledMCVolume.h +++ b/src/imagemanager/TiledMCVolume.h @@ -55,7 +55,7 @@ class iim::TiledMCVolume : public iim::VirtualVolume TiledMCVolume(void); //Given the reference system, initializes all object's members using stack's directories hierarchy - void init() throw (iim::IOException); + void init() ; //rotate stacks matrix around D axis (accepted values are theta=0,90,180,270) void rotate(int theta); @@ -64,16 +64,16 @@ class iim::TiledMCVolume : public iim::VirtualVolume void mirror(iim::axis mrr_axis); // iannello returns the number of channels of images composing the volume - void initChannels ( ) throw (iim::IOException); + void initChannels ( ) ; public: //CONSTRUCTORS-DECONSTRUCTOR - TiledMCVolume(const char* _root_dir) throw (iim::IOException); + TiledMCVolume(const char* _root_dir) ; TiledMCVolume(const char* _root_dir, iim::ref_sys _reference_system, float _VXL_1, float _VXL_2, float _VXL_3, - bool overwrite_mdata = false, bool save_mdata=true) throw (iim::IOException); + bool overwrite_mdata = false, bool save_mdata=true) ; - virtual ~TiledMCVolume(void) throw (iim::IOException); + virtual ~TiledMCVolume(void) ; //GET methods iim::uint16 getN_ROWS(){return N_ROWS;} @@ -100,21 +100,21 @@ class iim::TiledMCVolume : public iim::VirtualVolume void print( bool print_stacks = false ); //saving-loading methods to/from metadata binary file - void save(char* metadata_filepath) throw (iim::IOException); - void load(char* metadata_filepath) throw (iim::IOException); + void save(char* metadata_filepath) ; + void load(char* metadata_filepath) ; //loads given subvolume in a 1-D array of iim::real32 while releasing stacks slices memory when they are no longer needed - inline iim::real32 *loadSubvolume_to_real32(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1) throw (iim::IOException) { + inline iim::real32 *loadSubvolume_to_real32(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1) { return loadSubvolume(V0,V1,H0,H1,D0,D1,0,true); } //loads given subvolume in a 1-D array and puts used Stacks into 'involved_stacks' iff not null iim::real32 *loadSubvolume(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1, - std::list *involved_blocks = 0, bool release_blocks = false) throw (iim::IOException); + std::list *involved_blocks = 0, bool release_blocks = false) ; //loads given subvolume in a 1-D array of iim::uint8 while releasing stacks slices memory when they are no longer needed iim::uint8 *loadSubvolume_to_UINT8(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1, - int *channels=0, int ret_type=iim::DEF_IMG_DEPTH) throw (iim::IOException, iom::exception); + int *channels=0, int ret_type=iim::DEF_IMG_DEPTH) ; // moved to VirtualVolume.h by Alessandro on 2014-02-20 //sets active channels diff --git a/src/imagemanager/TiledVolume.h b/src/imagemanager/TiledVolume.h index f2b98266..b7ca77a3 100644 --- a/src/imagemanager/TiledVolume.h +++ b/src/imagemanager/TiledVolume.h @@ -56,7 +56,7 @@ class iim::TiledVolume : public iim::VirtualVolume TiledVolume(void); //Given the reference system, initializes all object's members using stack's directories hierarchy - void init() throw (iim::IOException); + void init() ; //rotate stacks matrix around D axis (accepted values are theta=0,90,180,270) void rotate(int theta); @@ -68,16 +68,16 @@ class iim::TiledVolume : public iim::VirtualVolume void extractCoordinates(iim::Block* stk, int z, int* crd_1, int* crd_2, int* crd_3); // iannello returns the number of channels of images composing the volume - void initChannels ( ) throw (iim::IOException); + void initChannels ( ) ; public: //CONSTRUCTORS-DECONSTRUCTOR - TiledVolume(const char* _root_dir) throw (iim::IOException); + TiledVolume(const char* _root_dir) ; TiledVolume(const char* _root_dir, iim::ref_sys _reference_system, float _VXL_1, float _VXL_2, float _VXL_3, - bool overwrite_mdata = false, bool save_mdata=true) throw (iim::IOException); + bool overwrite_mdata = false, bool save_mdata=true) ; - virtual ~TiledVolume(void) throw (iim::IOException); + virtual ~TiledVolume(void) ; //GET methods iim::Block*** getBLOCKS(){return BLOCKS;} @@ -109,21 +109,21 @@ class iim::TiledVolume : public iim::VirtualVolume void print( bool print_stacks = false ); //saving-loading methods to/from metadata binary file - void save(char* metadata_filepath) throw (iim::IOException); - void load(char* metadata_filepath) throw (iim::IOException); + void save(char* metadata_filepath) ; + void load(char* metadata_filepath) ; //loads given subvolume in a 1-D array of iim::real32 while releasing stacks slices memory when they are no longer needed - inline iim::real32 *loadSubvolume_to_real32(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1) throw (iim::IOException) { + inline iim::real32 *loadSubvolume_to_real32(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1) { return loadSubvolume(V0,V1,H0,H1,D0,D1,0,true); } //loads given subvolume in a 1-D array and puts used Stacks into 'involved_stacks' iff not null iim::real32 *loadSubvolume(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1, - std::list *involved_blocks = 0, bool release_blocks = false) throw (iim::IOException); + std::list *involved_blocks = 0, bool release_blocks = false) ; //loads given subvolume in a 1-D array of iim::uint8 while releasing stacks slices memory when they are no longer needed iim::uint8 *loadSubvolume_to_UINT8(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1, - int *channels=0, int ret_type=iim::DEF_IMG_DEPTH) throw (iim::IOException, iom::exception); + int *channels=0, int ret_type=iim::DEF_IMG_DEPTH) ; //releases allocated memory of stacks void releaseStacks(int first_file=-1, int last_file=-1); diff --git a/src/imagemanager/TimeSeries.cpp b/src/imagemanager/TimeSeries.cpp index 954f2725..0a51d081 100644 --- a/src/imagemanager/TimeSeries.cpp +++ b/src/imagemanager/TimeSeries.cpp @@ -9,7 +9,7 @@ #include "TimeSeries.h" #include "ProgressBar.h" -TimeSeries::TimeSeries(const char *rootDir, std::string frames_format /* = "" */) throw (iim::IOException) : iim::VirtualVolume(rootDir) +TimeSeries::TimeSeries(const char *rootDir, std::string frames_format /* = "" */) : iim::VirtualVolume(rootDir) { /**/iim::debug(iim::LEV2, iim::strprintf("rootDir = %s, frames_format = \"%s\"", root_dir, frames_format.c_str()).c_str(), __iim__current__function__); @@ -132,13 +132,13 @@ TimeSeries::TimeSeries(const char *rootDir, std::string frames_format /* = "" */ DIM_T = (int)(frames.size()); } -TimeSeries::~TimeSeries(void) throw (iim::IOException) +TimeSeries::~TimeSeries(void) { /**/iim::debug(iim::LEV2, 0, __iim__current__function__); } // pure virtual method inherithed from abstract class -void TimeSeries::initChannels ( ) throw (iim::IOException) +void TimeSeries::initChannels ( ) { /**/iim::debug(iim::LEV2, 0, __iim__current__function__); @@ -165,7 +165,7 @@ void TimeSeries::initChannels ( ) throw (iim::IOException) } // set active channels (@OVERRIDES VirtualVolume.h by Alessandro on 2014-02-23) -// WARNING: caller loses ownership of array '_active' +// WARNING: caller loses ownership of array '_active' void TimeSeries::setActiveChannels ( iim::uint32 *_active, int _n_active ) { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); @@ -179,7 +179,7 @@ void TimeSeries::setActiveChannels ( iim::uint32 *_active, int _n_active ) } // returns only the active frames, i.e. those in the range [t0, t1] -std::vector TimeSeries::getActiveFrames() throw (iim::IOException) +std::vector TimeSeries::getActiveFrames() { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); @@ -194,7 +194,7 @@ std::vector TimeSeries::getActiveFrames() throw (iim::IOExc return activeFrames; } -iim::VirtualVolume* TimeSeries::getFrameAt(int t) throw (iim::IOException) +iim::VirtualVolume* TimeSeries::getFrameAt(int t) { /**/iim::debug(iim::LEV3, iim::strprintf("t = %d", t).c_str(), __iim__current__function__); @@ -210,7 +210,7 @@ iim::VirtualVolume* TimeSeries::getFrameAt(int t) throw (iim::IOException) } // pure virtual methods inherithed from abstract class -iim::real32 * TimeSeries::loadSubvolume_to_real32(int V0,int V1, int H0, int H1, int D0, int D1) throw (iim::IOException) +iim::real32 * TimeSeries::loadSubvolume_to_real32(int V0,int V1, int H0, int H1, int D0, int D1) { /**/iim::debug(iim::LEV3, iim::strprintf("V0=%d, V1=%d, H0=%d, H1=%d, D0=%d, D1=%d", V0, V1, H0, H1, D0, D1).c_str(), __iim__current__function__); @@ -218,7 +218,7 @@ iim::real32 * TimeSeries::loadSubvolume_to_real32(int V0,int V1, int H0, int H1, throw iim::IOException("Not yet implemented"); } -iim::uint8 * TimeSeries::loadSubvolume_to_UINT8(int V0,int V1, int H0, int H1, int D0, int D1, int *channels /*=0*/, int ret_type /*=iim::DEF_IMG_DEPTH*/) throw (iim::IOException) +iim::uint8 * TimeSeries::loadSubvolume_to_UINT8(int V0,int V1, int H0, int H1, int D0, int D1, int *channels /*=0*/, int ret_type /*=iim::DEF_IMG_DEPTH*/) { /**/iim::debug(iim::LEV3, iim::strprintf("V0=%d, V1=%d, H0=%d, H1=%d, D0=%d, D1=%d, *channels=%d, ret_type=%d, t0 = %d, t1 = %d", V0, V1, H0, H1, D0, D1, channels ? *channels : -1, ret_type, t0, t1).c_str(), __iim__current__function__); diff --git a/src/imagemanager/TimeSeries.h b/src/imagemanager/TimeSeries.h index 1878daaf..693e9907 100644 --- a/src/imagemanager/TimeSeries.h +++ b/src/imagemanager/TimeSeries.h @@ -12,19 +12,19 @@ class TimeSeries : public iim::VirtualVolume std::vector frames; // each time frame corresponds to a complete volumetric image // pure virtual method inherithed from abstract class - void initChannels() throw (iim::IOException); + void initChannels() ; public: //CONSTRUCTORS-DESTRUCTOR TimeSeries(void){} - TimeSeries(const char* rootDir, std::string frames_format = "") throw (iim::IOException); - virtual ~TimeSeries(void) throw (iim::IOException); + TimeSeries(const char* rootDir, std::string frames_format = "") ; + virtual ~TimeSeries(void) ; // get methods std::vector getFrames() {return frames;} - std::vector getActiveFrames() throw (iim::IOException); - VirtualVolume* getFrameAt(int t) throw (iim::IOException); + std::vector getActiveFrames() ; + VirtualVolume* getFrameAt(int t) ; iim::uint32 getNFrames(){return static_cast(frames.size());} // returns a unique ID that identifies the volume format @@ -49,14 +49,14 @@ class TimeSeries : public iim::VirtualVolume int getNACtiveChannels() { if(!frames.empty()) return frames[0]->getNACtiveChannels(); else return 0;} // set active channels (@OVERRIDES VirtualVolume.h by Alessandro on 2014-02-23) - // WARNING: caller loses ownership of array '_active' + // WARNING: caller loses ownership of array '_active' void setActiveChannels ( iim::uint32 *_active, int _n_active ); // pure virtual methods inherithed from abstract class - iim::real32 *loadSubvolume_to_real32(int V0,int V1, int H0, int H1, int D0, int D1) throw (iim::IOException); + iim::real32 *loadSubvolume_to_real32(int V0,int V1, int H0, int H1, int D0, int D1) ; iim::uint8 *loadSubvolume_to_UINT8(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1, - int *channels=0, int ret_type=iim::DEF_IMG_DEPTH) throw (iim::IOException); + int *channels=0, int ret_type=iim::DEF_IMG_DEPTH) ; }; #endif // TIMESERIES_H diff --git a/src/imagemanager/UnstitchedVolume.cpp b/src/imagemanager/UnstitchedVolume.cpp index 8d359a2e..fddda372 100644 --- a/src/imagemanager/UnstitchedVolume.cpp +++ b/src/imagemanager/UnstitchedVolume.cpp @@ -107,7 +107,7 @@ UnstitchedVolume::UnstitchedVolume(void) : VirtualVolume() } -UnstitchedVolume::UnstitchedVolume(const char* _root_dir, bool cacheEnabled, int _blending_algo) throw (IOException) +UnstitchedVolume::UnstitchedVolume(const char* _root_dir, bool cacheEnabled, int _blending_algo) : VirtualVolume(_root_dir), volume_external(false) { /**/iim::debug(iim::LEV3, strprintf("_root_dir=%s", _root_dir).c_str(), __iim__current__function__); @@ -225,7 +225,7 @@ UnstitchedVolume::UnstitchedVolume(const char* _root_dir, bool cacheEnabled, int } // constructor 2 @ADDED by Alessandro on 2014-04-18: takes vm::VirtualVolume in input -UnstitchedVolume::UnstitchedVolume(vm::VirtualVolume * _imported_volume, bool cacheEnabled, int _blending_algo) throw (iim::IOException) +UnstitchedVolume::UnstitchedVolume(vm::VirtualVolume * _imported_volume, bool cacheEnabled, int _blending_algo) : VirtualVolume(_imported_volume->getSTACKS_DIR()), volume(_imported_volume), volume_external(true) { /**/iim::debug(iim::LEV3, strprintf("_root_dir=%s", volume->getSTACKS_DIR()).c_str(), __iim__current__function__); @@ -331,7 +331,7 @@ UnstitchedVolume::UnstitchedVolume(vm::VirtualVolume * _imported_volume, bool ca cb = new iim::CacheBuffer(this); } -UnstitchedVolume::~UnstitchedVolume(void) throw (iim::IOException) +UnstitchedVolume::~UnstitchedVolume(void) { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); if ( stripesCorners ) { @@ -358,7 +358,7 @@ void UnstitchedVolume::init() /**/iim::debug(iim::LEV3, 0, __iim__current__function__); } -void UnstitchedVolume::initChannels ( ) throw (IOException) +void UnstitchedVolume::initChannels ( ) { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); } @@ -409,7 +409,7 @@ void UnstitchedVolume::extractCoordinates(Block* blk, int z, int* crd_1, int* cr } //loads given subvolume in a 1-D array of float -real32* UnstitchedVolume::internal_loadSubvolume_to_real32(int &VV0,int &VV1, int &HH0, int &HH1, int &DD0, int &DD1, int V0,int V1, int H0, int H1, int D0, int D1) throw (IOException) +real32* UnstitchedVolume::internal_loadSubvolume_to_real32(int &VV0,int &VV1, int &HH0, int &HH1, int &DD0, int &DD1, int V0,int V1, int H0, int H1, int D0, int D1) { /**/iim::debug(iim::LEV3, strprintf("V0=%d, V1=%d, H0=%d, H1=%d, D0=%d, D1=%d", V0, V1, H0, H1, D0, D1).c_str(), __iim__current__function__); @@ -898,7 +898,7 @@ real32* UnstitchedVolume::internal_loadSubvolume_to_real32(int &VV0,int &VV1, in } //loads given subvolume in a 1-D array of float -real32* UnstitchedVolume::loadSubvolume_to_real32(int V0,int V1, int H0, int H1, int D0, int D1) throw (IOException) +real32* UnstitchedVolume::loadSubvolume_to_real32(int V0,int V1, int H0, int H1, int D0, int D1) { //throw iim::IOException("Not yet implemented", __iom__current__function__); @@ -977,7 +977,7 @@ real32* UnstitchedVolume::loadSubvolume_to_real32(int V0,int V1, int H0, int H1, //loads given subvolume in a 1-D array of iim::uint8 while releasing stacks slices memory when they are no longer needed //---03 nov 2011: added color support -iim::uint8* UnstitchedVolume::loadSubvolume_to_UINT8(int V0,int V1, int H0, int H1, int D0, int D1, int *channels, int ret_type ) throw (IOException, iom::exception) +iim::uint8* UnstitchedVolume::loadSubvolume_to_UINT8(int V0,int V1, int H0, int H1, int D0, int D1, int *channels, int ret_type ) { /**/iim::debug(iim::LEV3, strprintf("V0=%d, V1=%d, H0=%d, H1=%d, D0=%d, D1=%d, *channels=%d, ret_type=%d", V0, V1, H0, H1, D0, D1, channels ? *channels : -1, ret_type).c_str(), __iim__current__function__); diff --git a/src/imagemanager/UnstitchedVolume.h b/src/imagemanager/UnstitchedVolume.h index 778f38c8..d4beedeb 100644 --- a/src/imagemanager/UnstitchedVolume.h +++ b/src/imagemanager/UnstitchedVolume.h @@ -99,23 +99,23 @@ class UnstitchedVolume : public iim::VirtualVolume void extractCoordinates(iim::Block* stk, int z, int* crd_1, int* crd_2, int* crd_3); // iannello returns the number of channels of images composing the volume - void initChannels ( ) throw (iim::IOException); + void initChannels ( ) ; //loads given subvolume in a 1-D array of iim::real32; since the loaded subvolume can have slightly different vertices, returns the actual //vertices of the subvolume in (VV0, VV1, HH0, HH1, DD0, DD1) iim::real32 *internal_loadSubvolume_to_real32(int &VV0, int &VV1, int &HH0, int &HH1, int &DD0, int &DD1, - int V0=-1, int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1) throw (iim::IOException); + int V0=-1, int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1) ; public: // constructor 1 (from source folder) - UnstitchedVolume(const char* _root_dir, bool cacheEnabled = true, int _blending_algo = S_SINUSOIDAL_BLENDING ) throw (iim::IOException); + UnstitchedVolume(const char* _root_dir, bool cacheEnabled = true, int _blending_algo = S_SINUSOIDAL_BLENDING ) ; // constructor 2 @ADDED by Alessandro on 2014-04-18: takes an external vm::VirtualVolume in input - UnstitchedVolume(vm::VirtualVolume * _imported_volume, bool cacheEnabled = true, int _blending_algo = S_SINUSOIDAL_BLENDING ) throw (iim::IOException); + UnstitchedVolume(vm::VirtualVolume * _imported_volume, bool cacheEnabled = true, int _blending_algo = S_SINUSOIDAL_BLENDING ) ; // destructor - virtual ~UnstitchedVolume(void) throw (iim::IOException); + virtual ~UnstitchedVolume(void) ; //GET methods float getVXL_1(){return VXL_V;} @@ -147,11 +147,11 @@ class UnstitchedVolume : public iim::VirtualVolume void print(); //loads given subvolume in a 1-D array of iim::real32 - iim::real32 *loadSubvolume_to_real32(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1) throw (iim::IOException); + iim::real32 *loadSubvolume_to_real32(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1) ; //loads given subvolume in a 1-D array of iim::uint8 while releasing stacks slices memory when they are no longer needed iim::uint8 *loadSubvolume_to_UINT8(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1, - int *channels=0, int ret_type=iim::DEF_IMG_DEPTH) throw (iim::IOException, iom::exception); + int *channels=0, int ret_type=iim::DEF_IMG_DEPTH) ; // needed to enable the detection by the factory of volume format through use of the default constructor friend class iim::VirtualVolume; diff --git a/src/imagemanager/VirtualVolume.cpp b/src/imagemanager/VirtualVolume.cpp index de2bfe0d..1756d980 100644 --- a/src/imagemanager/VirtualVolume.cpp +++ b/src/imagemanager/VirtualVolume.cpp @@ -112,7 +112,7 @@ void VirtualVolume::setDEPTH_CONV_ALGO(int algoID) { **************************************************************************************************************/ void VirtualVolume::saveImage(std::string img_path, real32* raw_img, int raw_img_height, int raw_img_width, int start_height, int end_height, int start_width, int end_width, - const char* img_format, int img_depth) throw (IOException, iom::exception) + const char* img_format, int img_depth) { /**/iim::debug(iim::LEV3, strprintf("img_path=%s, raw_img_height=%d, raw_img_width=%d, start_height=%d, end_height=%d, start_width=%d, end_width=%d", img_path.c_str(), raw_img_height, raw_img_width, start_height, end_height, start_width, end_width).c_str(), __iim__current__function__); @@ -214,7 +214,7 @@ void VirtualVolume::saveImage(std::string img_path, real32* raw_img, int raw_img **************************************************************************************************************/ void VirtualVolume::saveImage_from_UINT8 (std::string img_path, uint8* raw_ch1, uint8* raw_ch2, uint8* raw_ch3, int raw_img_height, int raw_img_width, int start_height, int end_height, int start_width, - int end_width, const char* img_format, int img_depth ) throw (IOException, iom::exception) + int end_width, const char* img_format, int img_depth ) { /**/iim::debug(iim::LEV3, strprintf("img_path=%s, raw_img_height=%d, raw_img_width=%d, start_height=%d, end_height=%d, start_width=%d, end_width=%d, img_format=%s, img_depth=%d", img_path.c_str(), raw_img_height, raw_img_width, start_height, end_height, start_width, end_width, img_format, img_depth).c_str(), __iim__current__function__); @@ -457,7 +457,7 @@ void VirtualVolume::saveImage_from_UINT8 (std::string img_path, uint8* raw_ch1, void VirtualVolume::saveImage_to_Vaa3DRaw(int slice, std::string img_path, real32* raw_img, int raw_img_height, int raw_img_width, int start_height, int end_height, int start_width, int end_width, const char* img_format, int img_depth - ) throw (IOException, iom::exception) + ) { /**/iim::debug(iim::LEV3, strprintf("img_path=%s, raw_img_height=%d, raw_img_width=%d, start_height=%d, end_height=%d, start_width=%d, end_width=%d", img_path.c_str(), raw_img_height, raw_img_width, start_height, end_height, start_width, end_width).c_str(), __iim__current__function__); @@ -561,7 +561,7 @@ void VirtualVolume::saveImage_to_Vaa3DRaw(int slice, std::string img_path, real3 **************************************************************************************************************/ void VirtualVolume::saveImage_from_UINT8_to_Vaa3DRaw (int slice, std::string img_path, uint8** raw_ch, int n_chans, sint64 offset, int raw_img_height, int raw_img_width, int start_height, int end_height, int start_width, - int end_width, const char* img_format, int img_depth ) throw (IOException, iom::exception) + int end_width, const char* img_format, int img_depth ) { /**/iim::debug(iim::LEV3, strprintf("img_path=%s, raw_img_height=%d, raw_img_width=%d, start_height=%d, end_height=%d, start_width=%d, end_width=%d", img_path.c_str(), raw_img_height, raw_img_width, start_height, end_height, start_width, end_width).c_str(), __iim__current__function__); @@ -653,7 +653,7 @@ void VirtualVolume::saveImage_from_UINT8_to_Vaa3DRaw (int slice, std::string img **************************************************************************************************************/ void VirtualVolume::saveImage_from_UINT8_to_Tiff3D (int slice, std::string img_path, uint8** raw_ch, int n_chans, sint64 offset, int raw_img_height, int raw_img_width, int start_height, int end_height, int start_width, - int end_width, const char* img_format, int img_depth, void *fhandle, int n_pages, bool do_open ) throw (IOException, iom::exception) + int end_width, const char* img_format, int img_depth, void *fhandle, int n_pages, bool do_open ) { /**/iim::debug(iim::LEV3, strprintf("img_path=%s, raw_img_height=%d, raw_img_width=%d, start_height=%d, end_height=%d, start_width=%d, end_width=%d", img_path.c_str(), raw_img_height, raw_img_width, start_height, end_height, start_width, end_width).c_str(), __iim__current__function__); @@ -1180,7 +1180,7 @@ void VirtualVolume::halveSample2D_UINT8 ( uint8** img, int height, int width, in } // 2014-04-14. Alessandro. @ADDED 'instance_format' method with inputs = {path, format}. -VirtualVolume* VirtualVolume::instance_format(const char* path, std::string format) throw (iim::IOException, iom::exception) +VirtualVolume* VirtualVolume::instance_format(const char* path, std::string format) { /**/iim::debug(iim::LEV3, strprintf("path = \"%s\", format = \"%s\"", path, format.c_str()).c_str(), __iim__current__function__); @@ -1228,7 +1228,7 @@ VirtualVolume* VirtualVolume::instance_format(const char* path, std::string form // tries to automatically detect the volume format and returns the imported volume if succeeds (otherwise returns 0) // WARNING: all metadata files (if needed by that format) are assumed to be present. Otherwise, that format will be skipped. -VirtualVolume* VirtualVolume::instance(const char* path) throw (IOException, iom::exception) +VirtualVolume* VirtualVolume::instance(const char* path) { /**/iim::debug(iim::LEV3, strprintf("path = \"%s\"", path).c_str(), __iim__current__function__); @@ -1365,7 +1365,7 @@ VirtualVolume* VirtualVolume::instance(const char* path) throw (IOException, iom // this version if "instance" methods should be used to create a BDVVolume since at least the 'res' parameter is needed -VirtualVolume* VirtualVolume::instance(const char* fname, int res, void *descr, int timepoint) throw (iim::IOException) { +VirtualVolume* VirtualVolume::instance(const char* fname, int res, void *descr, int timepoint) { /**/iim::debug(iim::LEV3, strprintf("fname = \"%s\", res = %d, descr = %p", fname, res, descr).c_str(), __iim__current__function__); return new BDVVolume(fname,res,timepoint,descr); @@ -1376,7 +1376,7 @@ VirtualVolume* VirtualVolume::instance(const char* fname, int res, void *descr, // WARNING: no assumption is made on metadata files, which are possibly (re-)generated using the additional informations provided. VirtualVolume* VirtualVolume::instance(const char* path, std::string format, iim::axis AXS_1, iim::axis AXS_2, iim::axis AXS_3, /* = iim::axis_invalid */ - float VXL_1 /* = 0 */, float VXL_2 /* = 0 */, float VXL_3 /* = 0 */) throw (iim::IOException, iom::exception) + float VXL_1 /* = 0 */, float VXL_2 /* = 0 */, float VXL_3 /* = 0 */) { /**/iim::debug(iim::LEV3, strprintf("path = \"%s\", format = %s, AXS_1 = %s, AXS_2 = %s, AXS_3 = %s, VXL_1 = %.2f, VXL_2 = %.2f, VXL_3 = %.2f", path, format.c_str(), axis_to_str(AXS_1), axis_to_str(AXS_2), axis_to_str(AXS_3), @@ -1452,7 +1452,7 @@ void VirtualVolume::setActiveChannels ( uint32 *_active, int _n_active ) } // returns true if the given format is hierarchical, i.e. if it consists of nested folders (1 level at least) -bool VirtualVolume::isHierarchical(std::string format) throw (iim::IOException) +bool VirtualVolume::isHierarchical(std::string format) { /**/iim::debug(iim::LEV3, strprintf("format = %s", format.c_str()).c_str(), __iim__current__function__); diff --git a/src/imagemanager/VirtualVolume.h b/src/imagemanager/VirtualVolume.h index aaa55677..c2d780ba 100644 --- a/src/imagemanager/VirtualVolume.h +++ b/src/imagemanager/VirtualVolume.h @@ -98,7 +98,7 @@ class iim::VirtualVolume { public: //CONSTRUCTORS-DESTRUCTOR VirtualVolume(); - VirtualVolume(const char* _root_dir, float VXL_1=0, float VXL_2=0, float VXL_3=0) throw (iim::IOException) + VirtualVolume(const char* _root_dir, float VXL_1=0, float VXL_2=0, float VXL_3=0) { this->root_dir = new char[strlen(_root_dir)+1]; @@ -122,18 +122,18 @@ class iim::VirtualVolume { depth_conv_algo = DEPTH_CONVERSION_DEFAULT; } - virtual ~VirtualVolume() throw (iim::IOException){ + virtual ~VirtualVolume() { if(root_dir) delete[] root_dir; if(active) delete []active; } - virtual void initChannels ( ) throw (iim::IOException) = 0; + virtual void initChannels ( ) = 0; //loads given subvolume in a 1-D array of iim::real32 while releasing stacks slices memory when they are no longer needed - virtual iim::real32 *loadSubvolume_to_real32(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1) throw (iim::IOException) = 0; + virtual iim::real32 *loadSubvolume_to_real32(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1) = 0; /* @ADDED by Giulio on 2015-12-06: @@ -153,7 +153,7 @@ class iim::VirtualVolume { * number of channels that have been previously set to be returned by method 'setActiveChannels' */ virtual iim::uint8 *loadSubvolume_to_UINT8(int V0=-1,int V1=-1, int H0=-1, int H1=-1, int D0=-1, int D1=-1, - int *channels=0, int ret_type=iim::DEF_IMG_DEPTH) throw (iim::IOException, iom::exception) = 0; + int *channels=0, int ret_type=iim::DEF_IMG_DEPTH) = 0; // ******GET METHODS****** float getORG_V() {return ORG_V;} @@ -162,7 +162,7 @@ class iim::VirtualVolume { int getDIM_V() {return DIM_V;} int getDIM_H() {return DIM_H;} int getDIM_D() {return DIM_D;} - int getDIM(iim::axis dir) throw (iim::IOException) + int getDIM(iim::axis dir) { if(dir == iim::vertical || dir == iim::inv_vertical) return DIM_V; @@ -244,7 +244,7 @@ class iim::VirtualVolume { static void saveImage(std::string img_path, iim::real32* raw_img, int raw_img_height, int raw_img_width, int start_height = 0, int end_height = - 1, int start_width = 0, int end_width = - 1, const char* img_format = iim::DEF_IMG_FORMAT.c_str(), int img_depth = iim::DEF_IMG_DEPTH ) - throw (iim::IOException, iom::exception); + ; /************************************************************************************************************* * Save image method from iim::uint8 raw data. <> parameters are mandatory, while [] are optional. @@ -271,7 +271,7 @@ class iim::VirtualVolume { iim::uint8* raw_ch1, iim::uint8* raw_ch2, iim::uint8* raw_ch3, int raw_img_height, int raw_img_width, int start_height=0, int end_height =-1, int start_width=0, int end_width=-1, - const char* img_format = iim::DEF_IMG_FORMAT.c_str(), int img_depth = iim::DEF_IMG_DEPTH ) throw (iim::IOException, iom::exception); + const char* img_format = iim::DEF_IMG_FORMAT.c_str(), int img_depth = iim::DEF_IMG_DEPTH ) ; /************************************************************************************************************* @@ -288,7 +288,7 @@ class iim::VirtualVolume { int start_height = 0, int end_height = - 1, int start_width = 0, int end_width = - 1, const char* img_format = iim::DEF_IMG_FORMAT.c_str(), int img_depth = iim::DEF_IMG_DEPTH ) - throw (iim::IOException, iom::exception); + ; /************************************************************************************************************* * Save image method from iim::uint8 raw data to Vaa3D raw format. <> parameters are mandatory, while [] are optional. @@ -308,7 +308,7 @@ class iim::VirtualVolume { iim::uint8** raw_ch, int n_chans, iim::sint64 offset, int raw_img_height, int raw_img_width, int start_height=0, int end_height =-1, int start_width=0, int end_width=-1, - const char* img_format = iim::DEF_IMG_FORMAT.c_str(), int img_depth = iim::DEF_IMG_DEPTH ) throw (iim::IOException, iom::exception); + const char* img_format = iim::DEF_IMG_FORMAT.c_str(), int img_depth = iim::DEF_IMG_DEPTH ) ; @@ -337,7 +337,7 @@ class iim::VirtualVolume { int raw_img_height, int raw_img_width, int start_height=0, int end_height =-1, int start_width=0, int end_width=-1, const char* img_format = iim::DEF_IMG_FORMAT.c_str(), int img_depth = iim::DEF_IMG_DEPTH, - void *fhandle = 0, int n_pages = -1, bool do_open = true ) throw (iim::IOException, iom::exception); + void *fhandle = 0, int n_pages = -1, bool do_open = true ) ; /************************************************************************************************************* * Performs downsampling at a halved frequency on the given 3D image. The given image is overwritten in order @@ -365,19 +365,19 @@ class iim::VirtualVolume { // tries to automatically detect the volume format and returns the imported volume if succeeds (otherwise returns 0) // WARNING: all metadata files (if needed by that format) are assumed to be present. Otherwise, that format will be skipped. - static VirtualVolume* instance(const char* path) throw (iim::IOException, iom::exception); + static VirtualVolume* instance(const char* path) ; // should be used to instantiate BDV HDF5 volumes - static VirtualVolume* instance(const char* fname, int res, void *descr, int timepoint = 0) throw (iim::IOException); + static VirtualVolume* instance(const char* fname, int res, void *descr, int timepoint = 0) ; // returns the imported volume if succeeds (otherwise returns 0) // WARNING: no assumption is made on metadata files, which are possibly (re-)generated using the additional informations provided. static VirtualVolume* instance(const char* path, std::string format, iim::axis AXS_1 = iim::axis_invalid, iim::axis AXS_2 = iim::axis_invalid, iim::axis AXS_3 = iim::axis_invalid, - float VXL_1=0.0f, float VXL_2=0.0f, float VXL_3=0.0f) throw (iim::IOException, iom::exception); + float VXL_1=0.0f, float VXL_2=0.0f, float VXL_3=0.0f) ; // 2015-04-14. Alessandro. @ADDED 'instance_format' method with inputs = {path, format}. - static VirtualVolume* instance_format(const char* path, std::string format) throw (iim::IOException, iom::exception); + static VirtualVolume* instance_format(const char* path, std::string format) ; // checks whether the volume stored in "path" can be imported directly (i.e., w/o additional metadata provided by the user) static bool isDirectlyImportable(const char* path) @@ -394,7 +394,7 @@ class iim::VirtualVolume { } // returns true if the given format is hierarchical, i.e. if it consists of nested folders (1 level at least) - static bool isHierarchical(std::string format) throw (iim::IOException); + static bool isHierarchical(std::string format) ; }; #endif diff --git a/src/imagemanager/imBlock.cpp b/src/imagemanager/imBlock.cpp index 7aa488c9..54a7345e 100644 --- a/src/imagemanager/imBlock.cpp +++ b/src/imagemanager/imBlock.cpp @@ -89,7 +89,7 @@ Block::Block(VirtualVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, char* _D init(); } -Block::Block(VirtualVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, FILE* bin_file) throw (IOException) +Block::Block(VirtualVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, FILE* bin_file) { /**/iim::debug(iim::LEV3, strprintf("_ROW_INDEX=%d, _COL_INDEX=%d", _ROW_INDEX, _COL_INDEX).c_str(), __iim__current__function__); @@ -170,7 +170,7 @@ void Block::binarizeInto(FILE* file) fwrite(&N_BYTESxCHAN, sizeof(uint32), 1, file); } -void Block::unBinarizeFrom(FILE* file) throw (IOException) +void Block::unBinarizeFrom(FILE* file) { /**/iim::debug(iim::LEV3, strprintf("ROW_INDEX=%d, COL_INDEX=%d", ROW_INDEX, COL_INDEX).c_str(), __iim__current__function__); diff --git a/src/imagemanager/imBlock.h b/src/imagemanager/imBlock.h index 0541b2d6..9b629a4a 100644 --- a/src/imagemanager/imBlock.h +++ b/src/imagemanager/imBlock.h @@ -62,7 +62,7 @@ class iim::Block public: - Block(iim::VirtualVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, FILE* bin_file) throw (iim::IOException); + Block(iim::VirtualVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, FILE* bin_file) ; Block(iim::VirtualVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, char* _DIR_NAME); ~Block(void); @@ -94,7 +94,7 @@ class iim::Block //binarizing-unbinarizing methods void binarizeInto(FILE* file); - void unBinarizeFrom(FILE* file) throw (iim::IOException); + void unBinarizeFrom(FILE* file) ; //returns a pointer to the intersection rectangle if the given area intersects current stack, otherwise returns NULL Rect_t* Intersects(const Rect_t& area); diff --git a/src/iomanager/IOPluginAPI.h b/src/iomanager/IOPluginAPI.h index d2024251..b9435ec7 100644 --- a/src/iomanager/IOPluginAPI.h +++ b/src/iomanager/IOPluginAPI.h @@ -94,7 +94,7 @@ class iomanager::IOPlugin2D : public iomanager::IOPlugin int & img_bytes_x_chan, // (OUTPUT) number of bytes per channel int & img_chans, // (OUTPUT) number of channels const std::string & params = iom::IMIN_PLUGIN_PARAMS) // (INPUT) additional parameters - throw (iom::exception) = 0; + = 0; /************************************************************************************************ * Read 2D image data @@ -116,7 +116,7 @@ class iomanager::IOPlugin2D : public iomanager::IOPlugin int & img_chans, // (INPUT/OUTPUT) number of channels to be read unsigned char *data = 0, // (INPUT) image data const std::string & params = iom::IMIN_PLUGIN_PARAMS) // (INPUT) additional parameters - throw (iom::exception) = 0; + = 0; /************************************************************************************************ * Write 2D image data into a single (2D) image file @@ -138,7 +138,7 @@ class iomanager::IOPlugin2D : public iomanager::IOPlugin int x0 = -1, // (INPUT) region of interest [x0,x1][y0,y1] to be set on the image int x1 = -1, // (INPUT) region of interest [x0,x1][y0,y1] to be set on the image const std::string & params = iom::IMOUT_PLUGIN_PARAMS) // (INPUT) additional parameters - throw (iom::exception) = 0; + = 0; /************************************************************************************************ * Return plugin description @@ -172,7 +172,7 @@ class iomanager::IOPlugin2D : public iomanager::IOPlugin bool is_sparse = false, // (INPUT) if true, 'files' is a sparse array and null entries should be treated as empty (black) images iom::channel chan = CHANS, // (INPUT) channel selection { ALL, R, G, B }. const std::string & params = iom::IMIN_PLUGIN_PARAMS) // (INPUT) additional parameters - throw (iom::exception) = 0; + = 0; // write 2D image data into a single (2D) image file @@ -189,7 +189,7 @@ class iomanager::IOPlugin2D : public iomanager::IOPlugin int x1 = -1, // (INPUT) region of interest [x0,x1][y0,y1] to be set on the image int bpp = iom::DEF_BPP, // (INPUT) color depth (bits per pixel) const std::string & params = iom::IMOUT_PLUGIN_PARAMS) // (INPUT) additional parameters - throw (iom::exception) = 0; + = 0; }; @@ -211,7 +211,7 @@ class iomanager::IOPlugin3D : public iomanager::IOPlugin int & img_bytes_x_chan, // (OUTPUT) number of bytes per channel int & img_chans, // (OUTPUT) number of channels const std::string & params = iom::IMIN_PLUGIN_PARAMS) // additional parameters - throw (iom::exception) = 0; + = 0; /************************************************************************************************ * Read 3D image data @@ -237,7 +237,7 @@ class iomanager::IOPlugin3D : public iomanager::IOPlugin int z0 = -1, // (INPUT) region of interest [x0,x1)[y0,y1)[z0,z1) to be set on the image int z1 = -1, // (INPUT) region of interest [x0,x1)[y0,y1)[z0,z1) to be set on the image const std::string & params = iom::IMIN_PLUGIN_PARAMS) // (INPUT) additional parameters - throw (iom::exception) = 0; + = 0; /************************************************************************************************ * Write 3D image data into a single (3D) image file @@ -264,7 +264,7 @@ class iomanager::IOPlugin3D : public iomanager::IOPlugin int x0 = -1, // (INPUT) region of interest [x0,x1)[y0,y1)[z0,z1) to be set on the image int x1 = -1, // (INPUT) region of interest [x0,x1)[y0,y1)[z0,z1) to be set on the image const std::string & params = iom::IMOUT_PLUGIN_PARAMS) // (INPUT) additional parameters - throw (iom::exception) = 0; + = 0; /************************************************************************************************ * Create an empty 3D image @@ -281,7 +281,7 @@ class iomanager::IOPlugin3D : public iomanager::IOPlugin int img_bytes_x_chan, // (INPUT) number of bytes per channel int img_chans, // (INPUT) number of channels const std::string & params = iom::IMOUT_PLUGIN_PARAMS) // (INPUT) additional parameters - throw (iom::exception) = 0; + = 0; /************************************************************************************************ * Append a single slice at the bottom of a 3D image file @@ -308,7 +308,7 @@ class iomanager::IOPlugin3D : public iomanager::IOPlugin int x1 = -1, // (INPUT) region of interest [x0,x1)[y0,y1) to be set on the image int slice = -1, // (INPUT) slice index const std::string & params = iom::IMOUT_PLUGIN_PARAMS) // (INPUT) additional parameters - throw (iom::exception) = 0; + = 0; /************************************************************************************************ * Return plugin description @@ -341,7 +341,7 @@ class iomanager::IOPlugin3D : public iomanager::IOPlugin int first, // (INPUT) selects a range [first, last] of files to be loaded int last, // (INPUT) selects a range [first, last] of files to be loaded const std::string & params = iom::IMIN_PLUGIN_PARAMS) // (INPUT) additional parameters - throw (iom::exception) = 0; + = 0; }; @@ -382,13 +382,13 @@ class iomanager::IOPluginFactory } // plugin instantiation - static IOPlugin2D* getPlugin2D(std::string id) throw (iom::exception) + static IOPlugin2D* getPlugin2D(std::string id) { if(instance()->registry2D.find(id) == instance()->registry2D.end()) throw iom::exception(iom::strprintf("Cannot find 2D I/O plugin \"%s\" or it is not a 2D I/O plugin", id.c_str()).c_str()); return (instance()->registry2D[id])(); } - static IOPlugin3D* getPlugin3D(std::string id) throw (iom::exception) + static IOPlugin3D* getPlugin3D(std::string id) { if(instance()->registry3D.find(id) == instance()->registry3D.end()) throw iom::exception(iom::strprintf("Cannot find 3D I/O plugin \"%s\" or it is not a 3D I/O plugin", id.c_str()).c_str()); @@ -494,7 +494,7 @@ namespace iomanager \ int & img_bytes_x_chan, \ int & img_chans, \ const std::string & params = iom::IMIN_PLUGIN_PARAMS) \ - throw (iom::exception); \ + ; \ \ virtual unsigned char * \ readData( \ @@ -505,7 +505,7 @@ namespace iomanager \ int & img_chans, \ unsigned char *data = 0, \ const std::string & params = iom::IMIN_PLUGIN_PARAMS) \ - throw (iom::exception); \ + ; \ \ virtual void \ writeData( \ @@ -520,7 +520,7 @@ namespace iomanager \ int x0 = -1, \ int x1 = -1, \ const std::string & params = iom::IMOUT_PLUGIN_PARAMS) \ - throw (iom::exception); \ + ; \ \ virtual std::string desc(); \ \ @@ -538,7 +538,7 @@ namespace iomanager \ bool is_sparse = false, \ iom::channel chan = CHANS, \ const std::string & params = iom::IMIN_PLUGIN_PARAMS) \ - throw (iom::exception); \ + ; \ \ virtual void \ writeData( \ @@ -553,7 +553,7 @@ namespace iomanager \ int x1 = -1, \ int bpp = iom::DEF_BPP, \ const std::string & params = iom::IMOUT_PLUGIN_PARAMS) \ - throw (iom::exception); \ + ; \ }; \ } \ \ @@ -588,7 +588,7 @@ namespace iomanager \ int & img_bytes_x_chan, \ int & img_chans, \ const std::string & params = IMIN_PLUGIN_PARAMS) \ - throw (iom::exception); \ + ; \ \ virtual unsigned char * \ readData( \ @@ -602,7 +602,7 @@ namespace iomanager \ int z0 = -1, \ int z1 = -1, \ const std::string & params = iom::IMIN_PLUGIN_PARAMS) \ - throw (iom::exception); \ + ; \ \ virtual void \ writeData( \ @@ -620,7 +620,7 @@ namespace iomanager \ int x0 = -1, \ int x1 = -1, \ const std::string & params = iom::IMOUT_PLUGIN_PARAMS) \ - throw (iom::exception); \ + ; \ \ virtual void \ create3Dimage( \ @@ -631,7 +631,7 @@ namespace iomanager \ int img_bytes_x_chan, \ int img_chans, \ const std::string & params = iom::IMOUT_PLUGIN_PARAMS) \ - throw (iom::exception); \ + ; \ \ virtual void \ appendSlice( \ @@ -647,7 +647,7 @@ namespace iomanager \ int x1 = -1, \ int slice = -1, \ const std::string & params = iom::IMOUT_PLUGIN_PARAMS) \ - throw (iom::exception); \ + ; \ \ virtual std::string desc(); \ \ @@ -664,7 +664,7 @@ namespace iomanager \ int first, \ int last, \ const std::string & params = IMIN_PLUGIN_PARAMS) \ - throw (iom::exception); \ + ; \ }; \ } \ \ diff --git a/src/iomanager/plugins/IMS_HDF5/IMS_HDF5.cpp b/src/iomanager/plugins/IMS_HDF5/IMS_HDF5.cpp index e79e5b51..f7187fb9 100755 --- a/src/iomanager/plugins/IMS_HDF5/IMS_HDF5.cpp +++ b/src/iomanager/plugins/IMS_HDF5/IMS_HDF5.cpp @@ -103,7 +103,7 @@ void int & img_bytes_x_chan, // (OUTPUT) number of bytes per channel int & img_chans, // (OUTPUT) number of channels const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { //throw iom::exception(iom::strprintf("not implemented yet"), __iom__current__function__); @@ -159,7 +159,7 @@ unsigned char * // (OUTPUT) buffer containing the read image data int z0, // (INPUT) region of interest [x0,x1)[y0,y1)[z0,z1) to be set on the image int z1, // (INPUT) region of interest [x0,x1)[y0,y1)[z0,z1) to be set on the image const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { //throw iom::exception(iom::strprintf("not implemented yet"), __iom__current__function__); @@ -288,7 +288,7 @@ void int x0, // (INPUT) region of interest [x0,x1)[y0,y1)[z0,z1) to be set on the image int x1, // (INPUT) region of interest [x0,x1)[y0,y1)[z0,z1) to be set on the image const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { throw iom::exception(iom::strprintf("not implemented yet"), __iom__current__function__); @@ -307,7 +307,7 @@ void int img_bytes_x_chan, // (INPUT) number of bytes per channel int img_chans, // (INPUT) number of channels const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { //throw iom::exception(iom::strprintf("not implemented yet"), __iom__current__function__); @@ -387,7 +387,7 @@ void int x1, // (INPUT) region of interest [x0,x1)[y0,y1) to be set on the image int slice, // (INPUT) slice index const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { throw iom::exception(iom::strprintf("not implemented yet"), __iom__current__function__); @@ -470,7 +470,7 @@ void int first, // selects a range [first, last] of files to be loaded int last, // selects a range [first, last] of files to be loaded const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { throw iom::exception(iom::strprintf("no more available"), __iom__current__function__); diff --git a/src/iomanager/plugins/dcimg/dcimg.cpp b/src/iomanager/plugins/dcimg/dcimg.cpp index bffe67bc..7910b200 100755 --- a/src/iomanager/plugins/dcimg/dcimg.cpp +++ b/src/iomanager/plugins/dcimg/dcimg.cpp @@ -98,7 +98,7 @@ void int & img_bytes_x_chan, // (OUTPUT) number of bytes per channel int & img_chans, // (OUTPUT) number of channels const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { //throw iom::exception(iom::strprintf("not implemented yet"), __iom__current__function__); @@ -184,7 +184,7 @@ unsigned char * // (OUTPUT) buffer containing the read image data int z0, // (INPUT) region of interest [x0,x1)[y0,y1)[z0,z1) to be set on the image int z1, // (INPUT) region of interest [x0,x1)[y0,y1)[z0,z1) to be set on the image const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { //throw iom::exception(iom::strprintf("not implemented yet"), __iom__current__function__); @@ -343,7 +343,7 @@ void int x0, // (INPUT) region of interest [x0,x1)[y0,y1)[z0,z1) to be set on the image int x1, // (INPUT) region of interest [x0,x1)[y0,y1)[z0,z1) to be set on the image const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { throw iom::exception(iom::strprintf("not implemented yet"), __iom__current__function__); @@ -362,7 +362,7 @@ void int img_bytes_x_chan, // (INPUT) number of bytes per channel int img_chans, // (INPUT) number of channels const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { throw iom::exception(iom::strprintf("not implemented yet"), __iom__current__function__); @@ -386,7 +386,7 @@ void int x1, // (INPUT) region of interest [x0,x1)[y0,y1) to be set on the image int slice, // (INPUT) slice index const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { throw iom::exception(iom::strprintf("not implemented yet"), __iom__current__function__); @@ -416,7 +416,7 @@ void int first, // selects a range [first, last] of files to be loaded int last, // selects a range [first, last] of files to be loaded const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { throw iom::exception(iom::strprintf("no more available"), __iom__current__function__); diff --git a/src/iomanager/plugins/exampleplugin2D/exampleplugin2D.cpp b/src/iomanager/plugins/exampleplugin2D/exampleplugin2D.cpp index 7a5036bd..978740c5 100755 --- a/src/iomanager/plugins/exampleplugin2D/exampleplugin2D.cpp +++ b/src/iomanager/plugins/exampleplugin2D/exampleplugin2D.cpp @@ -82,7 +82,7 @@ void int & img_bytes_x_chan, // (OUTPUT) number of bytes per channel int & img_chans, // (OUTPUT) number of channels const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { /**/iom::debug(iom::LEV3, iom::strprintf("img_path = \"%s\", params = \"%s\"",img_path.c_str(), params.c_str()).c_str(), __iom__current__function__); @@ -123,7 +123,7 @@ unsigned char * // (OUTPUT) a buffer storing the 2D image int & img_chans, // (INPUT/OUTPUT) number of channels to be read unsigned char *data, // (INPUT) image data const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { throw iom::exception(iom::strprintf("not implemented yet"), __iom__current__function__); @@ -145,7 +145,7 @@ void int x0, // (INPUT) region of interest [x0,x1][y0,y1] to be set on the image int x1, // (INPUT) region of interest [x0,x1][y0,y1] to be set on the image const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { throw iom::exception(iom::strprintf("not implemented yet"), __iom__current__function__); } @@ -162,7 +162,7 @@ iom::real_t* // (OUTPUT) a [0.0,1.0]-valued array storing the 3D image in c bool is_sparse /*= false*/, // (INPUT) if true, 'files' is a sparse array and null entries should be treated as empty (black) images iom::channel chan, // (INPUT) channel selection { ALL, R, G, B }. const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { throw iom::exception(iom::strprintf("not implemented yet (params = \"%s\")", params.c_str()), __iom__current__function__); @@ -185,7 +185,7 @@ void int x1, // (INPUT) region of interest [x0,x1][y0,y1] to be set on the image int bpp, // (INPUT) color depth (bits per pixel) const std::string & params) // (INPUT) additional parameters - throw (iom::exception) + { throw iom::exception(iom::strprintf("not implemented yet (params = \"%s\")", params.c_str()), __iom__current__function__); diff --git a/src/iomanager/plugins/tiff2D/tiff2D.cpp b/src/iomanager/plugins/tiff2D/tiff2D.cpp index 1c1d5f6c..8ee88479 100644 --- a/src/iomanager/plugins/tiff2D/tiff2D.cpp +++ b/src/iomanager/plugins/tiff2D/tiff2D.cpp @@ -93,7 +93,7 @@ void int & img_bytes_x_chan, // (OUTPUT) number of bytes per channel int & img_chans, // (OUTPUT) number of channels const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { /**/iom::debug(iom::LEV3, iom::strprintf("img_path = \"%s\", params = \"%s\"",img_path.c_str(), params.c_str()).c_str(), __iom__current__function__); @@ -156,7 +156,7 @@ unsigned char * // (OUTPUT) a buffer storing the 2D image int & img_chans, // (INPUT/OUTPUT) number of channels to be read unsigned char *data, // (INPUT) image data const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { //throw iom::exception(iom::strprintf("not implemented yet"), __iom__current__function__); @@ -214,7 +214,7 @@ void int x0, // (INPUT) region of interest [x0,x1][y0,y1] to be set on the image int x1, // (INPUT) region of interest [x0,x1][y0,y1] to be set on the image const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { //throw iom::exception(iom::strprintf("not implemented yet"), __iom__current__function__); @@ -301,7 +301,7 @@ iom::real_t* // (OUTPUT) a [0.0,1.0]-valued array storing the 3D image in c bool is_sparse /*= false*/, // (INPUT) if true, 'files' is a sparse array and null entries should be treated as empty (black) images iom::channel chan, // (INPUT) channel selection { ALL, R, G, B }. const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { throw iom::exception(iom::strprintf("no more available"), __iom__current__function__); @@ -505,7 +505,7 @@ void int x1, // (INPUT) region of interest [x0,x1][y0,y1] to be set on the image int bpp, // (INPUT) color depth (bits per pixel) const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { throw iom::exception(iom::strprintf("no more available"), __iom__current__function__); diff --git a/src/iomanager/plugins/tiff3D/tiff3D.cpp b/src/iomanager/plugins/tiff3D/tiff3D.cpp index f3c40604..0486da20 100755 --- a/src/iomanager/plugins/tiff3D/tiff3D.cpp +++ b/src/iomanager/plugins/tiff3D/tiff3D.cpp @@ -90,7 +90,7 @@ void int & img_bytes_x_chan, // (OUTPUT) number of bytes per channel int & img_chans, // (OUTPUT) number of channels const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { /**/iom::debug(iom::LEV3, iom::strprintf("img_path = %s, img_width = %d, img_height = %d, img_depth = %d, img_bytes_x_chan = %d, img_chans = %d, params = \"%s\"", img_path.c_str(), img_width, img_height, img_depth, img_bytes_x_chan, img_chans, params.c_str()).c_str(), __iom__current__function__); @@ -148,7 +148,7 @@ unsigned char * // (OUTPUT) buffer containing the read image data int z0, // (INPUT) region of interest [x0,x1)[y0,y1)[z0,z1) to be set on the image int z1, // (INPUT) region of interest [x0,x1)[y0,y1)[z0,z1) to be set on the image const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { //throw iom::exception(iom::strprintf("not implemented yet"), __iom__current__function__); @@ -216,7 +216,7 @@ void int x0, // (INPUT) region of interest [x0,x1)[y0,y1)[z0,z1) to be set on the image int x1, // (INPUT) region of interest [x0,x1)[y0,y1)[z0,z1) to be set on the image const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { //throw iom::exception(iom::strprintf("not implemented yet"), __iom__current__function__); @@ -287,7 +287,7 @@ void int img_bytes_x_chan, // (INPUT) number of bytes per channel int img_chans, // (INPUT) number of channels const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { //throw iom::exception(iom::strprintf("not implemented yet"), __iom__current__function__); @@ -321,7 +321,7 @@ void int x1, // (INPUT) region of interest [x0,x1)[y0,y1) to be set on the image int slice, // (INPUT) slice index const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { //throw iom::exception(iom::strprintf("not implemented yet"), __iom__current__function__); @@ -379,7 +379,7 @@ void int first, // selects a range [first, last] of files to be loaded int last, // selects a range [first, last] of files to be loaded const std::string & params) // (INPUT) additional parameters -throw (iom::exception) + { throw iom::exception(iom::strprintf("no more available"), __iom__current__function__); diff --git a/src/stitcher/Displacement.cpp b/src/stitcher/Displacement.cpp index f3f599db..43fb7b17 100644 --- a/src/stitcher/Displacement.cpp +++ b/src/stitcher/Displacement.cpp @@ -40,7 +40,7 @@ Displacement::Displacement(void) VHD_def_coords[0] = VHD_def_coords[1] = VHD_def_coords [2] = std::numeric_limits::max(); } -Displacement* Displacement::getDisplacementFromXML(TiXmlElement *displ_node) throw (iom::exception) +Displacement* Displacement::getDisplacementFromXML(TiXmlElement *displ_node) { #if S_VERBOSE>5 printf("..........in Displacement::getDisplacementFromXML(int displ_type=%d, TiXmlElement *displ_node)\n",displ_type); @@ -58,7 +58,7 @@ Displacement* Displacement::getDisplacementFromXML(TiXmlElement *displ_node) thr } //instances a displacement which is a deep copy of the given displacement -Displacement* Displacement::instance(Displacement* displacement) throw (iom::exception) +Displacement* Displacement::instance(Displacement* displacement) { #if S_VERBOSE>5 printf("..........in Displacement::instance(displacement)\n"); @@ -81,7 +81,7 @@ Displacement* Displacement::instance(Displacement* displacement) throw (iom::ex * The given vector of redundant displacements along D is projected into the displacement which embeds the most * reliable parameters. After this operation, the given vector will contain only the projected displacement. **************************************************************************************************************/ -void Displacement::projectDisplacements(std::vector &displacements) throw (iom::exception) +void Displacement::projectDisplacements(std::vector &displacements) { #if S_VERBOSE>2 printf("....in Displacement::projectDisplacements(displacements[size=%d])\n",displacements.size()); diff --git a/src/stitcher/Displacement.h b/src/stitcher/Displacement.h index 66a0183b..e5d4ef72 100644 --- a/src/stitcher/Displacement.h +++ b/src/stitcher/Displacement.h @@ -60,34 +60,34 @@ class Displacement //evaluates displacement reliability possibly along the given direction. The result(s) should be stored //in one or more object members, so that they have to be computed once and then accessed by GET methods - virtual float evalReliability(direction _direction=invalid) throw (iom::exception) = 0; + virtual float evalReliability(direction _direction=invalid) = 0; //returns the reliability possibly along the given direction. An exception is thrown if the reliability //index(es) are not computed yet. Values are in [0,1] where 0 = totally unreliable, 1 = reliable - virtual float getReliability(direction _direction=invalid) throw (iom::exception) = 0; + virtual float getReliability(direction _direction=invalid) = 0; //returns the displacement along the given direction - virtual int getDisplacement(direction _direction) throw (iom::exception) = 0; + virtual int getDisplacement(direction _direction) = 0; //returns the default displacement along the given direction - virtual int getDefaultDisplacement(direction _direction) throw (iom::exception) = 0; + virtual int getDefaultDisplacement(direction _direction) = 0; //sets to default values the displacements with a reliability factor above the given threshold - virtual void threshold(float rel_threshold) throw (iom::exception) = 0; + virtual void threshold(float rel_threshold) = 0; //returns the displacement mirrored along the given direction. - virtual Displacement* getMirrored(direction _direction) throw (iom::exception) = 0; + virtual Displacement* getMirrored(direction _direction) = 0; //combines the parameters of the current and the given displacement so that after this operation //the two displacements are more reliable (and are EQUAL). - virtual void combine(Displacement& displ) throw (iom::exception) = 0; + virtual void combine(Displacement& displ) = 0; //XML methods: convert/load displacement object into/from XML schema - virtual TiXmlElement* getXML() throw (iom::exception) = 0; - virtual void loadXML(TiXmlElement *displ_node) throw (iom::exception) = 0; + virtual TiXmlElement* getXML() = 0; + virtual void loadXML(TiXmlElement *displ_node) = 0; // returns true if 'displ' is a better displacement than the current one - virtual bool isBetter(Displacement *displ) throw (iom::exception) = 0; + virtual bool isBetter(Displacement *displ) = 0; /*** PUBLIC METHODS that derived classes inherit and can override ***/ @@ -103,16 +103,16 @@ class Displacement //*** CLASS methods *** //instances the specified displacement object from an XML element - static Displacement* getDisplacementFromXML(TiXmlElement *displ_node) throw (iom::exception); + static Displacement* getDisplacementFromXML(TiXmlElement *displ_node) ; //instances a displacement which is a deep copy of the given displacement - static Displacement* instance(Displacement* displacement) throw (iom::exception); + static Displacement* instance(Displacement* displacement) ; /************************************************************************************************************* * The given vector of redundant displacements along D is projected into the displacement which embeds the most * reliable parameters. After this operation, the given vector will contain only the projected displacement. **************************************************************************************************************/ - static void projectDisplacements(std::vector &displacements) throw (iom::exception); + static void projectDisplacements(std::vector &displacements) ; }; diff --git a/src/stitcher/DisplacementMIPNCC.cpp b/src/stitcher/DisplacementMIPNCC.cpp index cc4dac8a..becb46da 100644 --- a/src/stitcher/DisplacementMIPNCC.cpp +++ b/src/stitcher/DisplacementMIPNCC.cpp @@ -127,7 +127,7 @@ DisplacementMIPNCC::DisplacementMIPNCC(TiXmlElement *displ_node) : Displacement( //evaluates displacement reliability possibly along the given direction. The result(s) should be stored //in one or more object members, so that they have to be computed once and then accessed by GET methods -float DisplacementMIPNCC::evalReliability(direction _direction) throw (iom::exception) +float DisplacementMIPNCC::evalReliability(direction _direction) { #if S_VERBOSE>4 printf("........in DisplacementMIPNCC::evalReliability(direction _direction = %d)\n", _direction); @@ -148,7 +148,7 @@ float DisplacementMIPNCC::evalReliability(direction _direction) throw (iom::exce //returns the reliability possibly along the given direction. An exception is thrown if the reliability //index(es) are not computed yet. -float DisplacementMIPNCC::getReliability(direction _direction) throw (iom::exception) +float DisplacementMIPNCC::getReliability(direction _direction) { #if S_VERBOSE>4 printf("........in DisplacementMIPNCC::getReliability(direction _direction = %d)\n", _direction); @@ -169,7 +169,7 @@ float DisplacementMIPNCC::getReliability(direction _direction) throw (iom::exce } //returns the displacement along the given direction -int DisplacementMIPNCC::getDisplacement(direction _direction) throw (iom::exception) +int DisplacementMIPNCC::getDisplacement(direction _direction) { #if S_VERBOSE>4 printf("\t\t\t\t\tin DisplacementMIPNCC::getDisplacement(direction _direction = %d)\n", _direction); @@ -184,7 +184,7 @@ int DisplacementMIPNCC::getDisplacement(direction _direction) throw (iom::except } //returns the default displacement along the given direction -int DisplacementMIPNCC::getDefaultDisplacement(direction _direction) throw (iom::exception) +int DisplacementMIPNCC::getDefaultDisplacement(direction _direction) { #if S_VERBOSE>4 printf("\t\t\t\t\tin DisplacementMIPNCC::getDefaultDisplacement(direction _direction = %d)\n", _direction); @@ -199,7 +199,7 @@ int DisplacementMIPNCC::getDefaultDisplacement(direction _direction) throw (iom: } //returns the half range of NCC search around initial offset along the given direction -int DisplacementMIPNCC::getDelays(direction _direction) throw (iom::exception) +int DisplacementMIPNCC::getDelays(direction _direction) { #if S_VERBOSE>4 printf("\t\t\t\t\tin DisplacementMIPNCC::getDelays(direction _direction = %d)\n", _direction); @@ -214,7 +214,7 @@ int DisplacementMIPNCC::getDelays(direction _direction) throw (iom::exception) } //sets to default values the displacements with a reliability factor above the given threshold -void DisplacementMIPNCC::threshold(float rel_threshold) throw (iom::exception) +void DisplacementMIPNCC::threshold(float rel_threshold) { #if S_VERBOSE>4 printf("........in DisplacementMIPNCC::threshold(rel_threshold = %.4f)\n", rel_threshold); @@ -235,7 +235,7 @@ void DisplacementMIPNCC::threshold(float rel_threshold) throw (iom::exception) } //returns the displacement mirrored along the given direction. -Displacement* DisplacementMIPNCC::getMirrored(direction _direction) throw (iom::exception) +Displacement* DisplacementMIPNCC::getMirrored(direction _direction) { #if S_VERBOSE>4 printf("........in DisplacementMIPNCC::getMirrored(direction _direction = %d)\n", _direction); @@ -307,7 +307,7 @@ Displacement* DisplacementMIPNCC::getMirrored(direction _direction) throw (iom:: //combines the parameters of the current and the given displacement so that after this operation //the two displacements are more reliable (and are EQUAL). -void DisplacementMIPNCC::combine(Displacement& displ) throw (iom::exception) +void DisplacementMIPNCC::combine(Displacement& displ) { #if S_VERBOSE>3 printf("......in DisplacementMIPNCC::combine(Displacement& displ)\n"); @@ -345,7 +345,7 @@ void DisplacementMIPNCC::combine(Displacement& displ) throw (iom::exception) } -bool DisplacementMIPNCC::isBetter(Displacement *displ) throw (iom::exception) +bool DisplacementMIPNCC::isBetter(Displacement *displ) { DisplacementMIPNCC *displ_MIPNCC = (DisplacementMIPNCC*) displ; @@ -364,7 +364,7 @@ bool DisplacementMIPNCC::isBetter(Displacement *displ) throw (iom::exception) //XML methods: convert/load displacement object into/from XML schema -TiXmlElement* DisplacementMIPNCC::getXML() throw (iom::exception) +TiXmlElement* DisplacementMIPNCC::getXML() { #if S_VERBOSE>5 printf("\t\t\t\t\tin DisplacementMIPNCC::getXML()\n"); @@ -398,7 +398,7 @@ TiXmlElement* DisplacementMIPNCC::getXML() throw (iom::exception) return xml_representation; } -void DisplacementMIPNCC::loadXML(TiXmlElement *displ_node) throw (iom::exception) +void DisplacementMIPNCC::loadXML(TiXmlElement *displ_node) { #if S_VERBOSE>5 printf("\t\t\t\t\tin DisplacementMIPNCC::loadXML(displ_node)\n"); diff --git a/src/stitcher/DisplacementMIPNCC.h b/src/stitcher/DisplacementMIPNCC.h index 773652ed..3e927997 100644 --- a/src/stitcher/DisplacementMIPNCC.h +++ b/src/stitcher/DisplacementMIPNCC.h @@ -71,37 +71,37 @@ class DisplacementMIPNCC : Displacement //evaluates displacement reliability possibly along the given direction. The result(s) should be stored //in one or more object members, so that they have to be computed once and then accessed by GET methods - float evalReliability(direction _direction=invalid) throw (iom::exception); + float evalReliability(direction _direction=invalid) ; //returns the reliability possibly along the given direction. An exception is thrown if the reliability //index(es) are not computed yet. - float getReliability(direction _direction=invalid) throw (iom::exception); + float getReliability(direction _direction=invalid) ; //returns the displacement along the given direction - int getDisplacement(direction _direction) throw (iom::exception); + int getDisplacement(direction _direction) ; //returns the default displacement along the given direction - int getDefaultDisplacement(direction _direction) throw (iom::exception); + int getDefaultDisplacement(direction _direction) ; //returns the half range of NCC search around initial offset along the given direction - int getDelays(direction _direction) throw (iom::exception); + int getDelays(direction _direction) ; //sets to default values the displacements with a reliability factor above the given threshold - void threshold(float rel_threshold) throw (iom::exception); + void threshold(float rel_threshold) ; //returns the displacement mirrored along the given direction. - Displacement* getMirrored(direction _direction) throw (iom::exception); + Displacement* getMirrored(direction _direction) ; //XML methods: convert/load displacement object into/from XML schema - TiXmlElement* getXML() throw (iom::exception); - void loadXML(TiXmlElement *displ_node) throw (iom::exception); + TiXmlElement* getXML() ; + void loadXML(TiXmlElement *displ_node) ; //combines the parameters of the current and the given displacement so that after this operation //the two displacements are more reliable (and are EQUAL). - void combine(Displacement& displ) throw (iom::exception); + void combine(Displacement& displ) ; // returns true if 'displ' is a better displacement than the current one - bool isBetter(Displacement *displ) throw (iom::exception); + bool isBetter(Displacement *displ) ; friend class PDAlgoMIPNCC; }; diff --git a/src/stitcher/MergeTiles.cpp b/src/stitcher/MergeTiles.cpp index 79682f19..3d82b813 100644 --- a/src/stitcher/MergeTiles.cpp +++ b/src/stitcher/MergeTiles.cpp @@ -92,7 +92,7 @@ void StackStitcher::mergeTilesVaa3DRaw(std::string output_path, int block_height bool exclude_nonstitchable_stacks, int _ROW_START, int _ROW_END, int _COL_START, int _COL_END, int _D0, int _D1, bool restoreSPIM, int restore_direction, int blending_algo, int method, bool isotropic, bool test_mode, bool show_progress_bar, - const char* saved_img_format, int saved_img_depth, bool par_mode) throw (iom::exception) + const char* saved_img_format, int saved_img_depth, bool par_mode) { #if S_VERBOSE > 2 printf("......in StackStitcher::mergeTilesVaa3DRaw(output_path=\"%s\", block_height=%d, block_width=%d, block_depth=%d, exclude_nonstitchable_stacks = %s, " @@ -925,7 +925,7 @@ void StackStitcher::createDirectoryHierarchy(std::string output_path, int block_ bool exclude_nonstitchable_stacks, int _ROW_START, int _ROW_END, int _COL_START, int _COL_END, int _D0, int _D1, bool restoreSPIM, int restore_direction, int blending_algo, int method, bool isotropic, bool test_mode, bool show_progress_bar, - const char* saved_img_format, int saved_img_depth, bool par_mode) throw (iom::exception) + const char* saved_img_format, int saved_img_depth, bool par_mode) { #if S_VERBOSE > 2 printf("......in StackStitcher::createDirectoryHierarchy(output_path=\"%s\", block_height=%d, block_width=%d, block_depth=%d, exclude_nonstitchable_stacks = %s, " @@ -1133,7 +1133,7 @@ void StackStitcher::mdataGenerator (std::string output_path, int block_height, i bool exclude_nonstitchable_stacks, int _ROW_START, int _ROW_END, int _COL_START, int _COL_END, int _D0, int _D1, bool restoreSPIM, int restore_direction, int blending_algo, int method, bool isotropic, bool test_mode, bool show_progress_bar, - const char* saved_img_format, int saved_img_depth, bool par_mode) throw (iom::exception) + const char* saved_img_format, int saved_img_depth, bool par_mode) { #if S_VERBOSE > 2 printf("......in StackStitcher::mdataGenerator(output_path=\"%s\", block_height=%d, block_width=%d, block_depth=%d, exclude_nonstitchable_stacks = %s, " diff --git a/src/stitcher/PDAlgo.h b/src/stitcher/PDAlgo.h index b5a26277..23e18a73 100644 --- a/src/stitcher/PDAlgo.h +++ b/src/stitcher/PDAlgo.h @@ -58,7 +58,7 @@ class PDAlgo virtual Displacement* execute(iom::real_t *stk_A, iom::uint32 A_dim_V, iom::uint32 A_dim_H, iom::uint32 A_dim_D, iom::real_t *stk_B, iom::uint32 B_dim_V, iom::uint32 B_dim_H, iom::uint32 B_dim_D, iom::uint32 displ_max_V, iom::uint32 displ_max_H, iom::uint32 displ_max_D, - direction overlap_direction, iom::uint32 overlap) throw (iom::exception) = 0; + direction overlap_direction, iom::uint32 overlap) = 0; //static method which is responsible to instance and return the algorithm of the given type static PDAlgo* instanceAlgorithm(int _type); diff --git a/src/stitcher/PDAlgoMIPNCC.cpp b/src/stitcher/PDAlgoMIPNCC.cpp index 5a0147fa..522b6248 100644 --- a/src/stitcher/PDAlgoMIPNCC.cpp +++ b/src/stitcher/PDAlgoMIPNCC.cpp @@ -55,7 +55,7 @@ using namespace iom; Displacement* PDAlgoMIPNCC::execute(iom::real_t *stk_A, uint32 A_dim_V, uint32 A_dim_H, uint32 A_dim_D, iom::real_t *stk_B, uint32 B_dim_V, uint32 B_dim_H, uint32 B_dim_D, uint32 displ_max_V, uint32 displ_max_H, uint32 displ_max_D, - direction overlap_direction, uint32 overlap) throw (iom::exception) + direction overlap_direction, uint32 overlap) { #if S_VERBOSE>3 printf("\t\t\t\tin PDAlgoMIPNCC::execute(..., A_dim_V = %d, A_dim_H = %d, A_dim_D = %d, B_dim_V = %d, B_dim_H = %d, B_dim_D = %d, displ_max_V = %d, displ_max_H = %d, displ_max_D = %d, overlap_direction = %d, overlap = %d)\n", diff --git a/src/stitcher/PDAlgoMIPNCC.h b/src/stitcher/PDAlgoMIPNCC.h index 2d7a8896..9206e34f 100644 --- a/src/stitcher/PDAlgoMIPNCC.h +++ b/src/stitcher/PDAlgoMIPNCC.h @@ -46,7 +46,7 @@ class PDAlgoMIPNCC : PDAlgo Displacement* execute(iom::real_t *stk_A, iom::uint32 A_dim_V, iom::uint32 A_dim_H, iom::uint32 A_dim_D, iom::real_t *stk_B, iom::uint32 B_dim_V, iom::uint32 B_dim_H, iom::uint32 B_dim_D, iom::uint32 displ_max_V, iom::uint32 displ_max_H, iom::uint32 displ_max_D, - direction overlap_direction, iom::uint32 overlap) throw (iom::exception); + direction overlap_direction, iom::uint32 overlap) ; }; #endif /* PD_ALGO_MIPNCC_H */ diff --git a/src/stitcher/StackRestorer.cpp b/src/stitcher/StackRestorer.cpp index 58efcb85..21432213 100644 --- a/src/stitcher/StackRestorer.cpp +++ b/src/stitcher/StackRestorer.cpp @@ -104,7 +104,7 @@ StackRestorer::~StackRestorer(void) } } -void StackRestorer::computeSubvolDescriptors(iom::real_t* data, VirtualStack* stk_p, int subvol_idx, int subvol_D_dim) throw (iom::exception) +void StackRestorer::computeSubvolDescriptors(iom::real_t* data, VirtualStack* stk_p, int subvol_idx, int subvol_D_dim) { int i = stk_p->getROW_INDEX(); int j = stk_p->getCOL_INDEX(); @@ -112,7 +112,7 @@ void StackRestorer::computeSubvolDescriptors(iom::real_t* data, VirtualStack* st SUBSTKS_DESCRIPTORS[i][j][subvol_idx].computeSubvolDescriptors(data); } -void StackRestorer::computeStackDescriptors(VirtualStack* stk_p) throw (iom::exception) +void StackRestorer::computeStackDescriptors(VirtualStack* stk_p) { int i = stk_p->getROW_INDEX(); int j = stk_p->getCOL_INDEX(); @@ -160,7 +160,7 @@ void StackRestorer::printVolDescriptors(VirtualStack* stk_p) STKS_DESCRIPTORS[i][j].print(); } -void StackRestorer::save(char* file_path) throw (iom::exception) +void StackRestorer::save(char* file_path) { if(STKS_DESCRIPTORS) { @@ -214,7 +214,7 @@ void StackRestorer::save(char* file_path) throw (iom::exception) } } -void StackRestorer::load(char* file_path) throw (iom::exception) +void StackRestorer::load(char* file_path) { std::ifstream file (file_path, std::ios::in | std::ios::binary); if(!file) @@ -270,7 +270,7 @@ void StackRestorer::load(char* file_path) throw (iom::exception) file.close(); } -void StackRestorer::repairSlice(iom::real_t* data, int slice_idx, VirtualStack* stk_p, int direction) throw (iom::exception) +void StackRestorer::repairSlice(iom::real_t* data, int slice_idx, VirtualStack* stk_p, int direction) { //some checks bool ready_to_repair = true; @@ -350,7 +350,7 @@ void StackRestorer::repairSlice(iom::real_t* data, int slice_idx, VirtualStack* #endif } -void StackRestorer::repairStack(iom::real_t* data, VirtualStack* stk_p, int direction) throw (iom::exception) +void StackRestorer::repairStack(iom::real_t* data, VirtualStack* stk_p, int direction) { //some checks bool ready_to_repair = true; @@ -488,7 +488,7 @@ StackRestorer::vol_descr_t::~vol_descr_t() delete[] D_MIP; } -void StackRestorer::vol_descr_t::computeSubvolDescriptors(iom::real_t *subvol) throw (iom::exception) +void StackRestorer::vol_descr_t::computeSubvolDescriptors(iom::real_t *subvol) { //initialization of MIPs and profiles for(int i=0; i2 printf("\t\t\t....in StackStitcher::computeDisplacements(..., overlap_V = %d, overlap_H = %d, displ_max_V = %d, displ_max_H = %d, displ_max_D = %d, start_row = %d, start_col = %d, end_row = %d, end_col = %d, subvol_DIM_D = %d, restoreSPIM=%s, restore_dir=%d)\n", @@ -403,7 +403,7 @@ throw (iom::exception) * or columns with no stitchable stacks **************************************************************************************************************/ void StackStitcher::computeVolumeDims(bool exclude_nonstitchable_stacks, int _ROW_START, int _ROW_END, - int _COL_START, int _COL_END, int _D0, int _D1) throw (iom::exception) + int _COL_START, int _COL_END, int _D0, int _D1) { #if S_VERBOSE >2 printf("\t\t\t....in StackStitcher::computeVolumeDims(exclude_nonstitchable_stacks = %s, _ROW_START=%d, _ROW_END=%d, _COL_START=%d, _COL_END=%d, _D0=%d, _D1=%d)\n", @@ -615,7 +615,7 @@ int StackStitcher::getStripeABS_V(int row_index, bool up) * stored before it is combined into the final stripe. **************************************************************************************************************/ iom::real_t* StackStitcher::getStripe(int row_index, int d_index, int restore_direction, StackRestorer* stk_rst, - int blending_algo) throw (iom::exception) + int blending_algo) { #if S_VERBOSE >2 printf("........in StackStitcher::getStripe(short row_index=%d, short d_index=%d, restore_direction=%d, blending_algo=%d)\n", @@ -827,7 +827,7 @@ void StackStitcher::mergeTiles(std::string output_path, int slice_height, int sl bool exclude_nonstitchable_stacks, int _ROW_START, int _ROW_END, int _COL_START, int _COL_END, int _D0, int _D1, bool restoreSPIM, int restore_direction, int blending_algo, int method, bool test_mode, bool show_progress_bar, - const char* saved_img_format, int saved_img_depth) throw (iom::exception) + const char* saved_img_format, int saved_img_depth) { #if S_VERBOSE > 2 printf("......in StackStitcher::mergeTiles(output_path=\"%s\", slice_height=%d, slice_width=%d, exclude_nonstitchable_stacks = %s, " @@ -1556,7 +1556,7 @@ void StackStitcher::halveSample2D(iom::real_t* img, int height, int width, int d * ment. Where for a pair of adjacent stacks no displacement is available, a displacement is generated using * nominal stage coordinates. **************************************************************************************************************/ -void StackStitcher::projectDisplacements() throw (iom::exception) +void StackStitcher::projectDisplacements() { #if S_VERBOSE > 3 printf("......in StackStitcher::projectDisplacements()\n"); @@ -1619,7 +1619,7 @@ void StackStitcher::projectDisplacements() throw (iom::exception) * Moreover, stacks which do not have any reliable single-direction displacements with all 4 neighbors are mar- * ked as NON STITCHABLE. **************************************************************************************************************/ -void StackStitcher::thresholdDisplacements(float reliability_threshold) throw (iom::exception) +void StackStitcher::thresholdDisplacements(float reliability_threshold) { #if S_VERBOSE > 3 printf("......in StackStitcher::thresholdDisplacements(reliability_threshold = %.4f)\n", reliability_threshold); @@ -1716,7 +1716,7 @@ void StackStitcher::thresholdDisplacements(float reliability_threshold) t /************************************************************************************************************* * Executes the compute tiles placement algorithm associated to the given ID **************************************************************************************************************/ -void StackStitcher::computeTilesPlacement(int algorithm_type) throw (iom::exception) +void StackStitcher::computeTilesPlacement(int algorithm_type) { #if S_VERBOSE > 3 printf("......in StackStitcher::computeTilesPlacement(algorithm_type = %d)\n", algorithm_type); @@ -1848,7 +1848,7 @@ void StackStitcher::saveComputationTimes(const char *filename, volumemanager::Vi * stored before it is combined into the final stripe. **************************************************************************************************************/ iom::real_t* StackStitcher::getStripe2(int row_index, int d_index, int _V0, int _V1, int _H0, int _H1, - int restore_direction, StackRestorer* stk_rst, int blending_algo) throw (iom::exception) + int restore_direction, StackRestorer* stk_rst, int blending_algo) { #if S_VERBOSE >2 printf("........in StackStitcher::getStripe(short row_index=%d, short d_index=%d, restore_direction=%d, blending_algo=%d)\n", diff --git a/src/stitcher/StackStitcher.h b/src/stitcher/StackStitcher.h index 095decab..7094bc5c 100644 --- a/src/stitcher/StackStitcher.h +++ b/src/stitcher/StackStitcher.h @@ -98,7 +98,7 @@ class StackStitcher * stored before it is combined into the final stripe. **************************************************************************************************************/ iom::real_t* getStripe(int row_index, int d_index, int restore_direction=-1, StackRestorer* stk_rst=NULL, - int blending_algo=S_SINUSOIDAL_BLENDING) throw (iom::exception); + int blending_algo=S_SINUSOIDAL_BLENDING) ; /************************************************************************************************************* * Merges all slices of the given row at the given depth index, so obtaining the stripe that is returned. @@ -107,7 +107,7 @@ class StackStitcher * stored before it is combined into the final stripe. **************************************************************************************************************/ iom::real_t* getStripe2(int row_index, int d_index, int _V0=-1, int _V1=-1, int _H0=-1, int _H1=-1, - int restore_direction=-1, StackRestorer* stk_rst=NULL, int blending_algo=S_SINUSOIDAL_BLENDING) throw (iom::exception); + int restore_direction=-1, StackRestorer* stk_rst=NULL, int blending_algo=S_SINUSOIDAL_BLENDING) ; /************************************************************************************************************* * Returns the (up = true -> TOP, up = false -> BOTTOM) V coordinate of the virtual stripe at row. @@ -207,7 +207,7 @@ class StackStitcher bool skip_V=false, // skip displacement computation for pairs in the last row bool skip_H=false // skip displacement computation for pairs in the last column ) - throw (iom::exception); + ; /************************************************************************************************************* @@ -216,7 +216,7 @@ class StackStitcher * ment. Where for a pair of adjacent stacks no displacement is available, a displacement is generated using * nominal stage coordinates. **************************************************************************************************************/ - void projectDisplacements() throw (iom::exception); + void projectDisplacements() ; /************************************************************************************************************* * Assuming that for each pair of adjacent stacks exists one and only one displacement, this displacement is @@ -225,13 +225,13 @@ class StackStitcher * Moreover, stacks which do not have any reliable single-direction displacements with all 4 neighbors are mar- * ked as NON STITCHABLE. **************************************************************************************************************/ - void thresholdDisplacements(float reliability_threshold) throw (iom::exception); + void thresholdDisplacements(float reliability_threshold) ; /************************************************************************************************************* * Executes the compute tiles placement algorithm associated to the given ID **************************************************************************************************************/ - void computeTilesPlacement(int algorithm_type) throw (iom::exception); + void computeTilesPlacement(int algorithm_type) ; /************************************************************************************************************* @@ -241,7 +241,7 @@ class StackStitcher * or columns with no stitchable stacks **************************************************************************************************************/ void computeVolumeDims(bool exclude_nonstitchable_stacks = true, int _ROW_START = -1, int _ROW_END = -1, - int _COL_START = -1, int _COL_END = -1, int _D0 = -1, int _D1 = -1) throw (iom::exception); + int _COL_START = -1, int _COL_END = -1, int _D0 = -1, int _D1 = -1) ; /************************************************************************************************************* * Method to be called for tile merging. <> parameters are mandatory, while [] are optional. @@ -273,7 +273,7 @@ class StackStitcher bool exclude_nonstitchable_stacks =true, int _ROW_START=-1, int _ROW_END=-1, int _COL_START=-1, int _COL_END=-1, int _D0=-1, int _D1=-1, bool restoreSPIM=false, int restore_direction=-1, int blending_algo=S_SINUSOIDAL_BLENDING, int method = HALVE_BY_MEAN, bool test_mode=false, bool show_progress_bar= true, - const char* saved_img_format=iom::DEF_IMG_FORMAT.c_str(), int saved_img_depth=iom::DEF_BPP) throw (iom::exception); + const char* saved_img_format=iom::DEF_IMG_FORMAT.c_str(), int saved_img_depth=iom::DEF_BPP) ; /************************************************************************************************************* @@ -339,7 +339,7 @@ class StackStitcher bool exclude_nonstitchable_stacks =true, int _ROW_START=-1, int _ROW_END=-1, int _COL_START=-1, int _COL_END=-1, int _D0=-1, int _D1=-1, bool restoreSPIM=false, int restore_direction=-1, int blending_algo=S_SINUSOIDAL_BLENDING, int method = HALVE_BY_MEAN, bool isotropic=false, bool test_mode=false, bool show_progress_bar= true, - const char* saved_img_format=iom::DEF_IMG_FORMAT.c_str(), int saved_img_depth=iom::DEF_BPP, bool par_mode=false) throw (iom::exception); + const char* saved_img_format=iom::DEF_IMG_FORMAT.c_str(), int saved_img_depth=iom::DEF_BPP, bool par_mode=false) ; /************************************************************************************************************* @@ -351,7 +351,7 @@ class StackStitcher bool exclude_nonstitchable_stacks =true, int _ROW_START=-1, int _ROW_END=-1, int _COL_START=-1, int _COL_END=-1, int _D0=-1, int _D1=-1, bool restoreSPIM=false, int restore_direction=-1, int blending_algo=S_SINUSOIDAL_BLENDING, int method = HALVE_BY_MEAN, bool isotropic=false, bool test_mode=false, bool show_progress_bar= true, - const char* saved_img_format=iom::DEF_IMG_FORMAT.c_str(), int saved_img_depth=iom::DEF_BPP, bool par_mode=false) throw (iom::exception); + const char* saved_img_format=iom::DEF_IMG_FORMAT.c_str(), int saved_img_depth=iom::DEF_BPP, bool par_mode=false) ; /************************************************************************************************************* * Method to be called for creating the metadata file of the output volume starting from the importad unstitched @@ -362,7 +362,7 @@ class StackStitcher bool exclude_nonstitchable_stacks =true, int _ROW_START=-1, int _ROW_END=-1, int _COL_START=-1, int _COL_END=-1, int _D0=-1, int _D1=-1, bool restoreSPIM=false, int restore_direction=-1, int blending_algo=S_SINUSOIDAL_BLENDING, int method = HALVE_BY_MEAN, bool isotropic=false, bool test_mode=false, bool show_progress_bar= true, - const char* saved_img_format=iom::DEF_IMG_FORMAT.c_str(), int saved_img_depth=iom::DEF_BPP, bool par_mode=false) throw (iom::exception); + const char* saved_img_format=iom::DEF_IMG_FORMAT.c_str(), int saved_img_depth=iom::DEF_BPP, bool par_mode=false) ; }; #endif diff --git a/src/stitcher/TPAlgo.h b/src/stitcher/TPAlgo.h index c4a2f3a6..59392059 100644 --- a/src/stitcher/TPAlgo.h +++ b/src/stitcher/TPAlgo.h @@ -47,7 +47,7 @@ class TPAlgo * Abstract method that all derived classes must implement. * Finds the optimal tile placement on the object member **************************************************************************************************************/ - virtual void execute() throw (iom::exception) = 0; + virtual void execute() = 0; //static method which is responsible to instance and return the algorithm of the given type static TPAlgo* instanceAlgorithm(int _type, volumemanager::VirtualVolume * _volume); diff --git a/src/stitcher/TPAlgoLQP.cpp b/src/stitcher/TPAlgoLQP.cpp index 3d8c2f03..f7235ccb 100755 --- a/src/stitcher/TPAlgoLQP.cpp +++ b/src/stitcher/TPAlgoLQP.cpp @@ -89,7 +89,7 @@ TPAlgoLQP::TPAlgoLQP(VirtualVolume * _volume) : TPAlgo(S_FATPM_LQP_HE, _volume) * PROs: * CONs: **************************************************************************************************************/ -void TPAlgoLQP::execute() throw (iom::exception) +void TPAlgoLQP::execute() { #if S_VERBOSE > 2 printf("....in TPAlgoLQP::execute()"); diff --git a/src/stitcher/TPAlgoLQP.h b/src/stitcher/TPAlgoLQP.h index 895220d3..c8ac1795 100755 --- a/src/stitcher/TPAlgoLQP.h +++ b/src/stitcher/TPAlgoLQP.h @@ -58,7 +58,7 @@ class TPAlgoLQP : public TPAlgo * PROs: * CONs: **************************************************************************************************************/ - void execute() throw (iom::exception); + void execute() ; }; #endif /* _TILE_PLACEMENT_ALGORITHM_LINEAR_QUADRATIC_PROGRAMMING_H */ diff --git a/src/stitcher/TPAlgoMST.cpp b/src/stitcher/TPAlgoMST.cpp index fa22bf2c..a4abe46d 100644 --- a/src/stitcher/TPAlgoMST.cpp +++ b/src/stitcher/TPAlgoMST.cpp @@ -63,7 +63,7 @@ TPAlgoMST::TPAlgoMST(VirtualVolume * _volume) : TPAlgo(S_FATPM_SP_TREE, _volume) * ent is quite reliable, with a very little reliability gain. This implies possible bad absolute posi- * tions estimations when the path is too long. **************************************************************************************************************/ -void TPAlgoMST::execute() throw (iom::exception) +void TPAlgoMST::execute() { #if S_VERBOSE > 2 printf("....in TPAlgoMST::execute()"); diff --git a/src/stitcher/TPAlgoMST.h b/src/stitcher/TPAlgoMST.h index 25f595df..ef676311 100644 --- a/src/stitcher/TPAlgoMST.h +++ b/src/stitcher/TPAlgoMST.h @@ -58,7 +58,7 @@ class TPAlgoMST : public TPAlgo * ent is quite reliable, with a very little reliability gain. This implies possible bad absolute posi- * tions estimations when the path is too long. **************************************************************************************************************/ - void execute() throw (iom::exception); + void execute() ; }; #endif /* _TILE_PLACEMENT_ALGORITHM_MINIMUM_SPANNING_TREE_H */ diff --git a/src/stitcher/resumer.cpp b/src/stitcher/resumer.cpp index ff2f4637..53f449e7 100755 --- a/src/stitcher/resumer.cpp +++ b/src/stitcher/resumer.cpp @@ -55,7 +55,7 @@ using namespace iim; bool initResumer ( const char *out_fmt, const char *output_path, int resolutions_size, bool* resolutions, int block_height, int block_width, int block_depth, int method, - const char* saved_img_format, int saved_img_depth, FILE *&fhandle ) throw (IOException) + const char* saved_img_format, int saved_img_depth, FILE *&fhandle ) { size_t str_len; char resumer_filepath[STATIC_STRINGS_SIZE]; @@ -163,7 +163,7 @@ bool initResumer ( const char *out_fmt, const char *output_path, int resolutions } void readResumerState ( FILE *&fhandle, const char *output_path, int &resolutions_size, int *stack_block, int *slice_start, int *slice_end, - sint64 &z, sint64 &z_parts ) throw (IOException) + sint64 &z, sint64 &z_parts ) { int dummy = fread(&resolutions_size,sizeof(int),1,fhandle); dummy = fread(stack_block,sizeof(int),resolutions_size,fhandle); @@ -184,7 +184,7 @@ void readResumerState ( FILE *&fhandle, const char *output_path, int &resolution } void saveResumerState ( FILE *fhandle, int resolutions_size, int *stack_block, int *slice_start, int *slice_end, - sint64 z, sint64 z_parts ) throw (IOException) + sint64 z, sint64 z_parts ) { fwrite(&resolutions_size,sizeof(int),1,fhandle); fwrite(stack_block,sizeof(int),resolutions_size,fhandle); @@ -195,7 +195,7 @@ void saveResumerState ( FILE *fhandle, int resolutions_size, int *stack_block, i fflush(fhandle); } -void closeResumer ( FILE *fhandle, const char *output_path ) throw (IOException) +void closeResumer ( FILE *fhandle, const char *output_path ) { //char err_msg[STATIC_STRINGS_SIZE]; diff --git a/src/stitcher/resumer.h b/src/stitcher/resumer.h index 056147ce..e11816f1 100755 --- a/src/stitcher/resumer.h +++ b/src/stitcher/resumer.h @@ -32,15 +32,15 @@ bool initResumer ( const char *out_fmt, const char *output_path, int resolution_size,bool* resolutions, int block_height, int block_width, int block_depth, int method, - const char* saved_img_format, int saved_img_depth, FILE *&fhandle ) throw (iim::IOException); + const char* saved_img_format, int saved_img_depth, FILE *&fhandle ) ; void readResumerState ( FILE *&fhandle, const char *output_path, int &resolution_size, int *stack_block, int *slice_start, int *slice_end, - iim::sint64 &z, iim::sint64 &z_parts ) throw (iim::IOException); + iim::sint64 &z, iim::sint64 &z_parts ) ; void saveResumerState ( FILE *fhandle, int resolution_size, int *stack_block, int *slice_start, int *slice_end, - iim::sint64 z, iim::sint64 z_parts ) throw (iim::IOException); + iim::sint64 z, iim::sint64 z_parts ) ; -void closeResumer ( FILE *fhandle, const char *output_path = 0 ) throw (iim::IOException); +void closeResumer ( FILE *fhandle, const char *output_path = 0 ) ; #endif diff --git a/src/utils/volumeconverter/VolumeConverter.cpp b/src/utils/volumeconverter/VolumeConverter.cpp index a8e6ad85..4265bc62 100755 --- a/src/utils/volumeconverter/VolumeConverter.cpp +++ b/src/utils/volumeconverter/VolumeConverter.cpp @@ -151,7 +151,7 @@ void vcDriver ( bool parallel, //parallel mode: does not perform side-effect operations during merge bool fixed_tiling, //use a fixed tiling with a (possible) small remainder std::string outFmt, //additional information about the output format (default: "") - int nbits ) throw (iim::IOException, iom::exception) { + int nbits ) { // do what you have to do VolumeConverter vc; @@ -380,7 +380,7 @@ VolumeConverter::~VolumeConverter() void VolumeConverter::setSrcVolume(const char* _root_dir, const char* _fmt, const char* _out_fmt, bool time_series /* = false */, int downsamplingFactor /* = 1 */, - std::string chanlist /* = ""*/, int _res /* = 0*/, int _timepoint /* = 0*/) throw (IOException, iom::exception) + std::string chanlist /* = ""*/, int _res /* = 0*/, int _timepoint /* = 0*/) { /**/iim::debug(iim::LEV3, strprintf("_root_dir = %s, _fmt = %s, _out_fmt = %s, time_series = %s", _root_dir, _fmt, _out_fmt, time_series ? "true" : "false").c_str(), __iim__current__function__); @@ -462,7 +462,7 @@ void VolumeConverter::setSrcVolume(const char* _root_dir, const char* _fmt, cons // additional setSrcVolume @ADDED by Alessandro on 2014-04-18: takes an external vm::VirtualVolume in input void VolumeConverter::setSrcVolume(iim::VirtualVolume * _imported_volume, const char* _out_fmt, bool time_series, - int downsamplingFactor, std::string chanlist, int _res, int _timepoint) throw (iim::IOException, iom::exception) + int downsamplingFactor, std::string chanlist, int _res, int _timepoint) { volume_external = true; volume = _imported_volume; @@ -528,7 +528,7 @@ void VolumeConverter::setSrcVolume(iim::VirtualVolume * _imported_volume, } -void VolumeConverter::setSubVolume(int _V0, int _V1, int _H0, int _H1, int _D0, int _D1 ) throw (iim::IOException) { +void VolumeConverter::setSubVolume(int _V0, int _V1, int _H0, int _H1, int _D0, int _D1 ) { if ( volume ) { V0 = _V0 == -1 ? 0 : std::max(_V0,0); H0 = _H0 == -1 ? 0 : std::max(_H0,0); @@ -542,7 +542,7 @@ void VolumeConverter::setSubVolume(int _V0, int _V1, int _H0, int _H1, int _D0, } -void VolumeConverter::setCompressionAlgorithm(int _nbits ) throw (iim::IOException, iom::exception) { +void VolumeConverter::setCompressionAlgorithm(int _nbits ) { if ( _nbits > 0 ) { lossy_compression = true; nbits = _nbits; @@ -567,7 +567,7 @@ void VolumeConverter::setCompressionAlgorithm(int _nbits ) throw (iim::IOExcepti **************************************************************************************************************/ void VolumeConverter::generateTiles(std::string output_path, bool* resolutions, int slice_height, int slice_width, int method, bool isotropic, bool show_progress_bar, - const char* saved_img_format, int saved_img_depth, std::string frame_dir, bool par_mode, bool fixed_tiling ) throw (IOException, iom::exception) + const char* saved_img_format, int saved_img_depth, std::string frame_dir, bool par_mode, bool fixed_tiling ) { printf("in VolumeConverter::generateTiles(path = \"%s\", resolutions = ", output_path.c_str()); for(int i=0; i< TMITREE_MAX_HEIGHT; i++) @@ -1162,7 +1162,7 @@ void VolumeConverter::generateTiles(std::string output_path, bool* resolutions, **************************************************************************************************************/ void VolumeConverter::generateTilesSimple(std::string output_path, bool* resolutions, int slice_height, int slice_width, int method, bool isotropic, bool show_progress_bar, - const char* saved_img_format, int saved_img_depth, std::string frame_dir, bool par_mode) throw (IOException, iom::exception) + const char* saved_img_format, int saved_img_depth, std::string frame_dir, bool par_mode) { printf("in VolumeConverter::generateTilesSimple(path = \"%s\", resolutions = ", output_path.c_str()); for(int i=0; i< TMITREE_MAX_HEIGHT; i++) @@ -1739,7 +1739,7 @@ void VolumeConverter::generateTilesSimple(std::string output_path, bool* resolut void VolumeConverter::generateTilesVaa3DRaw(std::string output_path, bool* resolutions, int block_height, int block_width, int block_depth, int method, bool isotropic, bool show_progress_bar, const char* saved_img_format, - int saved_img_depth, std::string frame_dir, bool par_mode, bool fixed_tiling) throw (IOException, iom::exception) + int saved_img_depth, std::string frame_dir, bool par_mode, bool fixed_tiling) { printf("in VolumeConverter::generateTilesVaa3DRaw(path = \"%s\", resolutions = ", output_path.c_str()); for(int i=0; i< TMITREE_MAX_HEIGHT; i++) @@ -3276,7 +3276,7 @@ void VolumeConverter::generateTilesVaa3DRawMC ( std::string output_path, std::st void VolumeConverter::generateTilesVaa3DRawMC ( std::string output_path, std::string ch_dir, bool* resolutions, int block_height, int block_width, int block_depth, int method, bool isotropic, bool show_progress_bar, const char* saved_img_format, - int saved_img_depth, std::string frame_dir, bool par_mode, bool fixed_tiling ) throw (IOException, iom::exception) + int saved_img_depth, std::string frame_dir, bool par_mode, bool fixed_tiling ) { printf("in VolumeConverter::generateTilesVaa3DRawMC(path = \"%s\", resolutions = ", output_path.c_str()); for(int i=0; i< TMITREE_MAX_HEIGHT; i++) @@ -4105,7 +4105,7 @@ void VolumeConverter::generateTilesVaa3DRawMC ( std::string output_path, std::st void VolumeConverter::generateTilesBDV_HDF5 ( std::string output_path, bool* resolutions, int block_height, int block_width, int block_depth, int method, bool isotropic, bool show_progress_bar, const char* saved_img_format, - int saved_img_depth, std::string frame_dir ) throw (IOException, iom::exception) + int saved_img_depth, std::string frame_dir ) { printf("in VolumeConverter::generateTilesBDV_HDF5(path = \"%s\", resolutions = ", output_path.c_str()); for(int i=0; i< TMITREE_MAX_HEIGHT; i++) @@ -4381,7 +4381,7 @@ void VolumeConverter::generateTilesBDV_HDF5 ( std::string output_path, bool* res void VolumeConverter::generateTilesIMS_HDF5 ( std::string output_path, std::string metadata_file, bool* resolutions, int block_height, int block_width, int block_depth, int method, bool isotropic, bool show_progress_bar, const char* saved_img_format, - int saved_img_depth, std::string frame_dir ) throw (IOException, iom::exception) + int saved_img_depth, std::string frame_dir ) { //printf("in VolumeConverter::generateTilesBDV_HDF5(path = \"%s\", resolutions = ", output_path.c_str()); //for(int i=0; i< TMITREE_MAX_HEIGHT; i++) @@ -4810,7 +4810,7 @@ void VolumeConverter::convertTo( bool isotropic /*=false*/, // perform an isotropic conversion std::string metadata_file /*= "null"*/, // last parameter, used only by Imaris file format std::string compression_info/*= ""*/ // last parameter, used only by Imaris file format -) throw (iim::IOException, iom::exception) +) { printf("in VolumeConverter::convertTo(output_path = \"%s\", output_format = \"%s\", output_bitdepth = %d, isTimeSeries = %s, resolutions = ", output_path.c_str(), output_format.c_str(), output_bitdepth, isTimeSeries ? "true" : "false"); @@ -4883,7 +4883,7 @@ void VolumeConverter::convertTo( void VolumeConverter::createDirectoryHierarchy(std::string output_path, std::string ch_dir, bool* resolutions, int block_height, int block_width, int block_depth, int method, bool isotropic, bool show_progress_bar, const char* saved_img_format, - int saved_img_depth, std::string frame_dir, bool par_mode) throw (IOException, iom::exception) + int saved_img_depth, std::string frame_dir, bool par_mode) { printf("in VolumeConverter::createDirectoryHierarchyVaa3DRaw(path = \"%s\", resolutions = ", output_path.c_str()); for(int i=0; i< TMITREE_MAX_HEIGHT; i++) @@ -5130,7 +5130,7 @@ void VolumeConverter::createDirectoryHierarchy(std::string output_path, std::str void VolumeConverter::createDirectoryHierarchySimple(std::string output_path, bool* resolutions, int block_height, int block_width, int block_depth, int method, bool isotropic, bool show_progress_bar, const char* saved_img_format, - int saved_img_depth, std::string frame_dir, bool par_mode) throw (IOException, iom::exception) + int saved_img_depth, std::string frame_dir, bool par_mode) { printf("in VolumeConverter::createDirectoryHierarchyVaa3DRaw(path = \"%s\", resolutions = ", output_path.c_str()); for(int i=0; i< TMITREE_MAX_HEIGHT; i++) @@ -5322,7 +5322,7 @@ void VolumeConverter::createDirectoryHierarchySimple(std::string output_path, bo void VolumeConverter::mdataGenerator(std::string output_path, std::string ch_dir, bool* resolutions, int block_height, int block_width, int block_depth, int method, bool isotropic, bool show_progress_bar, const char* saved_img_format, - int saved_img_depth, std::string frame_dir, bool par_mode) throw (IOException, iom::exception) + int saved_img_depth, std::string frame_dir, bool par_mode) { printf("in VolumeConverter::mdataGenerator(path = \"%s\", resolutions = ", output_path.c_str()); for(int i=0; i< TMITREE_MAX_HEIGHT; i++) diff --git a/src/utils/volumeconverter/VolumeConverter.h b/src/utils/volumeconverter/VolumeConverter.h index a9c7d476..51e4a149 100755 --- a/src/utils/volumeconverter/VolumeConverter.h +++ b/src/utils/volumeconverter/VolumeConverter.h @@ -130,7 +130,7 @@ void vcDriver ( bool fixed_tiling = false, //use a fixed tiling with a (possible) small remainder std::string outFmt = "RGB", //additional information about the output format (default: "") int nbits = 0 -) throw (iim::IOException, iom::exception); +) ; class VolumeConverter { @@ -184,12 +184,12 @@ class VolumeConverter *************************************************************************************************************/ void setSrcVolume(const char* _root_dir, const char* _fmt = iim::STACKED_FORMAT.c_str(), const char* _out_fmt = REAL_REPRESENTATION, bool time_series = false, - int downsamplingFactor = 1, std::string chanlist = "", int _res = 0, int _timepoint = 0) throw (iim::IOException, iom::exception); + int downsamplingFactor = 1, std::string chanlist = "", int _res = 0, int _timepoint = 0) ; // additional setSrcVolume @ADDED by Alessandro on 2014-04-18: takes an external vm::VirtualVolume in input void setSrcVolume(iim::VirtualVolume * _imported_volume, const char* _out_fmt = REAL_REPRESENTATION, bool time_series = false, - int downsamplingFactor = 1, std::string chanlist = "", int _res = 0, int _timepoint = 0) throw (iim::IOException, iom::exception); + int downsamplingFactor = 1, std::string chanlist = "", int _res = 0, int _timepoint = 0) ; /************************************************************************************************************* @@ -198,7 +198,7 @@ class VolumeConverter * * default values correspond to the whole volume *************************************************************************************************************/ - void setSubVolume(int _V0 = -1, int _V1 = -1, int _H0 = -1, int _H1 = -1, int _D0 = -1, int _D1 = -1 ) throw (iim::IOException); + void setSubVolume(int _V0 = -1, int _V1 = -1, int _H0 = -1, int _H1 = -1, int _D0 = -1, int _D1 = -1 ) ; // unified access point for volume conversion (@ADDED by Alessandro on 2014-02-24) // currently it does not support the possibility to provide a name for the subdirectory to store the converted image when output format is tiled 4D and the source has only one channel @@ -215,7 +215,7 @@ class VolumeConverter bool isotropic = false, // perform an isotropic conversion std::string metadata_file = "null", // last parameter, used only by Imaris file format std::string compression_info = "" // last parameter, used only by Imaris file format - ) throw (iim::IOException, iom::exception); + ) ; /************************************************************************************************************* * Method to set a lossy compression algorithm @@ -224,7 +224,7 @@ class VolumeConverter * 1: scaling, additional parameters: * nbits: number of least significant bits to be set to 0 *************************************************************************************************************/ - void setCompressionAlgorithm(int _nbits ) throw (iim::IOException, iom::exception); + void setCompressionAlgorithm(int _nbits ) ; /************************************************************************************************************* * Method to be called for tile generation. <> parameters are mandatory, while [] are optional. @@ -245,7 +245,7 @@ class VolumeConverter void generateTiles(std::string output_path, bool* resolutions = NULL, int slice_height = -1, int slice_width = -1, int method = HALVE_BY_MEAN, bool isotropic = false, bool show_progress_bar = true, const char* saved_img_format = iim::DEF_IMG_FORMAT.c_str(), - int saved_img_depth = iim::NUL_IMG_DEPTH, std::string frame_dir = "", bool par_mode = false, bool fixed_tiling = false ) throw (iim::IOException, iom::exception); + int saved_img_depth = iim::NUL_IMG_DEPTH, std::string frame_dir = "", bool par_mode = false, bool fixed_tiling = false ) ; /************************************************************************************************************* @@ -267,7 +267,7 @@ class VolumeConverter void generateTilesSimple(std::string output_path, bool* resolutions = NULL, int slice_height = -1, int slice_width = -1, int method = HALVE_BY_MEAN, bool isotropic = false, bool show_progress_bar = true, const char* saved_img_format = iim::DEF_IMG_FORMAT.c_str(), - int saved_img_depth = iim::NUL_IMG_DEPTH, std::string frame_dir = "", bool par_mode = false) throw (iim::IOException, iom::exception); + int saved_img_depth = iim::NUL_IMG_DEPTH, std::string frame_dir = "", bool par_mode = false) ; /************************************************************************************************************* @@ -291,7 +291,7 @@ class VolumeConverter void generateTilesVaa3DRaw(std::string output_path, bool* resolutions = NULL, int block_height = -1, int block_width = -1, int block_depth = -1, int method = HALVE_BY_MEAN, bool isotropic=false, bool show_progress_bar = true, const char* saved_img_format = "Vaa3DRaw", int saved_img_depth = iim::NUL_IMG_DEPTH, - std::string frame_dir = "", bool par_mode=false, bool fixed_tiling = false) throw (iim::IOException, iom::exception); + std::string frame_dir = "", bool par_mode=false, bool fixed_tiling = false) ; /************************************************************************************************************* @@ -345,7 +345,7 @@ class VolumeConverter void generateTilesVaa3DRawMC ( std::string output_path, std::string ch_dir = "", bool* resolutions = NULL, int block_height = -1, int block_width = -1, int block_depth = -1, int method = HALVE_BY_MEAN, bool isotropic=false, bool show_progress_bar = true, const char* saved_img_format = "Vaa3DRaw", int saved_img_depth = iim::NUL_IMG_DEPTH, - std::string frame_dir = "", bool par_mode=false, bool fixed_tiling = false) throw (iim::IOException, iom::exception); + std::string frame_dir = "", bool par_mode=false, bool fixed_tiling = false) ; /************************************************************************************************************* * NEW FORMAT SUPPORTING BDV HDF5 custom format @@ -370,31 +370,31 @@ class VolumeConverter void generateTilesBDV_HDF5 ( std::string output_path, bool* resolutions = NULL, int block_height = -1, int block_width = -1, int block_depth = -1, int method = HALVE_BY_MEAN, bool isotropic=false, bool show_progress_bar = true, const char* saved_img_format = "h5", int saved_img_depth = iim::NUL_IMG_DEPTH, - std::string frame_dir = "") throw (iim::IOException, iom::exception); + std::string frame_dir = "") ; void generateTilesIMS_HDF5 ( std::string output_path, std::string metadata_file, bool* resolutions = NULL, int block_height = -1, int block_width = -1, int block_depth = -1, int method = HALVE_BY_MEAN, bool isotropic=false, bool show_progress_bar = true, const char* saved_img_format = "ims", int saved_img_depth = iim::NUL_IMG_DEPTH, - std::string frame_dir = "") throw (iim::IOException, iom::exception); + std::string frame_dir = "") ; void createDirectoryHierarchy(std::string output_path, std::string ch_dir = "", bool* resolutions = NULL, int block_height = -1, int block_width = -1, int block_depth = -1, int method = HALVE_BY_MEAN, bool isotropic=false, bool show_progress_bar = true, const char* saved_img_format = "Vaa3DRaw", int saved_img_depth = iim::NUL_IMG_DEPTH, - std::string frame_dir = "", bool par_mode=false) throw (iim::IOException, iom::exception); + std::string frame_dir = "", bool par_mode=false) ; void createDirectoryHierarchySimple(std::string output_path, bool* resolutions = NULL, int block_height = -1, int block_width = -1, int block_depth = -1, int method = HALVE_BY_MEAN, bool isotropic=false, bool show_progress_bar = true, const char* saved_img_format = "Vaa3DRaw", int saved_img_depth = iim::NUL_IMG_DEPTH, - std::string frame_dir = "", bool par_mode=false) throw (iim::IOException, iom::exception); + std::string frame_dir = "", bool par_mode=false) ; void mdataGenerator(std::string output_path, std::string ch_dir = "", bool* resolutions = NULL, int block_height = -1, int block_width = -1, int block_depth = -1, int method = HALVE_BY_MEAN, bool isotropic=false, bool show_progress_bar = true, const char* saved_img_format = "Vaa3DRaw", int saved_img_depth = iim::NUL_IMG_DEPTH, - std::string frame_dir = "", bool par_mode=false) throw (iim::IOException, iom::exception); + std::string frame_dir = "", bool par_mode=false) ; }; #endif diff --git a/src/utils/volumeconverter/vcresumer.cpp b/src/utils/volumeconverter/vcresumer.cpp index 584c470d..736e00a7 100755 --- a/src/utils/volumeconverter/vcresumer.cpp +++ b/src/utils/volumeconverter/vcresumer.cpp @@ -66,7 +66,7 @@ using namespace iim; bool initVCResumer ( const char *out_fmt, const char *output_path, int resolutions_size, bool* resolutions, - int slice_height, int slice_width, int method, const char* saved_img_format, int saved_img_depth, FILE *&fhandle ) throw (iim::IOException) { + int slice_height, int slice_width, int method, const char* saved_img_format, int saved_img_depth, FILE *&fhandle ) { #ifdef SAVE_RESUMER_STATUS @@ -180,7 +180,7 @@ bool initVCResumer ( const char *out_fmt, const char *output_path, int resolutio } -void readVCResumerState ( FILE *&fhandle, const char *output_path, iim::sint64 &z, iim::sint64 &z_parts ) throw (iim::IOException) { +void readVCResumerState ( FILE *&fhandle, const char *output_path, iim::sint64 &z, iim::sint64 &z_parts ) { #ifdef SAVE_RESUMER_STATUS @@ -201,7 +201,7 @@ void readVCResumerState ( FILE *&fhandle, const char *output_path, iim::sint64 & } -void saveVCResumerState ( FILE *fhandle, iim::sint64 z, iim::sint64 z_parts ) throw (iim::IOException) { +void saveVCResumerState ( FILE *fhandle, iim::sint64 z, iim::sint64 z_parts ) { #ifdef SAVE_RESUMER_STATUS @@ -216,7 +216,7 @@ void saveVCResumerState ( FILE *fhandle, iim::sint64 z, iim::sint64 z_parts ) th bool initVCResumer ( const char *out_fmt, const char *output_path, int resolutions_size, bool* resolutions, int block_height, int block_width, int block_depth, int method, - const char* saved_img_format, int saved_img_depth, FILE *&fhandle ) throw (IOException) + const char* saved_img_format, int saved_img_depth, FILE *&fhandle ) { #ifdef SAVE_RESUMER_STATUS @@ -334,7 +334,7 @@ bool initVCResumer ( const char *out_fmt, const char *output_path, int resolutio } void readVCResumerState ( FILE *&fhandle, const char *output_path, int &resolutions_size, int *stack_block, int *slice_start, int *slice_end, - sint64 &z, sint64 &z_parts ) throw (IOException) + sint64 &z, sint64 &z_parts ) { #ifdef SAVE_RESUMER_STATUS @@ -360,7 +360,7 @@ void readVCResumerState ( FILE *&fhandle, const char *output_path, int &resoluti } void saveVCResumerState ( FILE *fhandle, int resolutions_size, int *stack_block, int *slice_start, int *slice_end, - sint64 z, sint64 z_parts ) throw (IOException) + sint64 z, sint64 z_parts ) { #ifdef SAVE_RESUMER_STATUS @@ -376,7 +376,7 @@ void saveVCResumerState ( FILE *fhandle, int resolutions_size, int *stack_block, #endif } -void closeVCResumer ( FILE *fhandle, const char *output_path ) throw (IOException) +void closeVCResumer ( FILE *fhandle, const char *output_path ) { #ifdef SAVE_RESUMER_STATUS diff --git a/src/utils/volumeconverter/vcresumer.h b/src/utils/volumeconverter/vcresumer.h index 9917c324..28136795 100755 --- a/src/utils/volumeconverter/vcresumer.h +++ b/src/utils/volumeconverter/vcresumer.h @@ -38,25 +38,25 @@ #include bool initVCResumer ( const char *out_fmt, const char *output_path, int resolutions_size, bool* resolutions, - int slice_height, int slice_width, int method, const char* saved_img_format, int saved_img_depth, FILE *&fhandle ) throw (iim::IOException); + int slice_height, int slice_width, int method, const char* saved_img_format, int saved_img_depth, FILE *&fhandle ) ; -void readVCResumerState ( FILE *&fhandle, const char *output_path, iim::sint64 &z, iim::sint64 &z_parts ) throw (iim::IOException); +void readVCResumerState ( FILE *&fhandle, const char *output_path, iim::sint64 &z, iim::sint64 &z_parts ) ; -void saveVCResumerState ( FILE *fhandle, iim::sint64 z, iim::sint64 z_parts ) throw (iim::IOException); +void saveVCResumerState ( FILE *fhandle, iim::sint64 z, iim::sint64 z_parts ) ; bool initVCResumer ( const char *out_fmt, const char *output_path, int resolutions_size,bool* resolutions, int block_height, int block_width, int block_depth, int method, - const char* saved_img_format, int saved_img_depth, FILE *&fhandle ) throw (iim::IOException); + const char* saved_img_format, int saved_img_depth, FILE *&fhandle ) ; void readVCResumerState ( FILE *&fhandle, const char *output_path, int &resolutions_size, int *stack_block, int *slice_start, int *slice_end, - iim::sint64 &z, iim::sint64 &z_parts ) throw (iim::IOException); + iim::sint64 &z, iim::sint64 &z_parts ) ; void saveVCResumerState ( FILE *fhandle, int resolutions_size, int *stack_block, int *slice_start, int *slice_end, - iim::sint64 z, iim::sint64 z_parts ) throw (iim::IOException); + iim::sint64 z, iim::sint64 z_parts ) ; -void closeVCResumer ( FILE *fhandle, const char *output_path = 0 ) throw (iim::IOException); +void closeVCResumer ( FILE *fhandle, const char *output_path = 0 ) ; #endif diff --git a/src/volumemanager/vmBlock.cpp b/src/volumemanager/vmBlock.cpp index e1a65628..8bd16108 100644 --- a/src/volumemanager/vmBlock.cpp +++ b/src/volumemanager/vmBlock.cpp @@ -87,7 +87,7 @@ using namespace vm; //CONSTRUCTOR WITH ARGUMENTS -Block::Block(BlockVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, const char* _DIR_NAME) throw (iom::exception) +Block::Block(BlockVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, const char* _DIR_NAME) : VirtualStack() { #if VM_VERBOSE > 3 @@ -113,7 +113,7 @@ Block::Block(BlockVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, const char } // 2015-01-17. Alessandro. @ADDED constructor for initialization from XML. -Block::Block(BlockVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, TiXmlElement* stack_node, int &z_end) throw (iom::exception) +Block::Block(BlockVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, TiXmlElement* stack_node, int &z_end) : VirtualStack() { #if VM_VERBOSE > 3 @@ -163,7 +163,7 @@ Block::Block(BlockVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, TiXmlEleme loadXML(stack_node, z_end); } -Block::Block(BlockVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, FILE* bin_file) throw (iom::exception) +Block::Block(BlockVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, FILE* bin_file) : VirtualStack() { #if VM_VERBOSE > 3 @@ -215,7 +215,7 @@ Block::~Block(void) delete[] DIR_NAME; } -void Block::init() throw (iom::exception) +void Block::init() { #if VM_VERBOSE > 3 printf("\t\t\t\tin Block[%d,%d]::init()\n",ROW_INDEX, COL_INDEX); @@ -325,7 +325,7 @@ void Block::init() throw (iom::exception) //binarizing-unbinarizing methods -void Block::binarizeInto(FILE* file) throw (iom::exception) +void Block::binarizeInto(FILE* file) { #if VM_VERBOSE > 3 printf("\t\t\t\tin Block[%d,%d]::binarizeInto(...)\n",ROW_INDEX, COL_INDEX); @@ -361,7 +361,7 @@ void Block::binarizeInto(FILE* file) throw (iom::exception) fwrite(&N_BYTESxCHAN, sizeof(int), 1, file); } -void Block::unBinarizeFrom(FILE* file) throw (iom::exception) +void Block::unBinarizeFrom(FILE* file) { #if VM_VERBOSE > 3 printf("\t\t\t\tin Block[%d,%d]::unBinarizeFrom(...)\n",ROW_INDEX, COL_INDEX); @@ -472,7 +472,7 @@ void Block::unBinarizeFrom(FILE* file) throw (iom::exception) //loads image stack from to extremes included, if not specified loads entire Stack -iom::real_t* Block::loadImageStack(int first_file, int last_file) throw (iom::exception) +iom::real_t* Block::loadImageStack(int first_file, int last_file) { #if VM_VERBOSE > 3 printf("\t\t\t\tin Block[%d,%d]::loadImageStack(first_file = %d, last_file = %d)\n",ROW_INDEX, COL_INDEX, first_file, last_file); @@ -761,7 +761,7 @@ void Block::loadXML( TiXmlElement *stack_node, int z_end) // 2014-09-05. Alessandro. @ADDED 'z_end' parameter to support sparse data feature // Here 'z_end' identifies the range [0, z_end) that slices can span -throw (iom::exception) + { #if VM_VERBOSE > 3 printf("\t\t\t\tin Block[%d,%d]::loadXML(TiXmlElement *stack_node)\n",ROW_INDEX, COL_INDEX); @@ -994,7 +994,7 @@ Segm_t* Block::Intersects(int D0, int D1) { void Block::compute_z_ranges( std::pair const * z_coords /*= 0*/) // pair of z-coordinates corresponding to the whole volume depth - throw (iom::exception) // if null, 'z_ranges' will be compute based on 'FILENAMES' vector + // if null, 'z_ranges' will be compute based on 'FILENAMES' vector { // if 'z_coords' has been provided, we use it to associate each file in 'FILENAMES' to the correspondent z-coordinate if(z_coords) @@ -1099,7 +1099,7 @@ void //loads image stack from to extremes included, if not specified loads entire Stack -iom::real_t* Block::loadImageStack2(int first_file, int last_file, int V0, int V1, int H0, int H1) throw (iom::exception) +iom::real_t* Block::loadImageStack2(int first_file, int last_file, int V0, int V1, int H0, int H1) { #if VM_VERBOSE > 3 printf("\t\t\t\tin Block[%d,%d]::loadImageStack(first_file = %d, last_file = %d)\n",ROW_INDEX, COL_INDEX, first_file, last_file); diff --git a/src/volumemanager/vmBlock.h b/src/volumemanager/vmBlock.h index d3f96ab1..e5090ad3 100644 --- a/src/volumemanager/vmBlock.h +++ b/src/volumemanager/vmBlock.h @@ -72,17 +72,17 @@ class vm::Block : public vm::VirtualStack Block(void){} //Initializes all object's members given DIR_NAME - void init() throw (iom::exception); + void init() ; //binarizing-unbinarizing methods - void binarizeInto(FILE* file) throw (iom::exception); - void unBinarizeFrom(FILE* file) throw (iom::exception); + void binarizeInto(FILE* file) ; + void unBinarizeFrom(FILE* file) ; // compute 'z_ranges' void compute_z_ranges( std::pair const * z_coords = 0) // set of z-coordinates where at least one slice (of a certain stack) is available - throw (iom::exception); // if null, 'z_ranges' will be compute based on 'FILENAMES' vector + ; // if null, 'z_ranges' will be compute based on 'FILENAMES' vector //returns a pointer to the intersection segment (along D) if the given segment (D0,D1-1) intersects current stack, otherwise returns NULL //D0 first index of the segment @@ -95,9 +95,9 @@ class vm::Block : public vm::VirtualStack public: //CONSTRUCTORS - Block(vm::BlockVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, const char* _DIR_NAME) throw (iom::exception); // build from scratch - Block(vm::BlockVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, FILE* bin_file) throw (iom::exception); // build from mdata.bin - Block(vm::BlockVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, TiXmlElement* stack_node, int &z_end) throw (iom::exception); // build from XML + Block(vm::BlockVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, const char* _DIR_NAME) ; // build from scratch + Block(vm::BlockVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, FILE* bin_file) ; // build from mdata.bin + Block(vm::BlockVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, TiXmlElement* stack_node, int &z_end) ; // build from XML /* parameter z_end is passed by reference because it can contain an invalid value (when the xml import file is externally generated) * in this case the constructor must initialize the parameter */ @@ -113,8 +113,8 @@ class vm::Block : public vm::VirtualStack void *getCONTAINER() {return CONTAINER;} //LOAD and RELEASE methods - iom::real_t* loadImageStack(int first_file=-1, int last_file=-1) throw (iom::exception); - iom::real_t* loadImageStack2(int first_file=-1, int last_file=-1, int V0=-1, int V1=-1, int H0=-1, int H1=-1) throw (iom::exception); + iom::real_t* loadImageStack(int first_file=-1, int last_file=-1) ; + iom::real_t* loadImageStack2(int first_file=-1, int last_file=-1, int V0=-1, int V1=-1, int H0=-1, int H1=-1) ; void releaseImageStack(); //XML methods @@ -123,7 +123,7 @@ class vm::Block : public vm::VirtualStack TiXmlElement *stack_node, int z_end) // 2014-09-05. Alessandro. @ADDED 'z_end' parameter to support sparse data feature // Here 'z_end' identifies the range [0, z_end) that slices can span - throw (iom::exception); + ; }; #endif //_BLOCK_H diff --git a/src/volumemanager/vmBlockVolume.cpp b/src/volumemanager/vmBlockVolume.cpp index 318406c7..de552a53 100644 --- a/src/volumemanager/vmBlockVolume.cpp +++ b/src/volumemanager/vmBlockVolume.cpp @@ -95,7 +95,7 @@ const std::string BlockVolume::creator_id1 = volumemanager::VirtualVolumeFactory const std::string BlockVolume::creator_id2 = volumemanager::VirtualVolumeFactory::registerPluginCreatorData(&createFromData, BlockVolume::id); -BlockVolume::BlockVolume(const char* _stacks_dir, vm::ref_sys _reference_system, float VXL_1, float VXL_2, float VXL_3, bool overwrite_mdata, std::string mdata_fname) throw (iom::exception) +BlockVolume::BlockVolume(const char* _stacks_dir, vm::ref_sys _reference_system, float VXL_1, float VXL_2, float VXL_3, bool overwrite_mdata, std::string mdata_fname) : VirtualVolume(_stacks_dir, _reference_system, VXL_1, VXL_2, VXL_3) { #if VM_VERBOSE > 3 @@ -149,7 +149,7 @@ BlockVolume::BlockVolume(const char* _stacks_dir, vm::ref_sys _reference_system, cb = new CacheBuffer(this); } -BlockVolume::BlockVolume(const char *xml_filepath, bool overwrite_mdata, std::string mdata_fname) throw (iom::exception) +BlockVolume::BlockVolume(const char *xml_filepath, bool overwrite_mdata, std::string mdata_fname) : VirtualVolume(xml_filepath) { #if VM_VERBOSE > 3 @@ -255,7 +255,7 @@ BlockVolume::~BlockVolume() -void BlockVolume::init() throw (iom::exception) +void BlockVolume::init() { #if VM_VERBOSE > 3 printf("\t\t\t\tin BlockVolume::init()\n"); @@ -393,13 +393,13 @@ void BlockVolume::init() throw (iom::exception) normalize_stacks_attributes(); } -void BlockVolume::initChannels() throw (iom::exception) +void BlockVolume::initChannels() { DIM_C = BLOCKS[0][0]->getN_CHANS(); BYTESxCHAN = BLOCKS[0][0]->getN_BYTESxCHAN(); } -void BlockVolume::applyReferenceSystem(vm::ref_sys reference_system, float VXL_1, float VXL_2, float VXL_3) throw (iom::exception) +void BlockVolume::applyReferenceSystem(vm::ref_sys reference_system, float VXL_1, float VXL_2, float VXL_3) { #if VM_VERBOSE > 3 printf("\t\t\t\tin BlockVolume::applyReferenceSystem(reference_system = {%d,%d,%d}, VXL_1 = %.2f, VXL_2 = %.2f, VXL_3 = %.2f)\n", @@ -547,7 +547,7 @@ void BlockVolume::applyReferenceSystem(vm::ref_sys reference_system, float VXL_1 } } -void BlockVolume::saveBinaryMetadata(char *metadata_filepath) throw (iom::exception) +void BlockVolume::saveBinaryMetadata(char *metadata_filepath) { #if VM_VERBOSE > 3 printf("\t\t\t\tin BlockVolume::saveBinaryMetadata(char *metadata_filepath = %s)\n", metadata_filepath); @@ -587,7 +587,7 @@ void BlockVolume::saveBinaryMetadata(char *metadata_filepath) throw (iom::except fclose(file); } -void BlockVolume::loadBinaryMetadata(char *metadata_filepath) throw (iom::exception) +void BlockVolume::loadBinaryMetadata(char *metadata_filepath) { #if VM_VERBOSE > 3 printf("\t\t\t\tin BlockVolume::loadBinaryMetadata(char *metadata_filepath = %s)\n", metadata_filepath); @@ -870,7 +870,7 @@ void BlockVolume::mirror(vm::axis mrr_axis) //check if volume is complete and coherent -bool BlockVolume::check(const char *errlogFileName) throw (iom::exception) +bool BlockVolume::check(const char *errlogFileName) { bool ok = true; FILE *errlogf; @@ -922,7 +922,7 @@ bool BlockVolume::check(const char *errlogFileName) throw (iom::exception) } -void BlockVolume::loadXML(const char *xml_filepath) throw (iom::exception) +void BlockVolume::loadXML(const char *xml_filepath) { #if VM_VERBOSE > 3 printf("\t\t\t\tin BlockVolume::loadXML(char *xml_filepath = %s)\n", xml_filepath); @@ -1065,7 +1065,7 @@ void BlockVolume::loadXML(const char *xml_filepath) throw (iom::exception) adjustDisplacements(); // 2018-02-03. Giulio. @ADDED correction of displacements to force them to be symmetric } -void BlockVolume::initFromXML(const char *xml_filepath) throw (iom::exception) +void BlockVolume::initFromXML(const char *xml_filepath) { #if VM_VERBOSE > 3 printf("\t\t\t\tin BlockVolume::initFromXML(char *xml_filename = %s)\n", xml_filename); @@ -1180,7 +1180,7 @@ void BlockVolume::initFromXML(const char *xml_filepath) throw (iom::exception) adjustDisplacements(); // 2018-02-03. Giulio. @ADDED correction of displacements to force them to be symmetric } -void BlockVolume::saveXML(const char *xml_filename, const char *xml_filepath) throw (iom::exception) +void BlockVolume::saveXML(const char *xml_filename, const char *xml_filepath) { #if VM_VERBOSE > 3 printf("\t\t\t\tin BlockVolume::saveXML(char *xml_filename = %s)\n", xml_filename); @@ -1278,7 +1278,7 @@ void BlockVolume::saveXML(const char *xml_filename, const char *xml_filepath) th xml.SaveFile(); } -void BlockVolume::releaseBuffers() throw (iom::exception) { +void BlockVolume::releaseBuffers() { for ( int r=0; rreleaseImageStack(); @@ -1360,7 +1360,7 @@ int BlockVolume::countStitchableStacks(float threshold) } // 2014-09-05. Alessandro. @ADDED 'normalize_stacks_attributes()' method to normalize stacks attributes (width, height, etc.) -void BlockVolume::normalize_stacks_attributes() throw (iom::exception) +void BlockVolume::normalize_stacks_attributes() { std::set heights, widths, nbytes, nchans; for(int i=0; i 3 @@ -116,7 +116,7 @@ MCVolume::MCVolume(const char* _stacks_dir, vm::ref_sys _reference_system, float active_channel = 0; } -MCVolume::MCVolume(const char *xml_filepath, bool overwrite_mdata) throw (iom::exception) +MCVolume::MCVolume(const char *xml_filepath, bool overwrite_mdata) : VirtualVolume(xml_filepath) { #if VM_VERBOSE > 3 @@ -185,7 +185,7 @@ MCVolume::~MCVolume() -void MCVolume::init() throw (iom::exception) +void MCVolume::init() { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); @@ -239,7 +239,7 @@ void MCVolume::init() throw (iom::exception) entries_lev1.clear(); } -void MCVolume::initChannels() throw (iom::exception) +void MCVolume::initChannels() { DIM_C = N_SUBVOLS; BYTESxCHAN = subvolumes[enabledSV]->getSTACKS()[0][0]->getN_BYTESxCHAN(); @@ -272,17 +272,17 @@ void MCVolume::resetTilePositions ( ) { } -void MCVolume::applyReferenceSystem(vm::ref_sys reference_system, float VXL_1, float VXL_2, float VXL_3) throw (iom::exception) +void MCVolume::applyReferenceSystem(vm::ref_sys reference_system, float VXL_1, float VXL_2, float VXL_3) { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); } -void MCVolume::saveBinaryMetadata(char *metadata_filepath) throw (iom::exception) +void MCVolume::saveBinaryMetadata(char *metadata_filepath) { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); } -void MCVolume::loadBinaryMetadata(char *metadata_filepath) throw (iom::exception) +void MCVolume::loadBinaryMetadata(char *metadata_filepath) { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); } @@ -301,7 +301,7 @@ void MCVolume::mirror(vm::axis mrr_axis) //check if volume is complete and coherent -bool MCVolume::check(const char *errlogFileName) throw (iom::exception) +bool MCVolume::check(const char *errlogFileName) { /**/iim::debug(iim::LEV3, 0, __iim__current__function__); @@ -338,7 +338,7 @@ bool MCVolume::check(const char *errlogFileName) throw (iom::exception) } -void MCVolume::loadXML(const char *xml_filepath) throw (iom::exception) +void MCVolume::loadXML(const char *xml_filepath) { // #if VM_VERBOSE > 3 // printf("\t\t\t\tin MCVolume::loadXML(char *xml_filepath = %s)\n", xml_filepath); @@ -479,7 +479,7 @@ void MCVolume::loadXML(const char *xml_filepath) throw (iom::exception) // //} } -void MCVolume::initFromXML(const char *xml_filepath) throw (iom::exception) +void MCVolume::initFromXML(const char *xml_filepath) { #if VM_VERBOSE > 3 printf("\t\t\t\tin MCVolume::initFromXML(char *xml_filename = %s)\n", xml_filename); @@ -591,7 +591,7 @@ void MCVolume::initFromXML(const char *xml_filepath) throw (iom::exception) } } -void MCVolume::saveXML(const char *xml_filename, const char *xml_filepath) throw (iom::exception) +void MCVolume::saveXML(const char *xml_filename, const char *xml_filepath) { #if VM_VERBOSE > 3 printf("\t\t\t\tin MCVolume::saveXML(char *xml_filename = %s)\n", xml_filename); diff --git a/src/volumemanager/vmMCVolume.h b/src/volumemanager/vmMCVolume.h index b322664b..e7ce9a97 100755 --- a/src/volumemanager/vmMCVolume.h +++ b/src/volumemanager/vmMCVolume.h @@ -69,14 +69,14 @@ class vm::MCVolume : public vm::VirtualVolume bool additionalIOPluginParams; // to avoid passing unnecessary additional parameters to ioplugins //Given the reference system, initializes all object's members using stack's directories hierarchy - void init() throw (iom::exception); - void initChannels() throw (iom::exception); + void init() ; + void initChannels() ; - void applyReferenceSystem(vm::ref_sys reference_system, float VXL_1, float VXL_2, float VXL_3) throw (iom::exception); + void applyReferenceSystem(vm::ref_sys reference_system, float VXL_1, float VXL_2, float VXL_3) ; //binary metadata load/save methods - void saveBinaryMetadata(char *metadata_filepath) throw (iom::exception); - void loadBinaryMetadata(char *metadata_filepath) throw (iom::exception); + void saveBinaryMetadata(char *metadata_filepath) ; + void loadBinaryMetadata(char *metadata_filepath) ; //rotate stacks matrix around D vm::axis (accepted values are theta=0,90,180,270) void rotate(int theta); @@ -85,7 +85,7 @@ class vm::MCVolume : public vm::VirtualVolume void mirror(vm::axis mrr_axis); // 2014-09-05. Alessandro. @ADDED 'normalize_stacks_attributes()' method to normalize stacks attributes (width, height, etc.) - //void normalize_stacks_attributes() throw (iom::exception); + //void normalize_stacks_attributes() ; public: @@ -94,8 +94,8 @@ class vm::MCVolume : public vm::VirtualVolume //CONSTRUCTORS-DECONSTRUCTOR MCVolume() : vm::VirtualVolume(){} - MCVolume(const char* _stacks_dir, vm::ref_sys reference_system = vm::ref_sys(vm::axis(0),vm::axis(0),vm::axis(0)), float VXL_1=0, float VXL_2=0, float VXL_3=0, bool overwrite_mdata=false) throw (iom::exception); - MCVolume(const char *xml_filepath, bool overwrite_mdata=false) throw (iom::exception); + MCVolume(const char* _stacks_dir, vm::ref_sys reference_system = vm::ref_sys(vm::axis(0),vm::axis(0),vm::axis(0)), float VXL_1=0, float VXL_2=0, float VXL_3=0, bool overwrite_mdata=false) ; + MCVolume(const char *xml_filepath, bool overwrite_mdata=false) ; ~MCVolume(); // ******GET METHODS****** @@ -129,9 +129,9 @@ class vm::MCVolume : public vm::VirtualVolume void setENABLEDSV ( int sv ) { enabledSV = sv; } //loads/saves metadata from/in the given xml filename - void loadXML(const char *xml_filename) throw (iom::exception); - void initFromXML(const char *xml_filename) throw (iom::exception); - void saveXML(const char *xml_filename=0, const char *xml_filepath=0) throw (iom::exception); + void loadXML(const char *xml_filename) ; + void initFromXML(const char *xml_filename) ; + void saveXML(const char *xml_filename=0, const char *xml_filepath=0) ; void releaseBuffers(); @@ -143,7 +143,7 @@ class vm::MCVolume : public vm::VirtualVolume //check if volume is complete and coherent; return true if the volume is ok, false otherwise //if a file name is passed and the volume is not ok an error log file is generated - bool check(const char *errlogFileName = 0) throw (iom::exception); + bool check(const char *errlogFileName = 0) ; //counts the total number of displacements and the number of displacements per pair of adjacent stacks void countDisplacements(int& total, float& per_stack_pair); diff --git a/src/volumemanager/vmStack.cpp b/src/volumemanager/vmStack.cpp index 4acf3be0..e5287f5a 100644 --- a/src/volumemanager/vmStack.cpp +++ b/src/volumemanager/vmStack.cpp @@ -70,7 +70,7 @@ using namespace vm; using namespace iom; //CONSTRUCTOR WITH ARGUMENTS -Stack::Stack(StackedVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, const char* _DIR_NAME) throw (iom::exception) +Stack::Stack(StackedVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, const char* _DIR_NAME) : VirtualStack() { #if VM_VERBOSE > 3 @@ -88,7 +88,7 @@ Stack::Stack(StackedVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, const ch } // 2015-01-17. Alessandro. @ADDED constructor for initialization from XML. -Stack::Stack(StackedVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, TiXmlElement* stack_node, int &z_end) throw (iom::exception) +Stack::Stack(StackedVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, TiXmlElement* stack_node, int &z_end) : VirtualStack() { #if VM_VERBOSE > 3 @@ -123,7 +123,7 @@ Stack::Stack(StackedVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, TiXmlEle loadXML(stack_node, z_end); } -Stack::Stack(StackedVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, FILE* bin_file) throw (iom::exception) +Stack::Stack(StackedVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, FILE* bin_file) : VirtualStack() { #if VM_VERBOSE > 3 @@ -162,7 +162,7 @@ Stack::~Stack() delete[] DIR_NAME; } -void Stack::init() throw (iom::exception) +void Stack::init() { #if VM_VERBOSE > 3 printf("\t\t\t\tin Stack[%d,%d]::init()\n",ROW_INDEX, COL_INDEX); @@ -250,7 +250,7 @@ void Stack::init() throw (iom::exception) } //binarizing-unbinarizing methods -void Stack::binarizeInto(FILE* file) throw (iom::exception) +void Stack::binarizeInto(FILE* file) { #if VM_VERBOSE > 3 printf("\t\t\t\tin Stack[%d,%d]::binarizeInto(...)\n",ROW_INDEX, COL_INDEX); @@ -279,7 +279,7 @@ void Stack::binarizeInto(FILE* file) throw (iom::exception) } } -void Stack::unBinarizeFrom(FILE* file) throw (iom::exception) +void Stack::unBinarizeFrom(FILE* file) { #if VM_VERBOSE > 3 printf("\t\t\t\tin Stack[%d,%d]::unBinarizeFrom(...)\n",ROW_INDEX, COL_INDEX); @@ -402,7 +402,7 @@ void Stack::loadXML( TiXmlElement *stack_node, int z_end) // 2014-09-05. Alessandro. @ADDED 'z_end' parameter to support sparse data feature // Here 'z_end' identifies the range [0, z_end) that slices can span -throw (iom::exception) + { #if VM_VERBOSE > 3 printf("\t\t\t\tin Stack[%d,%d]::loadXML(TiXmlElement *stack_node)\n",ROW_INDEX, COL_INDEX); @@ -560,7 +560,7 @@ throw (iom::exception) //loads image stack from to extremes included, if not specified loads entire Stack -iom::real_t* Stack::loadImageStack(int first_file, int last_file) throw (iom::exception) +iom::real_t* Stack::loadImageStack(int first_file, int last_file) { #if VM_VERBOSE > 3 printf("\t\t\t\tin Stack[%d,%d](%s, empty = %s)::loadImageStack(first_file = %d, last_file = %d)\n",ROW_INDEX, COL_INDEX, DIR_NAME, isEmpty() ? "true": "false", first_file, last_file); @@ -792,7 +792,7 @@ void Stack::releaseImageStack() void Stack::compute_z_ranges( std::set const * z_coords /*= 0*/) // set of z-coordinates where at least one slice (of a certain stack) is available - throw (iom::exception) // if null, 'z_ranges' will be compute based on 'FILENAMES' vector + // if null, 'z_ranges' will be compute based on 'FILENAMES' vector { // if 'z_coords' has been provided, we use it to associate each file in 'FILENAMES' to the correspondent z-coordinate if(z_coords) @@ -847,7 +847,7 @@ void //loads image stack from to extremes included, if not specified loads entire Stack -iom::real_t* Stack::loadImageStack2(int first_file, int last_file, int V0, int V1, int H0, int H1) throw (iom::exception) +iom::real_t* Stack::loadImageStack2(int first_file, int last_file, int V0, int V1, int H0, int H1) { #if VM_VERBOSE > 3 printf("\t\t\t\tin Stack[%d,%d](%s, empty = %s)::loadImageStack(first_file = %d, last_file = %d)\n",ROW_INDEX, COL_INDEX, DIR_NAME, isEmpty() ? "true": "false", first_file, last_file); diff --git a/src/volumemanager/vmStack.h b/src/volumemanager/vmStack.h index 861d70df..fc00e195 100644 --- a/src/volumemanager/vmStack.h +++ b/src/volumemanager/vmStack.h @@ -57,17 +57,17 @@ class vm::Stack : public vm::VirtualStack Stack(void){} //Initializes all object's members - void init() throw (iom::exception); + void init() ; //binarizing-unbinarizing methods - void binarizeInto(FILE* file) throw (iom::exception); - void unBinarizeFrom(FILE* file) throw (iom::exception); + void binarizeInto(FILE* file) ; + void unBinarizeFrom(FILE* file) ; // compute 'z_ranges' void compute_z_ranges( std::set const * z_coords = 0) // set of z-coordinates where at least one slice (of a certain stack) is available - throw (iom::exception); // if null, 'z_ranges' will be compute based on 'FILENAMES' vector + ; // if null, 'z_ranges' will be compute based on 'FILENAMES' vector //******** FRIEND CLASS DECLARATION ********* //StackedVolume can access Stack private members and methods @@ -76,9 +76,9 @@ class vm::Stack : public vm::VirtualStack public: //CONSTRUCTORS - Stack(vm::StackedVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, const char* _DIR_NAME) throw (iom::exception); // build from scratch - Stack(vm::StackedVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, FILE* bin_file) throw (iom::exception); // build from mdata.bin - Stack(vm::StackedVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, TiXmlElement* stack_node, int &z_end) throw (iom::exception); // build from XML + Stack(vm::StackedVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, const char* _DIR_NAME) ; // build from scratch + Stack(vm::StackedVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, FILE* bin_file) ; // build from mdata.bin + Stack(vm::StackedVolume* _CONTAINER, int _ROW_INDEX, int _COL_INDEX, TiXmlElement* stack_node, int &z_end) ; // build from XML /* parameter z_end is passed by reference because it can contain an invalid value (when the xml import file is externally generated) * in this case the constructor must initialize the parameter */ @@ -91,8 +91,8 @@ class vm::Stack : public vm::VirtualStack int getN_BYTESxCHAN() {return N_BYTESxCHAN;} //LOAD and RELEASE methods - iom::real_t* loadImageStack(int first_file=-1, int last_file=-1) throw (iom::exception); - iom::real_t* loadImageStack2(int first_file=-1, int last_file=-1, int V0=-1, int V1=-1, int H0=-1, int H1=-1) throw (iom::exception); + iom::real_t* loadImageStack(int first_file=-1, int last_file=-1) ; + iom::real_t* loadImageStack2(int first_file=-1, int last_file=-1, int V0=-1, int V1=-1, int H0=-1, int H1=-1) ; void releaseImageStack(); //XML methods @@ -101,7 +101,7 @@ class vm::Stack : public vm::VirtualStack TiXmlElement *stack_node, int z_end) // 2014-09-05. Alessandro. @ADDED 'z_end' parameter to support sparse data feature // Here 'z_end' identifies the range [0, z_end) that slices can span - throw (iom::exception); + ; }; #endif /* STACK_H_ */ diff --git a/src/volumemanager/vmStackedVolume.cpp b/src/volumemanager/vmStackedVolume.cpp index 442d122d..90aabfef 100644 --- a/src/volumemanager/vmStackedVolume.cpp +++ b/src/volumemanager/vmStackedVolume.cpp @@ -96,7 +96,7 @@ const std::string StackedVolume::id = "TiledXY|2Dseries"; const std::string StackedVolume::creator_id1 = volumemanager::VirtualVolumeFactory::registerPluginCreatorXML(&createFromXML, StackedVolume::id); const std::string StackedVolume::creator_id2 = volumemanager::VirtualVolumeFactory::registerPluginCreatorData(&createFromData, StackedVolume::id); -StackedVolume::StackedVolume(const char* _stacks_dir, vm::ref_sys _reference_system, float VXL_1, float VXL_2, float VXL_3, bool overwrite_mdata, std::string mdata_fname) throw (iom::exception) +StackedVolume::StackedVolume(const char* _stacks_dir, vm::ref_sys _reference_system, float VXL_1, float VXL_2, float VXL_3, bool overwrite_mdata, std::string mdata_fname) : VirtualVolume(_stacks_dir, _reference_system, VXL_1, VXL_2, VXL_3) { #if VM_VERBOSE > 3 @@ -147,7 +147,7 @@ StackedVolume::StackedVolume(const char* _stacks_dir, vm::ref_sys _reference_sys cb = new CacheBuffer(this); } -StackedVolume::StackedVolume(const char *xml_filepath, bool overwrite_mdata, std::string mdata_fname) throw (iom::exception) +StackedVolume::StackedVolume(const char *xml_filepath, bool overwrite_mdata, std::string mdata_fname) : VirtualVolume(xml_filepath) { #if VM_VERBOSE > 3 @@ -273,7 +273,7 @@ VirtualStack*** StackedVolume::getSTACKS() {return (VirtualStack***)this->ST //int StackedVolume::getDEFAULT_DISPLACEMENT_H() {return (int)(fabs(MEC_H/VXL_H));} //int StackedVolume::getDEFAULT_DISPLACEMENT_D() {return 0;} -void StackedVolume::init() throw (iom::exception) +void StackedVolume::init() { #if VM_VERBOSE > 3 printf("\t\t\t\tin StackedVolume::init()\n"); @@ -389,13 +389,13 @@ void StackedVolume::init() throw (iom::exception) normalize_stacks_attributes(); } -void StackedVolume::initChannels() throw (iom::exception) +void StackedVolume::initChannels() { DIM_C = STACKS[0][0]->getN_CHANS(); BYTESxCHAN = STACKS[0][0]->getN_BYTESxCHAN(); } -void StackedVolume::applyReferenceSystem(vm::ref_sys reference_system, float VXL_1, float VXL_2, float VXL_3) throw (iom::exception) +void StackedVolume::applyReferenceSystem(vm::ref_sys reference_system, float VXL_1, float VXL_2, float VXL_3) { #if VM_VERBOSE > 3 printf("\t\t\t\tin StackedVolume::applyReferenceSystem(reference_system = {%d,%d,%d}, VXL_1 = %.2f, VXL_2 = %.2f, VXL_3 = %.2f)\n", @@ -529,7 +529,7 @@ void StackedVolume::applyReferenceSystem(vm::ref_sys reference_system, float VXL } } -void StackedVolume::loadXML(const char *xml_filepath) throw (iom::exception) +void StackedVolume::loadXML(const char *xml_filepath) { #if VM_VERBOSE > 3 printf("\t\t\t\tin StackedVolume::loadXML(char *xml_filepath = %s)\n", xml_filepath); @@ -628,7 +628,7 @@ void StackedVolume::loadXML(const char *xml_filepath) throw (iom::exception) adjustDisplacements(); // 2018-02-03. Giulio. @ADDED correction of displacements to force them to be symmetric } -void StackedVolume::initFromXML(const char *xml_filepath) throw (iom::exception) +void StackedVolume::initFromXML(const char *xml_filepath) { #if VM_VERBOSE > 3 printf("\t\t\t\tin StackedVolume::initFromXML(char *xml_filename = %s)\n", xml_filepath); @@ -715,7 +715,7 @@ void StackedVolume::initFromXML(const char *xml_filepath) throw (iom::exception) adjustDisplacements(); // 2018-02-03. Giulio. @ADDED correction of displacements to force them to be symmetric } -void StackedVolume::saveXML(const char *xml_filename, const char *xml_filepath) throw (iom::exception) +void StackedVolume::saveXML(const char *xml_filename, const char *xml_filepath) { #if VM_VERBOSE > 3 printf("\t\t\t\tin StackedVolume::saveXML(char *xml_filename = %s)\n", xml_filename); @@ -803,13 +803,13 @@ void StackedVolume::saveXML(const char *xml_filename, const char *xml_filepath) xml.SaveFile(); } -void StackedVolume::releaseBuffers() throw (iom::exception) { +void StackedVolume::releaseBuffers() { for ( int r=0; rreleaseImageStack(); } -void StackedVolume::saveBinaryMetadata(char *metadata_filepath) throw (iom::exception) +void StackedVolume::saveBinaryMetadata(char *metadata_filepath) { #if VM_VERBOSE > 3 printf("\t\t\t\tin StackedVolume::saveBinaryMetadata(char *metadata_filepath = %s)\n", metadata_filepath); @@ -865,7 +865,7 @@ void StackedVolume::saveBinaryMetadata(char *metadata_filepath) throw (iom::exce fclose(file); } -void StackedVolume::loadBinaryMetadata(char *metadata_filepath) throw (iom::exception) +void StackedVolume::loadBinaryMetadata(char *metadata_filepath) { #if VM_VERBOSE > 3 printf("\t\t\t\tin StackedVolume::loadBinaryMetadata(char *metadata_filepath = %s)\n", metadata_filepath); @@ -1140,7 +1140,7 @@ void StackedVolume::rotate(int theta) } //mirror stacks matrix along mrr_axis (accepted values are mrr_axis=1,2,3) -void StackedVolume::mirror(vm::axis mrr_axis) throw (iom::exception) +void StackedVolume::mirror(vm::axis mrr_axis) { #if VM_VERBOSE > 3 printf("\t\t\t\tin StackedVolume::mirror(mrr_axis = %d)\n", mrr_axis); @@ -1202,7 +1202,7 @@ void StackedVolume::mirror(vm::axis mrr_axis) throw (iom::exception) //check if volume is complete and coherent -bool StackedVolume::check(const char *errlogFileName) throw (iom::exception) +bool StackedVolume::check(const char *errlogFileName) { bool ok = true; FILE *errlogf; @@ -1315,7 +1315,7 @@ int StackedVolume::countStitchableStacks(float threshold) } // print mdata.bin content to stdout -void StackedVolume::dumpMData(const char* volumePath) throw (iom::exception) +void StackedVolume::dumpMData(const char* volumePath) { char mdata_filepath[VM_STATIC_STRINGS_SIZE]; sprintf(mdata_filepath, "%s/%s", volumePath, vm::BINARY_METADATA_FILENAME.c_str()); @@ -1647,7 +1647,7 @@ void StackedVolume::dumpMData(const char* volumePath) throw (iom::exception) } // 2014-09-05. Alessandro. @ADDED 'check_stacks_same_dims()' method to check that stacks have same width and height -void StackedVolume::normalize_stacks_attributes() throw (iom::exception) +void StackedVolume::normalize_stacks_attributes() { std::set heights, widths; for(int i=0; i //initialization methods - void init() throw (iom::exception); - void initChannels() throw (iom::exception); - void applyReferenceSystem(vm::ref_sys reference_system, float VXL_1, float VXL_2, float VXL_3) throw (iom::exception); + void init() ; + void initChannels() ; + void applyReferenceSystem(vm::ref_sys reference_system, float VXL_1, float VXL_2, float VXL_3) ; //binary metadata load/save methods - void saveBinaryMetadata(char *metadata_filepath) throw (iom::exception); - void loadBinaryMetadata(char *metadata_filepath) throw (iom::exception); + void saveBinaryMetadata(char *metadata_filepath) ; + void loadBinaryMetadata(char *metadata_filepath) ; //rotates stacks matrix around D vm::axis (accepted values are theta=0,90,180,270) void rotate(int theta); //mirrors stacks matrix along mrr_axis (accepted values are mrr_axis=1,2,3) - void mirror(vm::axis mrr_axis) throw (iom::exception); + void mirror(vm::axis mrr_axis) ; // 2014-09-05. Alessandro. @ADDED 'normalize_stacks_attributes()' method to normalize stacks attributes (width, height, etc.) - void normalize_stacks_attributes() throw (iom::exception); + void normalize_stacks_attributes() ; public: @@ -94,8 +94,8 @@ class vm::StackedVolume : public vm::VirtualVolume //CONSTRUCTORS-DECONSTRUCTOR StackedVolume() : vm::VirtualVolume(){ STACKS = (vm::Stack ***) 0; } - StackedVolume(const char* _stacks_dir, vm::ref_sys reference_system, float VXL_1=0, float VXL_2=0, float VXL_3=0, bool overwrite_mdata=false, std::string mdata_fname="") throw (iom::exception); - StackedVolume(const char *xml_filepath, bool overwrite_mdata=false, std::string mdata_fname="") throw (iom::exception); + StackedVolume(const char* _stacks_dir, vm::ref_sys reference_system, float VXL_1=0, float VXL_2=0, float VXL_3=0, bool overwrite_mdata=false, std::string mdata_fname="") ; + StackedVolume(const char *xml_filepath, bool overwrite_mdata=false, std::string mdata_fname="") ; ~StackedVolume(); // ******GET METHODS****** @@ -104,11 +104,11 @@ class vm::StackedVolume : public vm::VirtualVolume vm::VirtualStack*** getSTACKS(); //loads/saves metadata from/in the given xml filename - void loadXML(const char *xml_filename) throw (iom::exception); - void initFromXML(const char *xml_filename) throw (iom::exception); - void saveXML(const char *xml_filename=0, const char *xml_filepath=0) throw (iom::exception); + void loadXML(const char *xml_filename) ; + void initFromXML(const char *xml_filename) ; + void saveXML(const char *xml_filename=0, const char *xml_filepath=0) ; - void releaseBuffers() throw (iom::exception); + void releaseBuffers() ; /********************************************************************************** * UTILITY methods @@ -116,7 +116,7 @@ class vm::StackedVolume : public vm::VirtualVolume //check if volume is complete and coherent; return true if the volume is ok, false otherwise //if a file name is passed and thevolume is not ok an error log file is generated - bool check(const char *errlogFileName = 0) throw (iom::exception); + bool check(const char *errlogFileName = 0) ; //counts the total number of displacements and the number of displacements per pair of adjacent stacks void countDisplacements(int& total, float& per_stack_pair); @@ -128,7 +128,7 @@ class vm::StackedVolume : public vm::VirtualVolume int countStitchableStacks(float threshold); // print mdata.bin content to stdout - static void dumpMData(const char* volumePath) throw (iom::exception); + static void dumpMData(const char* volumePath) ; }; namespace{ diff --git a/src/volumemanager/vmVirtualStack.cpp b/src/volumemanager/vmVirtualStack.cpp index 3732a5d2..0e287097 100644 --- a/src/volumemanager/vmVirtualStack.cpp +++ b/src/volumemanager/vmVirtualStack.cpp @@ -95,7 +95,7 @@ bool VirtualStack::isEmpty(int z0, int z1) } // read img_regex from xml stack node -std::string VirtualStack::readImgRegex(TiXmlElement *stack_node) throw (iom::exception) +std::string VirtualStack::readImgRegex(TiXmlElement *stack_node) { // check for valid stack node if(!stack_node) @@ -113,7 +113,7 @@ std::string VirtualStack::readImgRegex(TiXmlElement *stack_node) throw (iom::exc } // write img_regex to the xml stack node -void VirtualStack::writeImgRegex(TiXmlElement *stack_node) throw (iom::exception) +void VirtualStack::writeImgRegex(TiXmlElement *stack_node) { stack_node->SetAttribute("IMG_REGEX",img_regex.c_str()); } diff --git a/src/volumemanager/vmVirtualStack.h b/src/volumemanager/vmVirtualStack.h index 200ad173..7dd83c16 100644 --- a/src/volumemanager/vmVirtualStack.h +++ b/src/volumemanager/vmVirtualStack.h @@ -77,8 +77,8 @@ class vm::VirtualStack // 2015-01-17. Alessandro. @ADDED support for all-in-one-folder data (import from xml only). // Each stack can be associated with a regular expression to filter image filenames. std::string img_regex; - virtual std::string readImgRegex(TiXmlElement *stack_node) throw (iom::exception); - virtual void writeImgRegex(TiXmlElement *stack_node) throw (iom::exception); + virtual std::string readImgRegex(TiXmlElement *stack_node) ; + virtual void writeImgRegex(TiXmlElement *stack_node) ; public: @@ -99,7 +99,7 @@ class vm::VirtualStack int getABS_V() {return ABS_V;} int getABS_H() {return ABS_H;} int getABS_D() {return ABS_D;} - int getABS(int direction) throw (iom::exception) + int getABS(int direction) { #if VM_VERBOSE > 4 printf("........in Stack[%d,%d]::getABS(direction = %d)\n",ROW_INDEX, COL_INDEX, direction); @@ -129,7 +129,7 @@ class vm::VirtualStack bool isEmpty(){return z_ranges.empty();} bool isSparse(){return !isEmpty() && !isComplete(0, DEPTH-1);} - Displacement* getDisplacement(VirtualStack* neighbour) throw (iom::exception) + Displacement* getDisplacement(VirtualStack* neighbour) { #if VM_VERBOSE > 4 printf("........in Stack[%d,%d]::getDisplacement(Stack* neighbour[%d,%d])\n",ROW_INDEX, COL_INDEX, neighbour->ROW_INDEX, neighbour->COL_INDEX); @@ -159,7 +159,7 @@ class vm::VirtualStack void setABS_V (int _ABS_V) {ABS_V = _ABS_V; } void setABS_H (int _ABS_H) {ABS_H = _ABS_H; } void setABS_D (int _ABS_D) {ABS_D = _ABS_D; } - void setABS (int _ABS, int direction) throw (iom::exception) + void setABS (int _ABS, int direction) { #if VM_VERBOSE > 4 printf("........in Stack[%d,%d]::setABS(_ABS = %d, direction = %d)\n",ROW_INDEX, COL_INDEX, _ABS, direction); @@ -177,8 +177,8 @@ class vm::VirtualStack void setStitchable(bool _stitchable){this->stitchable = _stitchable;} //LOAD and RELEASE methods - virtual iom::real_t* loadImageStack(int first_file=-1, int last_file=-1) throw (iom::exception) = 0; - virtual iom::real_t* loadImageStack2(int first_file=-1, int last_file=-1, int V0=-1, int V1=-1, int H0=-1, int H1=-1) throw (iom::exception) = 0; + virtual iom::real_t* loadImageStack(int first_file=-1, int last_file=-1) = 0; + virtual iom::real_t* loadImageStack2(int first_file=-1, int last_file=-1, int V0=-1, int V1=-1, int H0=-1, int H1=-1) = 0; virtual void releaseImageStack()= 0; void releaseImageStackOwnership() { STACKED_IMAGE = 0; } @@ -194,7 +194,7 @@ class vm::VirtualStack TiXmlElement *stack_node, int z_end) // 2014-09-05. Alessandro. @ADDED 'z_end' parameter to support sparse data feature // Here 'z_end' identifies the range [0, z_end) that slices can span - throw (iom::exception)= 0; + = 0; }; #endif diff --git a/src/volumemanager/vmVirtualVolume.cpp b/src/volumemanager/vmVirtualVolume.cpp index b9ae2627..a3dfe63d 100644 --- a/src/volumemanager/vmVirtualVolume.cpp +++ b/src/volumemanager/vmVirtualVolume.cpp @@ -82,7 +82,7 @@ VirtualVolume::~VirtualVolume() { delete cb; } -void VirtualVolume::init() throw (iom::exception) +void VirtualVolume::init() { stacks_dir = 0; mdata_filepath = (char *) 0; // 2021-02-12. Giulio. @FIXED initialization was missing @@ -120,7 +120,7 @@ void VirtualVolume::init() throw (iom::exception) } //returns true if file exists at the given filepath -bool VirtualVolume::fileExists(const char *filepath) throw (iom::exception) +bool VirtualVolume::fileExists(const char *filepath) { //LOCAL VARIABLES string file_path_string =filepath; @@ -164,7 +164,7 @@ bool VirtualVolume::fileExists(const char *filepath) throw (iom::exception) // returns the Z-coordinate string extracted from the given filename. Supported filenames formats are // [0-9]+_[0-9]+_[0-9]+.* and // [0-9]+.* -std::string VirtualVolume::name2coordZ(const std::string & filename) throw (iom::exception) +std::string VirtualVolume::name2coordZ(const std::string & filename) { // split string using "_" token (also works if "_" is not present) std::vector tokens; @@ -247,7 +247,7 @@ void VirtualVolume::extractCoordinates(VirtualStack* stk, int z, int* crd_1, int } //inserts the given displacements in the given stacks -void VirtualVolume::insertDisplacement(VirtualStack *stk_A, VirtualStack *stk_B, Displacement *displacement) throw (iom::exception) +void VirtualVolume::insertDisplacement(VirtualStack *stk_A, VirtualStack *stk_B, Displacement *displacement) { int stk_A_row = stk_A->getROW_INDEX(); int stk_A_col = stk_A->getCOL_INDEX(); @@ -312,7 +312,7 @@ void VirtualVolume::adjustDisplacements ( ) { // return 'volume_format' attribute of node from the given xml. -std::string VirtualVolume::getVolumeFormat(const std::string& xml_path) throw (iom::exception) +std::string VirtualVolume::getVolumeFormat(const std::string& xml_path) { // open xml TiXmlDocument xml; @@ -332,7 +332,7 @@ std::string VirtualVolume::getVolumeFormat(const std::string& xml_path) throw (i // return 'input_plugin' attribute of node from the given xml or a null string. -std::string VirtualVolume::getInputPlugin(const std::string& xml_path) throw (iom::exception) +std::string VirtualVolume::getInputPlugin(const std::string& xml_path) { // open xml TiXmlDocument xml; diff --git a/src/volumemanager/vmVirtualVolume.h b/src/volumemanager/vmVirtualVolume.h index b9a62697..f965f227 100644 --- a/src/volumemanager/vmVirtualVolume.h +++ b/src/volumemanager/vmVirtualVolume.h @@ -82,12 +82,12 @@ class volumemanager::VirtualVolume CacheBuffer *cb; //initialization methods - virtual void init() throw (iom::exception); - virtual void applyReferenceSystem(vm::ref_sys reference_system, float VXL_1, float VXL_2, float VXL_3) throw (iom::exception)=0; + virtual void init() ; + virtual void applyReferenceSystem(vm::ref_sys reference_system, float VXL_1, float VXL_2, float VXL_3) =0; //binary metadata load/save methods - virtual void saveBinaryMetadata(char *metadata_filepath) throw (iom::exception)=0; - virtual void loadBinaryMetadata(char *metadata_filepath) throw (iom::exception)=0; + virtual void saveBinaryMetadata(char *metadata_filepath) =0; + virtual void loadBinaryMetadata(char *metadata_filepath) =0; //rotates stacks matrix around D vm::axis (accepted values are theta=0,90,180,270) virtual void rotate(int theta)=0; @@ -110,7 +110,7 @@ class volumemanager::VirtualVolume cb = (CacheBuffer *) 0; } - VirtualVolume(const char* _stacks_dir, vm::ref_sys _reference_system, float VXL_1=0, float VXL_2=0, float VXL_3=0) throw (iom::exception) + VirtualVolume(const char* _stacks_dir, vm::ref_sys _reference_system, float VXL_1=0, float VXL_2=0, float VXL_3=0) { init(); @@ -128,7 +128,7 @@ class volumemanager::VirtualVolume cb = (CacheBuffer *) 0; } - VirtualVolume(const char* xml_path) throw (iom::exception){ + VirtualVolume(const char* xml_path) { stacks_dir = (char *) 0; // added to prevent destructor from releasing a non-null pointer mdata_filepath = (char *) 0; // added to prevent destructor from releasing a non-null pointer init(); @@ -174,28 +174,28 @@ class volumemanager::VirtualVolume //loads/saves metadata from/in the given xml filename virtual void loadXML(const char *xml_filename) = 0; virtual void initFromXML(const char *xml_filename) = 0; - virtual void saveXML(const char *xml_filename=0, const char *xml_filepath=0) throw (iom::exception) = 0; + virtual void saveXML(const char *xml_filename=0, const char *xml_filepath=0) = 0; virtual void releaseBuffers() = 0; // 2014-09-10. Alessandro. @ADDED 'getVolumeFormat' method to be applied on xml file. // return 'volume_format' attribute of node from the given xml. - static std::string getVolumeFormat(const std::string& xml_path) throw (iom::exception); + static std::string getVolumeFormat(const std::string& xml_path) ; // 2017-04-27. Giulio. @ADDED 'getInputPlugin' method to be applied on xml file. // return 'input_plugin' attribute of node from the given xml if present // return an empty string if the attribute is not present (for compatibility reasons). - static std::string getInputPlugin(const std::string& xml_path) throw (iom::exception); + static std::string getInputPlugin(const std::string& xml_path) ; //inserts the given displacement in the given stacks - void insertDisplacement(VirtualStack *stk_A, VirtualStack *stk_B, Displacement *displacement) throw (iom::exception); + void insertDisplacement(VirtualStack *stk_A, VirtualStack *stk_B, Displacement *displacement) ; /********************************************************************************** * UTILITY methods ***********************************************************************************/ //check if volume is complete and coherent; return true if the volume is ok, false otherwise //if a file name is passed and thevolume is not ok an error log file is generated - virtual bool check(const char *errlogFileName = 0) throw (iom::exception)=0; + virtual bool check(const char *errlogFileName = 0) =0; //counts the total number of displacements and the number of displacements per pair of adjacent stacks virtual void countDisplacements(int& total, float& per_stack_pair) = 0; @@ -207,12 +207,12 @@ class volumemanager::VirtualVolume virtual int countStitchableStacks(float threshold) = 0; //returns true if file exists at the given filepath - static bool fileExists(const char *filepath) throw (iom::exception); + static bool fileExists(const char *filepath) ; // returns the Z-coordinate string extracted from the given filename. Supported filenames formats are // [0-9]+_[0-9]+_[0-9]+.* and // [0-9]+.* - static std::string name2coordZ(const std::string & filename) throw (iom::exception); + static std::string name2coordZ(const std::string & filename) ; }; @@ -251,21 +251,21 @@ class volumemanager::VirtualVolumeFactory } // plugin instantiation - static VirtualVolume* createFromXML(const char* xml_path, bool ow_mdata) throw (iom::exception) + static VirtualVolume* createFromXML(const char* xml_path, bool ow_mdata) { std::string id = VirtualVolume::getVolumeFormat(xml_path); if(instance()->creators_xml.find(id) == instance()->creators_xml.end()) throw iom::exception(iom::strprintf("Cannot find VirtualVolume(xml) plugin \"%s\": no such plugin", id.c_str()).c_str()); return (instance()->creators_xml[id])(xml_path, ow_mdata); } - static VirtualVolume* createFromXML(std::string id, const char* xml_path, bool ow_mdata) throw (iom::exception) + static VirtualVolume* createFromXML(std::string id, const char* xml_path, bool ow_mdata) { if(instance()->creators_xml.find(id) == instance()->creators_xml.end()) throw iom::exception(iom::strprintf("Cannot find VirtualVolume(xml) plugin \"%s\": no such plugin", id.c_str()).c_str()); return (instance()->creators_xml[id])(xml_path, ow_mdata); } - static VirtualVolume* createFromData(std::string id, const char* data_path, vm::ref_sys ref, float vxl1, float vxl2, float vxl3, bool ow_mdata, std::string mdata_fname="") throw (iom::exception) + static VirtualVolume* createFromData(std::string id, const char* data_path, vm::ref_sys ref, float vxl1, float vxl2, float vxl3, bool ow_mdata, std::string mdata_fname="") { if(instance()->creators_data.find(id) == instance()->creators_data.end()) throw iom::exception(iom::strprintf("Cannot find VirtualVolume(data) plugin \"%s\": no such plugin", id.c_str()).c_str());