Skip to content
Merged
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
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ Le format est basé sur [Keep a Changelog](https://keepachangelog.com/) et ce pr

## [Unreleased]

## [5.0.0] - 2026-10-16

### Changed
- `Storage` : les erreurs de lecture (`read` et `read_full`) sont remontées sous forme d'exception :
- `NotFoundStorageException`
- `UnreachableStorageException`
- `ForbiddenStorageException`


## [4.1.0] - 2026-06-29

### Fixed
Expand All @@ -21,6 +30,18 @@ Le format est basé sur [Keep a Changelog](https://keepachangelog.com/) et ce pr

- Correction de conversions au format API OGC (format et bbox)

## [3.1.2] - 2026-10-13

### Fixed

- ReprojectedImage : le nombre de lignes sources mémorisées tient compte de la taille du noyau d'interpolation, du ratio en y (pour éviter de stocker 2 lignes différentes à la même place) et doit au moins contenir 4 lignes (car on calcule les lignes de destination 4 par 4 )
- Level : augmentation du buffer de calcul lors d'une reprojection

## [3.1.1] - 2026-07-30

### Fixed

- TiffHeader : définition des en-têtes pour des images deux canaux entiers 8 bits

## [3.1.0] - 2026-06-25

Expand Down Expand Up @@ -241,7 +262,8 @@ Les librairies sont gérées de manière indépendantes, conditionnées pour êt

[1.0.3]: https://github.com/rok4/core-cpp/releases/tag/1.0.3

[Unreleased]: https://github.com/rok4/core-cpp/compare/4.1.0...HEAD
[Unreleased]: https://github.com/rok4/core-cpp/compare/5.0.0...HEAD
[5.0.0]: https://github.com/rok4/core-cpp/compare/4.1.0...5.0.0
[4.1.0]: https://github.com/rok4/core-cpp/compare/4.0.0...4.1.0
[4.0.0]: https://github.com/rok4/core-cpp/compare/3.1.0...4.0.0
[3.1.0]: https://github.com/rok4/core-cpp/compare/3.0.0...3.1.0
Expand Down
9 changes: 1 addition & 8 deletions cmake/modules/FindBoostLog.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,6 @@ FIND_LIBRARY(BOOSTLOGSETUP_LIBRARY NAMES libboost_log_setup.so PATHS
/usr/lib64
)

FIND_LIBRARY(BOOSTSYSTEM_LIBRARY NAMES libboost_system.so PATHS
/usr/lib/x86_64-linux-gnu/
/usr/local/lib
/usr/lib
/usr/lib64
)

FIND_LIBRARY(BOOSTFILESYSTEM_LIBRARY NAMES libboost_filesystem.so PATHS
/usr/lib/x86_64-linux-gnu/
/usr/local/lib
Expand All @@ -47,4 +40,4 @@ FIND_LIBRARY(BOOSTTHREAD_LIBRARY NAMES libboost_thread.so PATHS
)

INCLUDE( "FindPackageHandleStandardArgs" )
FIND_PACKAGE_HANDLE_STANDARD_ARGS( "BoostLog" DEFAULT_MSG BOOSTLOG_INCLUDE_DIR BOOSTLOG_LIBRARY BOOSTLOGSETUP_LIBRARY BOOSTTHREAD_LIBRARY BOOSTFILESYSTEM_LIBRARY BOOSTSYSTEM_LIBRARY)
FIND_PACKAGE_HANDLE_STANDARD_ARGS( "BoostLog" DEFAULT_MSG BOOSTLOG_INCLUDE_DIR BOOSTLOG_LIBRARY BOOSTLOGSETUP_LIBRARY BOOSTTHREAD_LIBRARY BOOSTFILESYSTEM_LIBRARY)
2 changes: 0 additions & 2 deletions cmake/modules/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ if(NOT TARGET boostlog)
set_property(TARGET boostlogsetup PROPERTY IMPORTED_LOCATION ${BOOSTLOGSETUP_LIBRARY})
add_library(boostthread SHARED IMPORTED)
set_property(TARGET boostthread PROPERTY IMPORTED_LOCATION ${BOOSTTHREAD_LIBRARY})
add_library(boostsystem SHARED IMPORTED)
set_property(TARGET boostsystem PROPERTY IMPORTED_LOCATION ${BOOSTSYSTEM_LIBRARY})
add_library(boostfilesystem SHARED IMPORTED)
set_property(TARGET boostfilesystem PROPERTY IMPORTED_LOCATION ${BOOSTFILESYSTEM_LIBRARY})
add_definitions(-DBOOST_LOG_DYN_LINK -DBOOST_SYSTEM_USE_UTF8)
Expand Down
2 changes: 2 additions & 0 deletions include/rok4/datastream/TiffDeflateEncoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ class TiffDeflateEncoder : public TiffEncoder {
} else {
memcpy(header, TiffHeader::TIFF_HEADER_ZIP_INT8_GRAY, header_size);
}
else if (image->get_channels() == 2)
memcpy(header, TiffHeader::TIFF_HEADER_ZIP_INT8_GRAYA, header_size);
else if (image->get_channels() == 3)
memcpy(header, TiffHeader::TIFF_HEADER_ZIP_INT8_RGB, header_size);
else if (image->get_channels() == 4)
Expand Down
82 changes: 78 additions & 4 deletions include/rok4/datastream/TiffHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ static const size_t header_size(int channel) {
switch (channel) {
case 1:
return 134;
case 2:
return 146;
case 3:
return 146;
case 4:
Expand All @@ -62,7 +64,7 @@ static const uint8_t TIFF_HEADER_RAW_INT8_GRAY[134] = {
// .. | TIFFTAG | DATA TYPE | NUMBER | VALUE
0, 1, 4, 0, 1, 0, 0, 0, 0, 1, 0, 0, // 10 | IMAGEWIDTH (256)| LONG (4) | 1 | 256
1, 1, 4, 0, 1, 0, 0, 0, 0, 1, 0, 0, // 22 | IMAGELENGTH (257)| LONG (4) | 1 | 256
2, 1, 3, 0, 1, 0, 0, 0, 8, 0, 0, 0, // 34 | BITSPERSAMPLE (258)| SHORT (3) | 1 | pointeur vers un bloc mémoire 8
2, 1, 3, 0, 1, 0, 0, 0, 8, 0, 0, 0, // 34 | BITSPERSAMPLE (258)| SHORT (3) | 1 | la valeur 8
3, 1, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, // 46 | COMPRESSION (259)| SHORT (3) | 1 | 1 (pas de compression)
6, 1, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, // 58 | PHOTOMETRIC (262)| SHORT (3) | 1 | 1 (black is zero)
17, 1, 4, 0, 1, 0, 0, 0, 134, 0, 0, 0, // 70 | STRIPOFFSETS (273)| LONG (4) | 16 | 134
Expand All @@ -76,10 +78,10 @@ static const uint8_t TIFF_HEADER_RAW_INT8_GRAY[134] = {
static const uint8_t TIFF_HEADER_RAW_FLOAT32_GRAY[134] = {
73, 73, 42, 0, 8, 0, 0, 0, // 0 | tiff header 'II' (Little endian) + magick number (42) + offset de la IFD (16)
10, 0, // 8 | nombre de tags sur 16 bits (10)
// .. | TIFFTAG | DATA TYPE | NUMBER | VALUE
// .. | TIFFTAG | DATA TYPE | NUMBER | VALUE
0, 1, 4, 0, 1, 0, 0, 0, 0, 1, 0, 0, // 10 | IMAGEWIDTH (256)| LONG (4) | 1 | 256
1, 1, 4, 0, 1, 0, 0, 0, 0, 1, 0, 0, // 22 | IMAGELENGTH (257)| LONG (4) | 1 | 256
2, 1, 3, 0, 1, 0, 0, 0, 32, 0, 0, 0, // 34 | BITSPERSAMPLE (258)| SHORT (3) | 1 | pointeur vers 1 bloc mémoire 32
2, 1, 3, 0, 1, 0, 0, 0, 32, 0, 0, 0, // 34 | BITSPERSAMPLE (258)| SHORT (3) | 1 | la valeur 32
3, 1, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, // 46 | COMPRESSION (259)| SHORT (3) | 1 | 1 (LZW)
6, 1, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, // 58 | PHOTOMETRIC (262)| SHORT (3) | 1 | 1 (black is zero)
17, 1, 4, 0, 1, 0, 0, 0, 134, 0, 0, 0, // 70 | STRIPOFFSETS (273)| LONG (4) | 16 | 134
Expand All @@ -90,6 +92,24 @@ static const uint8_t TIFF_HEADER_RAW_FLOAT32_GRAY[134] = {
0, 0, 0, 0 // 130| fin de l'IFD
}; // 134

static const uint8_t TIFF_HEADER_RAW_INT8_GRAYA[146] = {
73, 73, 42, 0, 8, 0, 0, 0, // 0 | tiff header 'II' (Little endian) + magick number (42) + offset de la IFD (16)
11, 0, // 8 | nombre de tags sur 16 bits (11)
// .. | TIFFTAG | DATA TYPE | NUMBER | VALUE
0, 1, 4, 0, 1, 0, 0, 0, 0, 1, 0, 0, // 10 | IMAGEWIDTH (256)| LONG (4) | 1 | 256
1, 1, 4, 0, 1, 0, 0, 0, 0, 1, 0, 0, // 22 | IMAGELENGTH (257)| LONG (4) | 1 | 256
2, 1, 3, 0, 2, 0, 0, 0, 8, 0, 8, 0, // 34 | BITSPERSAMPLE (258)| SHORT (3) | 2 | les valeurs 8 et 8
3, 1, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, // 46 | COMPRESSION (259)| SHORT (3) | 1 | 1 (pas de compression)
6, 1, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, // 58 | PHOTOMETRIC (262)| SHORT (3) | 1 | 1 (GRAY)
17, 1, 4, 0, 1, 0, 0, 0, 146, 0, 0, 0, // 70 | STRIPOFFSETS (273)| LONG (4) | 16 | 146
21, 1, 3, 0, 1, 0, 0, 0, 2, 0, 0, 0, // 82 | SAMPLESPERPIXEL (277)| SHORT (3) | 1 | 2
22, 1, 4, 0, 1, 0, 0, 0, 255, 255, 255, 255, // 94 | ROWSPERSTRIP (278)| LONG (4) | 1 | 2^32-1 = single strip tiff
23, 1, 4, 0, 1, 0, 0, 0, 0, 0, 3, 0, // 106| STRIPBYTECOUNTS (279)| LONG (4) | 1 | 256 * 256 * 3
82, 1, 3, 0, 1, 0, 0, 0, 2, 0, 0, 0, // 118| EXTRASAMPLES (338)| SHORT (3) | | 2 (UNASSOCALPHA)
83, 1, 3, 0, 2, 0, 0, 0, 1, 0, 1, 0, // 130| SAMPLEFORMAT (339)| SHORT (3) | 2 | 1 et 1 (Int8)
0, 0, 0, 0 // 142| fin de l'IFD
}; // 146

static const uint8_t TIFF_HEADER_RAW_INT8_RGB[146] = {
73, 73, 42, 0, 8, 0, 0, 0, // 0 | tiff header 'II' (Little endian) + magick number (42) + offset de la IFD (16)
10, 0, // 8 | nombre de tags sur 16 bits (10)
Expand Down Expand Up @@ -164,6 +184,24 @@ static const uint8_t TIFF_HEADER_LZW_INT8_GRAY[134] = {
0, 0, 0, 0 // 130| fin de l'IFD
}; // 134

static const uint8_t TIFF_HEADER_LZW_INT8_GRAYA[146] = {
73, 73, 42, 0, 8, 0, 0, 0, // 0 | tiff header 'II' (Little endian) + magick number (42) + offset de la IFD (16)
11, 0, // 8 | nombre de tags sur 16 bits (11)
// .. | TIFFTAG | DATA TYPE | NUMBER | VALUE
0, 1, 4, 0, 1, 0, 0, 0, 0, 1, 0, 0, // 10 | IMAGEWIDTH (256)| LONG (4) | 1 | 256
1, 1, 4, 0, 1, 0, 0, 0, 0, 1, 0, 0, // 22 | IMAGELENGTH (257)| LONG (4) | 1 | 256
2, 1, 3, 0, 2, 0, 0, 0, 8, 0, 8, 0, // 34 | BITSPERSAMPLE (258)| SHORT (3) | 2 | les valeurs 8 et 8
3, 1, 3, 0, 1, 0, 0, 0, 5, 0, 0, 0, // 46 | COMPRESSION (259)| SHORT (3) | 1 | 5 (LZW)
6, 1, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, // 58 | PHOTOMETRIC (262)| SHORT (3) | 1 | 1 (GRAY)
17, 1, 4, 0, 1, 0, 0, 0, 146, 0, 0, 0, // 70 | STRIPOFFSETS (273)| LONG (4) | 16 | 146
21, 1, 3, 0, 1, 0, 0, 0, 2, 0, 0, 0, // 82 | SAMPLESPERPIXEL (277)| SHORT (3) | 1 | 2
22, 1, 4, 0, 1, 0, 0, 0, 255, 255, 255, 255, // 94 | ROWSPERSTRIP (278)| LONG (4) | 1 | 2^32-1 = single strip tiff
23, 1, 4, 0, 1, 0, 0, 0, 0, 0, 3, 0, // 106| STRIPBYTECOUNTS (279)| LONG (4) | 1 | 256 * 256 * 3
82, 1, 3, 0, 1, 0, 0, 0, 2, 0, 0, 0, // 118| EXTRASAMPLES (338)| SHORT (3) | | 2 (UNASSOCALPHA)
83, 1, 3, 0, 2, 0, 0, 0, 1, 0, 1, 0, // 130| SAMPLEFORMAT (339)| SHORT (3) | 2 | 1 et 1 (Int8)
0, 0, 0, 0 // 142| fin de l'IFD
}; // 146

static const uint8_t TIFF_HEADER_LZW_INT8_RGB[146] = {
73, 73, 42, 0, 8, 0, 0, 0, // 0 | tiff header 'II' (Little endian) + magick number (42) + offset de la IFD (16)
10, 0, // 8 | nombre de tags sur 16 bits (10)
Expand Down Expand Up @@ -237,6 +275,24 @@ static const uint8_t TIFF_HEADER_ZIP_INT8_GRAY[134] = {
0, 0, 0, 0 // 130| fin de l'IFD
}; // 134

static const uint8_t TIFF_HEADER_ZIP_INT8_GRAYA[146] = {
73, 73, 42, 0, 8, 0, 0, 0, // 0 | tiff header 'II' (Little endian) + magick number (42) + offset de la IFD (16)
11, 0, // 8 | nombre de tags sur 16 bits (11)
// .. | TIFFTAG | DATA TYPE | NUMBER | VALUE
0, 1, 4, 0, 1, 0, 0, 0, 0, 1, 0, 0, // 10 | IMAGEWIDTH (256)| LONG (4) | 1 | 256
1, 1, 4, 0, 1, 0, 0, 0, 0, 1, 0, 0, // 22 | IMAGELENGTH (257)| LONG (4) | 1 | 256
2, 1, 3, 0, 2, 0, 0, 0, 8, 0, 8, 0, // 34 | BITSPERSAMPLE (258)| SHORT (3) | 2 | les valeurs 8 et 8
3, 1, 3, 0, 1, 0, 0, 0, 8, 0, 0, 0, // 46 | COMPRESSION (259)| SHORT (3) | 1 | 8 (AdobeDEFLATE)
6, 1, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, // 58 | PHOTOMETRIC (262)| SHORT (3) | 1 | 1 (GRAY)
17, 1, 4, 0, 1, 0, 0, 0, 146, 0, 0, 0, // 70 | STRIPOFFSETS (273)| LONG (4) | 16 | 146
21, 1, 3, 0, 1, 0, 0, 0, 2, 0, 0, 0, // 82 | SAMPLESPERPIXEL (277)| SHORT (3) | 1 | 2
22, 1, 4, 0, 1, 0, 0, 0, 255, 255, 255, 255, // 94 | ROWSPERSTRIP (278)| LONG (4) | 1 | 2^32-1 = single strip tiff
23, 1, 4, 0, 1, 0, 0, 0, 0, 0, 3, 0, // 106| STRIPBYTECOUNTS (279)| LONG (4) | 1 | 256 * 256 * 3
82, 1, 3, 0, 1, 0, 0, 0, 2, 0, 0, 0, // 118| EXTRASAMPLES (338)| SHORT (3) | | 2 (UNASSOCALPHA)
83, 1, 3, 0, 2, 0, 0, 0, 1, 0, 1, 0, // 130| SAMPLEFORMAT (339)| SHORT (3) | 2 | 1 et 1 (Int8)
0, 0, 0, 0 // 142| fin de l'IFD
}; // 146

static const uint8_t TIFF_HEADER_ZIP_INT8_RGB[146] = {
73, 73, 42, 0, 8, 0, 0, 0, // 0 | tiff header 'II' (Little endian) + magick number (42) + offset de la IFD (16)
10, 0, // 8 | nombre de tags sur 16 bits (10)
Expand Down Expand Up @@ -310,6 +366,24 @@ static const uint8_t TIFF_HEADER_PKB_INT8_GRAY[134] = {
0, 0, 0, 0 // 130| fin de l'IFD
}; // 134

static const uint8_t TIFF_HEADER_PKB_INT8_GRAYA[146] = {
73, 73, 42, 0, 8, 0, 0, 0, // 0 | tiff header 'II' (Little endian) + magick number (42) + offset de la IFD (16)
11, 0, // 8 | nombre de tags sur 16 bits (11)
// .. | TIFFTAG | DATA TYPE | NUMBER | VALUE
0, 1, 4, 0, 1, 0, 0, 0, 0, 1, 0, 0, // 10 | IMAGEWIDTH (256)| LONG (4) | 1 | 256
1, 1, 4, 0, 1, 0, 0, 0, 0, 1, 0, 0, // 22 | IMAGELENGTH (257)| LONG (4) | 1 | 256
2, 1, 3, 0, 2, 0, 0, 0, 8, 0, 8, 0, // 34 | BITSPERSAMPLE (258)| SHORT (3) | 2 | les valeurs 8 et 8
3, 1, 3, 0, 1, 0, 0, 0, 5, 128, 0, 0, // 46 | COMPRESSION (259)| SHORT (3) | 1 | 32773 (Packbits)
6, 1, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, // 58 | PHOTOMETRIC (262)| SHORT (3) | 1 | 1 (GRAY)
17, 1, 4, 0, 1, 0, 0, 0, 146, 0, 0, 0, // 70 | STRIPOFFSETS (273)| LONG (4) | 16 | 146
21, 1, 3, 0, 1, 0, 0, 0, 2, 0, 0, 0, // 82 | SAMPLESPERPIXEL (277)| SHORT (3) | 1 | 2
22, 1, 4, 0, 1, 0, 0, 0, 255, 255, 255, 255, // 94 | ROWSPERSTRIP (278)| LONG (4) | 1 | 2^32-1 = single strip tiff
23, 1, 4, 0, 1, 0, 0, 0, 0, 0, 2, 0, // 106| STRIPBYTECOUNTS (279)| LONG (4) | 1 | 256 * 256 * 2
82, 1, 3, 0, 1, 0, 0, 0, 2, 0, 0, 0, // 118| EXTRASAMPLES (338)| SHORT (3) | | 2 (UNASSOCALPHA)
83, 1, 3, 0, 2, 0, 0, 0, 1, 0, 1, 0, // 130| SAMPLEFORMAT (339)| SHORT (3) | 2 | 1 et 1 (Int8)
0, 0, 0, 0 // 142| fin de l'IFD
}; // 146

static const uint8_t TIFF_HEADER_PKB_INT8_RGB[146] = {
73, 73, 42, 0, 8, 0, 0, 0, // 0 | tiff header 'II' (Little endian) + magick number (42) + offset de la IFD (16)
10, 0, // 8 | nombre de tags sur 16 bits (10)
Expand Down Expand Up @@ -812,7 +886,7 @@ static uint8_t* insert_geo_tags(Image* image, uint8_t* header, size_t* header_si
*((uint16_t*)(new_header + 8)) = old_nbTag + 6;
BOOST_LOG_TRIVIAL(debug) << "Mise à jour des pointeurs";
for (uint16_t i = 0; i < old_nbTag; i++) {
if (((uint32_t) * (new_header + 14 + i * 12)) != 1) {
if (((uint32_t) * (new_header + 14 + i * 12)) > 2) {
*((uint32_t*)(new_header + 18 + i * 12)) = *((uint32_t*)(new_header + 18 + i * 12)) + GEOTIFF_HEADER_PART_SIZE;
}
}
Expand Down
2 changes: 2 additions & 0 deletions include/rok4/datastream/TiffLZWEncoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ class TiffLZWEncoder : public TiffEncoder {
} else {
memcpy(header, TiffHeader::TIFF_HEADER_LZW_INT8_GRAY, header_size);
}
else if (image->get_channels() == 2)
memcpy(header, TiffHeader::TIFF_HEADER_LZW_INT8_GRAYA, header_size);
else if (image->get_channels() == 3)
memcpy(header, TiffHeader::TIFF_HEADER_LZW_INT8_RGB, header_size);
else if (image->get_channels() == 4)
Expand Down
2 changes: 2 additions & 0 deletions include/rok4/datastream/TiffPackBitsEncoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ class TiffPackBitsEncoder : public TiffEncoder {
} else {
memcpy( header, TiffHeader::TIFF_HEADER_PKB_INT8_GRAY, header_size);
}
else if ( image->get_channels()==2 )
memcpy( header, TiffHeader::TIFF_HEADER_PKB_INT8_GRAYA, header_size);
else if ( image->get_channels()==3 )
memcpy( header, TiffHeader::TIFF_HEADER_PKB_INT8_RGB, header_size);
else if ( image->get_channels()==4 )
Expand Down
10 changes: 6 additions & 4 deletions include/rok4/datastream/TiffRawEncoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,16 @@ class TiffRawEncoder : public TiffEncoder {
} else {
memcpy( header, TiffHeader::TIFF_HEADER_RAW_INT8_GRAY, header_size);
}
else if ( image->get_channels()==2 )
memcpy( header, TiffHeader::TIFF_HEADER_RAW_INT8_GRAYA, header_size);
else if ( image->get_channels()==3 )
memcpy( header, TiffHeader::TIFF_HEADER_RAW_INT8_RGB, header_size);
else if ( image->get_channels()==4 )
memcpy( header, TiffHeader::TIFF_HEADER_RAW_INT8_RGBA, header_size);
* ( ( uint32_t* ) ( header+18 ) ) = image->get_width();
* ( ( uint32_t* ) ( header+30 ) ) = image->get_height();
* ( ( uint32_t* ) ( header+102 ) ) = image->get_height();
* ( ( uint32_t* ) ( header+114 ) ) = tmp_buffer_size ;
* ( ( uint32_t* ) ( header+18 ) ) = (uint32_t) image->get_width();
* ( ( uint32_t* ) ( header+30 ) ) = (uint32_t) image->get_height();
* ( ( uint32_t* ) ( header+102 ) ) = (uint32_t) image->get_height();
* ( ( uint32_t* ) ( header+114 ) ) = (uint32_t) tmp_buffer_size ;
}

virtual void prepare_buffer(){
Expand Down
5 changes: 3 additions & 2 deletions include/rok4/processors/Kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,13 @@ class Kernel {
* \~french \brief Calcule la taille effective du noyau en nombre de pixels sources
* \details On tient compte du ratio et de const_ratio
* \param[in] ratio rapport resolution destination / resolution source.
* \param[in] ignore_const tient-on compte du ratio constant.
* \li si supérieur à 1 : sous-échantillonnage
* \li si inférieur à 1 : sur échantillonage
* \return rayon effectif du noyau d'interpolation
*/
inline double size ( double ratio = 1. ) const {
if ( const_ratio || ratio <= 1 ) return kernel_size;
inline double size ( double ratio = 1., bool ignore_const = false) const {
if ( (const_ratio && ! ignore_const ) || ratio <= 1 ) return kernel_size;
else return kernel_size * ratio;
}

Expand Down
Loading
Loading