Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove exception declaration #93

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 24 additions & 22 deletions src/common/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,27 @@
#include <QtGui>
#endif

/*******************************************************************************************************************************
* Interfaces, types, parameters and constants *
*******************************************************************************************************************************/
namespace terastitcher
{
/*******************
* PARAMETERS *
********************
---------------------------------------------------------------------------------------------------------------------------*/
std::string version = num2str<int>(TERASTITCHER_MAJOR) + "." + num2str<int>(TERASTITCHER_MINOR) + "." + num2str<int>(TERASTITCHER_PATCH);
std::string teraconverter_version = num2str<int>(TERACONVERTER_MAJOR) + "." + num2str<int>(TERACONVERTER_MINOR) + "." + num2str<int>(TERACONVERTER_PATCH);
std::string terastitcher2_version = num2str<int>(TERASTITCHER2_MAJOR) + "." + num2str<int>(TERASTITCHER2_MINOR) + "." + num2str<int>(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
/*-------------------------------------------------------------------------------------------------------------------------*/
}
/*******************************************************************************************************************************
* Interfaces, types, parameters and constants *
*******************************************************************************************************************************/
namespace terastitcher
{
/*******************
* PARAMETERS *
********************
---------------------------------------------------------------------------------------------------------------------------*/
std::string version = num2str<int>(TERASTITCHER_MAJOR) + "." + num2str<int>(TERASTITCHER_MINOR) + "." + num2str<int>(TERASTITCHER_PATCH);
std::string teraconverter_version = num2str<int>(TERACONVERTER_MAJOR) + "." + num2str<int>(TERACONVERTER_MINOR) + "." + num2str<int>(TERACONVERTER_PATCH);
std::string terastitcher2_version = num2str<int>(TERASTITCHER2_MAJOR) + "." + num2str<int>(TERASTITCHER2_MINOR) + "." + num2str<int>(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
/*-------------------------------------------------------------------------------------------------------------------------*/
}


2 changes: 1 addition & 1 deletion src/crossmips/CrossMIPs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/crossmips/compute_funcs.cu
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/crossmips/compute_funcs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/crossmips/libcrossmips.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
8 changes: 4 additions & 4 deletions src/imagemanager/BDVVolume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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<Block*> *involved_blocks, bool release_blocks) throw (IOException)
real32* BDVVolume::loadSubvolume(int V0,int V1, int H0, int H1, int D0, int D1, list<Block*> *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__);

Expand Down Expand Up @@ -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__);

Expand Down
14 changes: 7 additions & 7 deletions src/imagemanager/BDVVolume.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;}
Expand All @@ -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<iim::Block*> *involved_blocks = 0, bool release_blocks = false) throw (iim::IOException);
std::list<iim::Block*> *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;
Expand Down
10 changes: 5 additions & 5 deletions src/imagemanager/ComposedVolume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -94,7 +94,7 @@ iim::uint8 *ComposedVolume::loadSubvolume_to_UINT8(int V0,int V1, int H0, int H1


// return 'volume_format' attribute of <TeraStitcher> 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;
Expand Down
12 changes: 6 additions & 6 deletions src/imagemanager/ComposedVolume.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;}
Expand All @@ -80,21 +80,21 @@ class iim::ComposedVolume : public iim::VirtualVolume
iim::ref_sys getREF_SYS(){return reference_system;}

// return 'volume_format' attribute of <TeraStitcher> 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(
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
/*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;}
Expand Down
2 changes: 1 addition & 1 deletion src/imagemanager/HDF5Mngr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/imagemanager/HDF5Mngr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading