private void addBandsToProduct(TiffFileInfo tiffInfo, Product product) throws IOException {
   final ImageReadParam readParam = imageReader.getDefaultReadParam();
   TIFFRenderedImage baseImage =
       (TIFFRenderedImage) imageReader.readAsRenderedImage(FIRST_IMAGE, readParam);
   SampleModel sampleModel = baseImage.getSampleModel();
   final int numBands = sampleModel.getNumBands();
   final int productDataType = ImageManager.getProductDataType(sampleModel.getDataType());
   bandMap = new HashMap<>(numBands);
   for (int i = 0; i < numBands; i++) {
     final String bandName = String.format("band_%d", i + 1);
     final Band band = product.addBand(bandName, productDataType);
     if (tiffInfo.containsField(BaselineTIFFTagSet.TAG_COLOR_MAP)
         && baseImage.getColorModel() instanceof IndexColorModel) {
       band.setImageInfo(createIndexedImageInfo(product, baseImage, band));
     }
     bandMap.put(band, i);
   }
 }