{
  "id": 447049,
  "title": "How were the [train/test]_thumbnails created?",
  "url": "/competitions/UBC-OCEAN/discussion/447049",
  "author_name": "阳光开朗大男孩",
  "post_date": "2023-10-14T04:19:40.123000",
  "votes": 1,
  "comment_count": 9,
  "views": 0,
  "content": "<p>Most of the external datasets are provided in svs/tif format, and I'd like to convert these to thumbnails in the same way as this competition. Any idea?</p>",
  "messages": [
    {
      "id": 2511427,
      "postDate": "2023-11-03T16:49:14.483Z",
      "content": "<p>My pipeline:</p>\n<ul>\n<li>Uses tifffile to open the 20x magnification layer of the source .tiff/.svs</li>\n<li>Passes the pixel array to PIL</li>\n<li>Resizes and exports the thumbnail with PIL with the option <code>resample=PIL.Image.Resampling.LANCZOS</code></li>\n</ul>",
      "rawMarkdown": "My pipeline:\n- Uses tifffile to open the 20x magnification layer of the source .tiff/.svs\n- Passes the pixel array to PIL\n- Resizes and exports the thumbnail with PIL with the option `resample=PIL.Image.Resampling.LANCZOS`",
      "votes": 1,
      "replies": [
        {
          "id": 2511430,
          "postDate": "2023-11-03T16:51:21.927Z",
          "content": "<p>PS - Be careful not to just export the tiff layer that's already the size of a thumbnail. Sometimes the smallest layer contains <em>completely</em> different imagery that seems to be for record keeping purposes.</p>",
          "rawMarkdown": "PS - Be careful not to just export the tiff layer that's already the size of a thumbnail. Sometimes the smallest layer contains _completely_ different imagery that seems to be for record keeping purposes."
        },
        {
          "id": 2511457,
          "postDate": "2023-11-03T17:06:44.997Z",
          "content": "<p>I might be wrong but, there are many people who would very much like access to raw TIFF file data, if you already have the source, could you add it alongside PNG files, so that people can choose how they want to use the dataset, AFAIK the annotations (tumor/non-tumor masks) are on their way to be added, it is going to massively impact the work of most people anyway, so why not add TIFF files too</p>",
          "rawMarkdown": "I might be wrong but, there are many people who would very much like access to raw TIFF file data, if you already have the source, could you add it alongside PNG files, so that people can choose how they want to use the dataset, AFAIK the annotations (tumor/non-tumor masks) are on their way to be added, it is going to massively impact the work of most people anyway, so why not add TIFF files too",
          "votes": 1,
          "replies": [
            {
              "id": 2511809,
              "postDate": "2023-11-04T01:33:05.523Z",
              "rawMarkdown": "",
              "isDeleted": true
            }
          ]
        },
        {
          "id": 2511810,
          "postDate": "2023-11-04T01:33:23.380Z",
          "content": "<p>Many thanks for your detailed reply! I'll try it later.</p>",
          "rawMarkdown": "Many thanks for your detailed reply! I'll try it later.",
          "votes": 1
        }
      ]
    },
    {
      "id": 2481367,
      "postDate": "2023-10-14T04:19:40.123Z",
      "content": "<p>Most of the external datasets are provided in svs/tif format, and I'd like to convert these to thumbnails in the same way as this competition. Any idea?</p>",
      "rawMarkdown": "Most of the external datasets are provided in svs/tif format, and I'd like to convert these to thumbnails in the same way as this competition. Any idea?",
      "votes": 1
    },
    {
      "id": 2511302,
      "postDate": "2023-11-03T15:09:24.823Z",
      "content": "<p>you can just open the tiff with PIL.Image… and i guess the thumbnails are then just resized and converted to png. Would be nice if anyone can confirm that and maybe tell us how exactly the WSI images are resized (Interpolation mode etc.)</p>",
      "rawMarkdown": "you can just open the tiff with PIL.Image... and i guess the thumbnails are then just resized and converted to png. Would be nice if anyone can confirm that and maybe tell us how exactly the WSI images are resized (Interpolation mode etc.)",
      "replies": [
        {
          "id": 2511808,
          "postDate": "2023-11-04T01:30:42.217Z",
          "content": "<p>Thanks, please just check out Sohier's reply. ☝️😉</p>",
          "rawMarkdown": "Thanks, please just check out Sohier's reply. ☝️😉",
          "votes": 1
        }
      ]
    },
    {
      "id": 2481474,
      "postDate": "2023-10-14T06:44:50.353Z",
      "content": "<p>Use a whole slide image viewer such as <a href=\"url\" target=\"_blank\">https://qupath.github.io/</a> or Aperio Imagescope. They can open the files, take snapshots for the thumbnail, and much more.</p>",
      "rawMarkdown": "Use a whole slide image viewer such as [https://qupath.github.io/](url) or Aperio Imagescope. They can open the files, take snapshots for the thumbnail, and much more.",
      "replies": [
        {
          "id": 2481516,
          "postDate": "2023-10-14T07:35:11.417Z",
          "content": "<p>OK, thanks a lot!</p>",
          "rawMarkdown": "OK, thanks a lot!"
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 2511427,
      "author_name": "Sohier Dane",
      "author_url": "",
      "post_date": "2023-11-03T16:49:14.483000",
      "content": "<p>My pipeline:</p>\n<ul>\n<li>Uses tifffile to open the 20x magnification layer of the source .tiff/.svs</li>\n<li>Passes the pixel array to PIL</li>\n<li>Resizes and exports the thumbnail with PIL with the option <code>resample=PIL.Image.Resampling.LANCZOS</code></li>\n</ul>",
      "votes": 1,
      "replies": [
        {
          "id": 2511430,
          "author_name": "Sohier Dane",
          "author_url": "",
          "post_date": "2023-11-03T16:51:21.927000",
          "content": "<p>PS - Be careful not to just export the tiff layer that's already the size of a thumbnail. Sometimes the smallest layer contains <em>completely</em> different imagery that seems to be for record keeping purposes.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 2511457,
          "author_name": "Harshit Sheoran",
          "author_url": "",
          "post_date": "2023-11-03T17:06:44.997000",
          "content": "<p>I might be wrong but, there are many people who would very much like access to raw TIFF file data, if you already have the source, could you add it alongside PNG files, so that people can choose how they want to use the dataset, AFAIK the annotations (tumor/non-tumor masks) are on their way to be added, it is going to massively impact the work of most people anyway, so why not add TIFF files too</p>",
          "votes": 1,
          "replies": [
            {
              "id": 2511809,
              "author_name": "",
              "author_url": "",
              "post_date": "2023-11-04T01:33:05.523000",
              "content": "",
              "votes": 0,
              "replies": []
            }
          ]
        },
        {
          "id": 2511810,
          "author_name": "阳光开朗大男孩",
          "author_url": "",
          "post_date": "2023-11-04T01:33:23.380000",
          "content": "<p>Many thanks for your detailed reply! I'll try it later.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 2511302,
      "author_name": "Patchef",
      "author_url": "",
      "post_date": "2023-11-03T15:09:24.823000",
      "content": "<p>you can just open the tiff with PIL.Image… and i guess the thumbnails are then just resized and converted to png. Would be nice if anyone can confirm that and maybe tell us how exactly the WSI images are resized (Interpolation mode etc.)</p>",
      "votes": 0,
      "replies": [
        {
          "id": 2511808,
          "author_name": "阳光开朗大男孩",
          "author_url": "",
          "post_date": "2023-11-04T01:30:42.217000",
          "content": "<p>Thanks, please just check out Sohier's reply. ☝️😉</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 2481474,
      "author_name": "Noli Alonso",
      "author_url": "",
      "post_date": "2023-10-14T06:44:50.353000",
      "content": "<p>Use a whole slide image viewer such as <a href=\"url\" target=\"_blank\">https://qupath.github.io/</a> or Aperio Imagescope. They can open the files, take snapshots for the thumbnail, and much more.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 2481516,
          "author_name": "阳光开朗大男孩",
          "author_url": "",
          "post_date": "2023-10-14T07:35:11.417000",
          "content": "<p>OK, thanks a lot!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2511427": "My pipeline:\n- Uses tifffile to open the 20x magnification layer of the source .tiff/.svs\n- Passes the pixel array to PIL\n- Resizes and exports the thumbnail with PIL with the option `resample=PIL.Image.Resampling.LANCZOS`",
    "2481367": "Most of the external datasets are provided in svs/tif format, and I'd like to convert these to thumbnails in the same way as this competition. Any idea?",
    "2511302": "you can just open the tiff with PIL.Image... and i guess the thumbnails are then just resized and converted to png. Would be nice if anyone can confirm that and maybe tell us how exactly the WSI images are resized (Interpolation mode etc.)",
    "2481474": "Use a whole slide image viewer such as [https://qupath.github.io/](url) or Aperio Imagescope. They can open the files, take snapshots for the thumbnail, and much more."
  }
}