Skip to content

fix(TIFF): handle grey scal tiff loadability#187

Open
BotellaA wants to merge 1 commit into
nextfrom
fix/tiff-grey
Open

fix(TIFF): handle grey scal tiff loadability#187
BotellaA wants to merge 1 commit into
nextfrom
fix/tiff-grey

Conversation

@BotellaA
Copy link
Copy Markdown
Member

No description provided.

@BotellaA BotellaA requested a review from panquez May 11, 2026 18:49
@github-actions
Copy link
Copy Markdown

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v20.1.8) reports: 14 concern(s)
  • src/geode/io/image/raster_image_input.cpp:47:44: warning: [bugprone-narrowing-conversions]

    narrowing conversion from 'index_t' (aka 'unsigned int') to signed type 'int' is implementation-defined

       47 |                 ->RasterIO( GF_Read, 0, 0, width, height, values.data(), width,
          |                                            ^
  • src/geode/io/image/raster_image_input.cpp:47:51: warning: [bugprone-narrowing-conversions]

    narrowing conversion from 'index_t' (aka 'unsigned int') to signed type 'int' is implementation-defined

       47 |                 ->RasterIO( GF_Read, 0, 0, width, height, values.data(), width,
          |                                                   ^
  • src/geode/io/image/raster_image_input.cpp:47:74: warning: [bugprone-narrowing-conversions]

    narrowing conversion from 'index_t' (aka 'unsigned int') to signed type 'int' is implementation-defined

       47 |                 ->RasterIO( GF_Read, 0, 0, width, height, values.data(), width,
          |                                                                          ^
  • src/geode/io/image/raster_image_input.cpp:48:21: warning: [bugprone-narrowing-conversions]

    narrowing conversion from 'index_t' (aka 'unsigned int') to signed type 'int' is implementation-defined

       48 |                     height, GDT_Byte, 0, 0 );
          |                     ^
  • src/geode/io/image/raster_image_input.cpp:59:25: warning: [readability-identifier-length]

    variable name 'id' is too short, expected at least 3 characters

       59 |         for( const auto id : geode::Range( nb_color_components ) )
          |                         ^
  • src/geode/io/image/raster_image_input.cpp:62:29: warning: [readability-identifier-naming]

    invalid case style for variable 'colorInterp'

       62 |             GDALColorInterp colorInterp =
          |                             ^~~~~~~~~~~
          |                             color_interp
       63 |                 gdal_data.GetRasterBand( band_id )->GetColorInterpretation();
       64 |             if( colorInterp == GCI_RedBand )
          |                 ~~~~~~~~~~~
          |                 color_interp
       65 |             {
       66 |                 rgb_indices[0] = band_id;
       67 |             }
       68 |             else if( colorInterp == GCI_GreenBand )
          |                      ~~~~~~~~~~~
          |                      color_interp
       69 |             {
       70 |                 rgb_indices[1] = band_id;
       71 |             }
       72 |             else if( colorInterp == GCI_BlueBand )
          |                      ~~~~~~~~~~~
          |                      color_interp
  • src/geode/io/image/raster_image_input.cpp:63:42: warning: [bugprone-narrowing-conversions]

    narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined

       63 |                 gdal_data.GetRasterBand( band_id )->GetColorInterpretation();
          |                                          ^
  • src/geode/io/image/raster_image_input.cpp:81:26: warning: [readability-function-cognitive-complexity]

    function 'read_file' has cognitive complexity of 12 (threshold 10)

       81 |     geode::RasterImage2D read_file( GDALDataset& gdal_data )
          |                          ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/image/raster_image_input.cpp:89:9: note: +1, including nesting penalty of 0, nesting level increased to 1
       89 |         if( nb_color_components <= 2 )
          |         ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/image/raster_image_input.cpp:94:13: note: +2, including nesting penalty of 1, nesting level increased to 2
       94 |             for( const auto image_j :
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/image/raster_image_input.cpp:97:17: note: +3, including nesting penalty of 2, nesting level increased to 3
       97 |                 for( const auto image_i :
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/image/raster_image_input.cpp:106:14: note: +1, nesting level increased to 1
      106 |         else if( nb_color_components <= 4 )
          |              ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/image/raster_image_input.cpp:116:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      116 |             for( const auto image_j :
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/image/raster_image_input.cpp:119:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      119 |                 for( const auto image_i :
          |                 ^
  • src/geode/io/image/raster_image_input.cpp:100:50: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

      100 |                     const auto pixel = image_i + width * image_j;
          |                                                  ^~~~~~~~~~~~~~~~
          |                                                  (              )
  • src/geode/io/image/raster_image_input.cpp:110:58: warning: [bugprone-narrowing-conversions]

    narrowing conversion from 'value_type' (aka 'unsigned int') to signed type 'int' is implementation-defined

      110 |                 read_color_component( raster, gdal_data, rgb_indices[0] );
          |                                                          ^
  • src/geode/io/image/raster_image_input.cpp:112:58: warning: [bugprone-narrowing-conversions]

    narrowing conversion from 'value_type' (aka 'unsigned int') to signed type 'int' is implementation-defined

      112 |                 read_color_component( raster, gdal_data, rgb_indices[1] );
          |                                                          ^
  • src/geode/io/image/raster_image_input.cpp:114:58: warning: [bugprone-narrowing-conversions]

    narrowing conversion from 'value_type' (aka 'unsigned int') to signed type 'int' is implementation-defined

      114 |                 read_color_component( raster, gdal_data, rgb_indices[2] );
          |                                                          ^
  • src/geode/io/image/raster_image_input.cpp:122:50: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

      122 |                     const auto pixel = image_i + width * image_j;
          |                                                  ^~~~~~~~~~~~~~~~
          |                                                  (              )
  • src/geode/io/image/raster_image_input.cpp:132:1: warning: [modernize-concat-nested-namespaces]

    nested namespaces can be concatenated

      132 | namespace geode
          | ^~~~~~~~~~~~~~~
      133 | {
          | ~
      134 |     namespace internal
          |     ~~~~~~~~~~~~~~~~~~
          |     namespace geode::internal

Have any feedback or feature suggestions? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant