X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2Fgdcmopenjpeg%2Fcodec%2Fconvert.h;h=a3876547926556b9340194923739110c1b7907bf;hb=aabc92e9dcb866de68efd216d75ad197fe78aee9;hp=59ed8a1463eea3c5ce547008f8e8f98dab6b45a7;hpb=7452f3039ff4dd2574fcbf3343b530a2f20f9623;p=gdcm.git diff --git a/src/gdcmopenjpeg/codec/convert.h b/src/gdcmopenjpeg/codec/convert.h index 59ed8a14..a3876547 100644 --- a/src/gdcmopenjpeg/codec/convert.h +++ b/src/gdcmopenjpeg/codec/convert.h @@ -1,7 +1,9 @@ /* * Copyright (c) 2001-2003, David Janssens * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2002-2003, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium + * Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe + * Copyright (c) 2005, HervĀŽ Drolon, FreeImage Team + * Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,15 +27,26 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ +#ifndef __J2K_CONVERT_H +#define __J2K_CONVERT_H -#include "j2k.h" +opj_image_t* bmptoimage(char *filename, opj_cparameters_t *parameters); -int bmptoimage(char *filename, j2k_image_t * img, int subsampling_dx, - int subsampling_dy, int Dim[2]); +int imagetobmp(opj_image_t *image, char *outfile); -int pgxtoimage(char *filename, j2k_image_t * img, int tdy, - int subsampling_dx, int subsampling_dy, int Dim[2], - j2k_cp_t cp); +/** +Load a single image component encoded in PGX file format +@param filename Name of the PGX file to load +@param parameters *List ?* +@return Returns a greyscale image if successful, returns NULL otherwise +*/ +opj_image_t* pgxtoimage(char *filename, opj_cparameters_t *parameters); + +int imagetopgx(opj_image_t *image, char *outfile); + +opj_image_t* pnmtoimage(char *filename, opj_cparameters_t *parameters); + +int imagetopnm(opj_image_t *image, char *outfile); + +#endif /* __J2K_CONVERT_H */ -int pnmtoimage(char *filename, j2k_image_t * img, int subsampling_dx, - int subsampling_dy, int Dim[2]);