Skip to content

Commit d271494

Browse files
committed
Update for ver 1.1
1 parent 2577e0b commit d271494

File tree

124 files changed

+10105
-15711
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+10105
-15711
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
[Tt]est/
66
[Bb]oost*/
77
[Dd]ist/
8+
P3D_Test/
9+
P3D_ITKWrapped*/
10+
pthreads/
11+
812

913
# Pore3D-specific files
1014
*.raw*

P3D_Blob/Common/p3dConnectedComponentsLabeling_uint.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -806,5 +806,5 @@ int p3dConnectedComponentsLabeling_uint(
806806
if (tmp_out_rev != NULL) free(tmp_in_rev);
807807

808808
// Return error code:
809-
return P3D_MEM_ERROR;
809+
return P3D_ERROR;
810810
}

P3D_Blob/Common/p3dConnectedComponentsLabeling_ushort.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -810,5 +810,5 @@ int p3dConnectedComponentsLabeling_ushort(
810810
if (tmp_out_rev != NULL) free(tmp_in_rev);
811811

812812
// Return error code:
813-
return P3D_MEM_ERROR;
813+
return P3D_ERROR;
814814
}

P3D_Blob/Common/p3dCoordsList.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ int coords_list_push (coords_list_t *list, coords_t item)
4444

4545
/* Allocate memory for the new item: */
4646
new_l = (coords_list_elem_t*) malloc (sizeof(coords_list_elem_t));
47-
if ( new_l == NULL ) return P3D_MEM_ERROR;
47+
if ( new_l == NULL ) return P3D_ERROR;
4848

4949
/* Push item into list: */
5050
new_l->elem = item;

P3D_Blob/Common/p3dFCoordsList.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ int fcoords_list_push (fcoords_list_t *list, fcoords_t item)
4242

4343
/* Allocate memory for the new item: */
4444
new_l = (fcoords_list_elem_t*) malloc (sizeof(fcoords_list_elem_t));
45-
if ( new_l == NULL ) return P3D_MEM_ERROR;
45+
if ( new_l == NULL ) return P3D_ERROR;
4646

4747
/* Push item into list: */
4848
new_l->elem = item;

P3D_Blob/Common/p3dUtils.h

+8-6
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,13 @@
3737
/*
3838
Constants:
3939
*/
40-
#ifndef P3D_GVF_DEFINED
41-
#define P3D_GVF_DEFINED
42-
40+
#ifndef P3D_BLOB_DEFINED
41+
#define P3D_BLOB_DEFINED
42+
4343
#define P3D_FALSE -1
4444
#define P3D_TRUE 1
4545

46+
#define P3D_ERROR 0
4647
#define P3D_MEM_ERROR NULL /* Leave it NULL for simplify tests */
4748
#define P3D_SUCCESS 2 /* Any number */
4849

@@ -79,8 +80,8 @@
7980
Macros:
8081
*/
8182

82-
#ifndef P3D_GVF_MACROS
83-
#define P3D_GVF_MACROS
83+
#ifndef P3D_BLOB_MACROS
84+
#define P3D_BLOB_MACROS
8485

8586
#define I(i,j,k,N,M) ( (j)*(N) + (i) + (k)*(N)*(M) )
8687
#define MIN(x,y) (((x) < (y))?(x):(y))
@@ -94,7 +95,8 @@
9495

9596

9697
/* A sort of TRY-CATCH constructor: */
97-
#define P3D_TRY( function ) if ( (function) == P3D_MEM_ERROR) { goto MEM_ERROR; }
98+
#define P3D_MEM_TRY( function ) if ( ((function) == P3D_MEM_ERROR) ) { goto MEM_ERROR; }
99+
#define P3D_TRY( function ) if ( ((function) == P3D_ERROR) ) { goto MEM_ERROR; }
98100

99101
#endif
100102

P3D_Blob/_p3dAuth.c

-171
This file was deleted.

P3D_Blob/_p3dTime.c

-27
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,3 @@
1-
/***************************************************************************/
2-
/* (C) 2016 Elettra - Sincrotrone Trieste S.C.p.A.. All rights reserved. */
3-
/* */
4-
/* */
5-
/* This file is part of Pore3D, a software library for quantitative */
6-
/* analysis of 3D (volume) images. */
7-
/* */
8-
/* Pore3D is free software: you can redistribute it and/or modify it */
9-
/* under the terms of the GNU General Public License as published by the */
10-
/* Free Software Foundation, either version 3 of the License, or (at your */
11-
/* option) any later version. */
12-
/* */
13-
/* Pore3D is distributed in the hope that it will be useful, but WITHOUT */
14-
/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
15-
/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License */
16-
/* for more details. */
17-
/* */
18-
/* You should have received a copy of the GNU General Public License */
19-
/* along with Pore3D. If not, see <http://www.gnu.org/licenses/>. */
20-
/* */
21-
/***************************************************************************/
22-
23-
//
24-
// Author: Francesco Brun
25-
// Last modified: Sept, 28th 2016
26-
//
27-
281
#include <stdio.h>
292

303
#include "p3dTime.h"

0 commit comments

Comments
 (0)