diff --git a/backend/tests/sample_image/0_200.jpg b/backend/tests/sample_image/0_200.jpg new file mode 100644 index 0000000000000000000000000000000000000000..932d077a63b7bd662a3d1203b3e1242f8c7029a4 Binary files /dev/null and b/backend/tests/sample_image/0_200.jpg differ diff --git a/backend/tests/sample_image/0_700.jpg b/backend/tests/sample_image/0_700.jpg new file mode 100644 index 0000000000000000000000000000000000000000..dd584197cb7468445eb86a0292523671950d4683 Binary files /dev/null and b/backend/tests/sample_image/0_700.jpg differ diff --git a/backend/tests/sample_image/90_200.jpg b/backend/tests/sample_image/90_200.jpg new file mode 100644 index 0000000000000000000000000000000000000000..cc010f5ba8fcf6e2df7e4db40581fffec0ebe424 Binary files /dev/null and b/backend/tests/sample_image/90_200.jpg differ diff --git a/backend/tests/sample_image/90_700.jpg b/backend/tests/sample_image/90_700.jpg new file mode 100644 index 0000000000000000000000000000000000000000..08470881dfb98ca9fdc50fa15b88df518dd0d83e Binary files /dev/null and b/backend/tests/sample_image/90_700.jpg differ diff --git a/backend/tests/sample_image/after_dc.jpeg.jpg b/backend/tests/sample_image/after_dc.jpeg.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0a17d52c1f06b5e603bbbd594d9cbb0b61dd402b Binary files /dev/null and b/backend/tests/sample_image/after_dc.jpeg.jpg differ diff --git a/backend/tests/sample_image/after_lc.jpeg.jpg b/backend/tests/sample_image/after_lc.jpeg.jpg new file mode 100644 index 0000000000000000000000000000000000000000..536c14cba826af156dab5289db39f91cba721e5e Binary files /dev/null and b/backend/tests/sample_image/after_lc.jpeg.jpg differ diff --git a/backend/tests/sample_image/bb_raster_0.jpg b/backend/tests/sample_image/bb_raster_0.jpg new file mode 100644 index 0000000000000000000000000000000000000000..557da0ad0580d9e384a7649fa282434b7f55db66 Binary files /dev/null and b/backend/tests/sample_image/bb_raster_0.jpg differ diff --git a/backend/tests/sample_image/bb_raster_90.jpg b/backend/tests/sample_image/bb_raster_90.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8875f10ec7c4ad1a67d61c355f42d56897a10917 Binary files /dev/null and b/backend/tests/sample_image/bb_raster_90.jpg differ diff --git a/backend/tests/sample_image/mount.jpeg.jpg b/backend/tests/sample_image/mount.jpeg.jpg new file mode 100644 index 0000000000000000000000000000000000000000..87e2530f33a4ca9a49cc8c2a554cd348ae3a6975 Binary files /dev/null and b/backend/tests/sample_image/mount.jpeg.jpg differ diff --git a/frontend/src/components/ResultGrid.tsx b/frontend/src/components/ResultGrid.tsx index 13fab248d745dab068fdf3648e96d4a864b3b3ae..c11af321531693ae05ab654fb4a40b0d6dba191e 100644 --- a/frontend/src/components/ResultGrid.tsx +++ b/frontend/src/components/ResultGrid.tsx @@ -71,56 +71,45 @@ const ResultGrid: React.FC<ResultGridProps> = ({ activePgroup }) => { width: 300, renderCell: (params) => { const imageList: ImageInfo[] = params.value; - if (imageList && imageList.length) { - const primaryImage = imageList[0]; - const imageUrl = basePath + primaryImage.filepath; - - return ( - <div style={{ display: 'flex', alignItems: 'center', position: 'relative' }}> - <img - src={imageUrl} - alt="sample" - className="zoom-image" - style={{ width: 40, height: 40, marginRight: 5, borderRadius: 4 }} - /> - {imageList.length > 1 && ( - <div className="tooltip" style={{ position: 'relative', cursor: 'pointer' }}> - <span>+{imageList.length - 1}</span> - <div - className="tooltip-content" - style={{ - display: 'none', - position: 'absolute', - top: '60px', - left: 0, - background: '#fff', - padding: '5px', - boxShadow: '0 2px 8px rgba(0,0,0,0.15)', - zIndex: 100, - }} - > - {imageList.slice(1).map((img) => { - const url = basePath + img.filepath; - return ( - <img - key={img.id} - src={url} - alt={img.comment || 'additional sample'} - className="zoom-image" - style={{ width: 40, height: 40, marginRight: 5, borderRadius: 4 }} - /> - ); - })} - - </div> - </div> - )} - </div> - ); + if (!imageList || imageList.length === 0) { + return null; } - return null; + + // Filter the images to include only the two bb_raster images + const filteredImages = imageList.filter( + (img) => + img.filepath.includes("bb_raster_0") || + img.filepath.includes("bb_raster_90") + ); + + if (filteredImages.length === 0) { + return null; + } + + return ( + <div style={{ display: 'flex', alignItems: 'center' }}> + {filteredImages.map((img) => { + const url = basePath + img.filepath; + return ( + <img + key={img.id} + src={url} + alt={img.comment || 'sample'} + className="zoom-image" + style={{ + width: 40, + height: 40, + marginRight: 5, + borderRadius: 4, + }} + /> + ); + })} + </div> + ); }, }, + ]; return (