{
  "id": 600540,
  "title": "Is the provided Segmentation flipped in y axis?",
  "url": "/competitions/rsna-intracranial-aneurysm-detection/discussion/600540",
  "author_name": "IAmParadox",
  "post_date": "2025-08-23T13:13:04.554000",
  "votes": 9,
  "comment_count": 6,
  "views": 0,
  "content": "<p>I was looking at the provided segmentation for the series and it seems like most of the segmentations are flip in y-axis and some of them are flipped in x-axis.</p>\n<p>Eg: UID: 1.2.826.0.1.3680043.8.498.10076056930521523789588901704956188485</p>\n<p>Without flipping the segmentation</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4362752%2F27131dde2423eafedf04e0a40a9cc4f8%2Fkaggle1.png?generation=1755954605871668&amp;alt=media\" alt=\"Without flipping the segmentation\"></p>\n<p>After flipping the segmentation along y-axis<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4362752%2Fbb2ab0c390c6c45952b63133112d95f2%2Fkaggle2.png?generation=1755954664469121&amp;alt=media\" alt=\"After flipping the segmentation along y-axis\"></p>\n<p>Notebook: <a href=\"https://www.kaggle.com/code/iamparadox/segmentation-visualization\" target=\"_blank\">https://www.kaggle.com/code/iamparadox/segmentation-visualization</a></p>",
  "messages": [
    {
      "id": 3273826,
      "postDate": "2025-08-23T13:13:04.553Z",
      "content": "<p>I was looking at the provided segmentation for the series and it seems like most of the segmentations are flip in y-axis and some of them are flipped in x-axis.</p>\n<p>Eg: UID: 1.2.826.0.1.3680043.8.498.10076056930521523789588901704956188485</p>\n<p>Without flipping the segmentation</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4362752%2F27131dde2423eafedf04e0a40a9cc4f8%2Fkaggle1.png?generation=1755954605871668&amp;alt=media\" alt=\"Without flipping the segmentation\"></p>\n<p>After flipping the segmentation along y-axis<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4362752%2Fbb2ab0c390c6c45952b63133112d95f2%2Fkaggle2.png?generation=1755954664469121&amp;alt=media\" alt=\"After flipping the segmentation along y-axis\"></p>\n<p>Notebook: <a href=\"https://www.kaggle.com/code/iamparadox/segmentation-visualization\" target=\"_blank\">https://www.kaggle.com/code/iamparadox/segmentation-visualization</a></p>",
      "rawMarkdown": "I was looking at the provided segmentation for the series and it seems like most of the segmentations are flip in y-axis and some of them are flipped in x-axis.\n\nEg: UID: 1.2.826.0.1.3680043.8.498.10076056930521523789588901704956188485\n\n\nWithout flipping the segmentation\n\n![Without flipping the segmentation](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4362752%2F27131dde2423eafedf04e0a40a9cc4f8%2Fkaggle1.png?generation=1755954605871668&alt=media)\n\nAfter flipping the segmentation along y-axis\n![After flipping the segmentation along y-axis](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4362752%2Fbb2ab0c390c6c45952b63133112d95f2%2Fkaggle2.png?generation=1755954664469121&alt=media)\n\n\nNotebook: https://www.kaggle.com/code/iamparadox/segmentation-visualization",
      "votes": 9
    },
    {
      "id": 3273831,
      "postDate": "2025-08-23T13:33:00.913Z",
      "content": "<p>Looks like. And same as previous depth flips, in general flip is more probable than 180 rotation right?</p>\n<p>EDIT: Actually, in this case a 180 rotation doesn't fits better? Would be a double y,x flip.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8722753%2F5713b2e5632f4ac8ce8bf1728785da80%2Fdoubleflip.jpg?generation=1755957000559282&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "Looks like. And same as previous depth flips, in general flip is more probable than 180 rotation right?\n\nEDIT: Actually, in this case a 180 rotation doesn't fits better? Would be a double y,x flip.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8722753%2F5713b2e5632f4ac8ce8bf1728785da80%2Fdoubleflip.jpg?generation=1755957000559282&alt=media)",
      "votes": 1,
      "replies": [
        {
          "id": 3273838,
          "postDate": "2025-08-23T13:45:01.883Z",
          "content": "<p>Yup it does indeed I have just checked it!</p>",
          "rawMarkdown": "Yup it does indeed I have just checked it!",
          "replies": [
            {
              "id": 3273846,
              "postDate": "2025-08-23T14:01:41.153Z",
              "content": "<p>But wait a second, are you packing slices by yourself right? Have you checked with provided already packed volumes?</p>\n<p>EDIT: At least in that case provided data fits perfectly. The volume and labels are rotated 90 degrees to the rigth, but they fit.</p>\n<p>EDIT: Consider that masks are packed y,x,z while your packing is z,y,x, I haven't checked how you handle swap axis to fit them, but if permutation is odd it gets mirrored.</p>",
              "rawMarkdown": "But wait a second, are you packing slices by yourself right? Have you checked with provided already packed volumes?\n\nEDIT: At least in that case provided data fits perfectly. The volume and labels are rotated 90 degrees to the rigth, but they fit.\n\nEDIT: Consider that masks are packed y,x,z while your packing is z,y,x, I haven't checked how you handle swap axis to fit them, but if permutation is odd it gets mirrored."
            },
            {
              "id": 3273852,
              "postDate": "2025-08-23T14:30:07.350Z",
              "content": "<p>Yup, actually after investigating it. It seems that the shape of the segmentation volume is: y,x,z. I was working under the assumption that it was x,y,z. But as you have said using y,x,z with provided packed volume aligns the segmentation nicely!</p>",
              "rawMarkdown": "Yup, actually after investigating it. It seems that the shape of the segmentation volume is: y,x,z. I was working under the assumption that it was x,y,z. But as you have said using y,x,z with provided packed volume aligns the segmentation nicely!",
              "votes": 2
            },
            {
              "id": 3274505,
              "postDate": "2025-08-24T23:18:31.097Z",
              "content": "<p>So you have what you need? Since there are many ways to convert DICOM to NIfTI, there is no guarantee that segmentations will line up if you convert the images yourself. This is why we provided NIfTI images for all segmentation cases.</p>",
              "rawMarkdown": "So you have what you need? Since there are many ways to convert DICOM to NIfTI, there is no guarantee that segmentations will line up if you convert the images yourself. This is why we provided NIfTI images for all segmentation cases.",
              "votes": 1
            },
            {
              "id": 3274529,
              "postDate": "2025-08-25T00:02:28.553Z",
              "content": "<p>I think we are all good thank you.</p>",
              "rawMarkdown": "I think we are all good thank you."
            }
          ]
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 3273831,
      "author_name": "Ángel Jacinto Sánchez Ruiz",
      "author_url": "",
      "post_date": "2025-08-23T13:33:00.913000",
      "content": "<p>Looks like. And same as previous depth flips, in general flip is more probable than 180 rotation right?</p>\n<p>EDIT: Actually, in this case a 180 rotation doesn't fits better? Would be a double y,x flip.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8722753%2F5713b2e5632f4ac8ce8bf1728785da80%2Fdoubleflip.jpg?generation=1755957000559282&amp;alt=media\" alt=\"\"></p>",
      "votes": 1,
      "replies": [
        {
          "id": 3273838,
          "author_name": "IAmParadox",
          "author_url": "",
          "post_date": "2025-08-23T13:45:01.883000",
          "content": "<p>Yup it does indeed I have just checked it!</p>",
          "votes": 0,
          "replies": [
            {
              "id": 3273846,
              "author_name": "Ángel Jacinto Sánchez Ruiz",
              "author_url": "",
              "post_date": "2025-08-23T14:01:41.153000",
              "content": "<p>But wait a second, are you packing slices by yourself right? Have you checked with provided already packed volumes?</p>\n<p>EDIT: At least in that case provided data fits perfectly. The volume and labels are rotated 90 degrees to the rigth, but they fit.</p>\n<p>EDIT: Consider that masks are packed y,x,z while your packing is z,y,x, I haven't checked how you handle swap axis to fit them, but if permutation is odd it gets mirrored.</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3273852,
              "author_name": "IAmParadox",
              "author_url": "",
              "post_date": "2025-08-23T14:30:07.350000",
              "content": "<p>Yup, actually after investigating it. It seems that the shape of the segmentation volume is: y,x,z. I was working under the assumption that it was x,y,z. But as you have said using y,x,z with provided packed volume aligns the segmentation nicely!</p>",
              "votes": 2,
              "replies": []
            },
            {
              "id": 3274505,
              "author_name": "Evan Calabrese",
              "author_url": "",
              "post_date": "2025-08-24T23:18:31.097000",
              "content": "<p>So you have what you need? Since there are many ways to convert DICOM to NIfTI, there is no guarantee that segmentations will line up if you convert the images yourself. This is why we provided NIfTI images for all segmentation cases.</p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 3274529,
              "author_name": "Ángel Jacinto Sánchez Ruiz",
              "author_url": "",
              "post_date": "2025-08-25T00:02:28.553000",
              "content": "<p>I think we are all good thank you.</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "3273826": "I was looking at the provided segmentation for the series and it seems like most of the segmentations are flip in y-axis and some of them are flipped in x-axis.\n\nEg: UID: 1.2.826.0.1.3680043.8.498.10076056930521523789588901704956188485\n\n\nWithout flipping the segmentation\n\n![Without flipping the segmentation](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4362752%2F27131dde2423eafedf04e0a40a9cc4f8%2Fkaggle1.png?generation=1755954605871668&alt=media)\n\nAfter flipping the segmentation along y-axis\n![After flipping the segmentation along y-axis](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4362752%2Fbb2ab0c390c6c45952b63133112d95f2%2Fkaggle2.png?generation=1755954664469121&alt=media)\n\n\nNotebook: https://www.kaggle.com/code/iamparadox/segmentation-visualization",
    "3273831": "Looks like. And same as previous depth flips, in general flip is more probable than 180 rotation right?\n\nEDIT: Actually, in this case a 180 rotation doesn't fits better? Would be a double y,x flip.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8722753%2F5713b2e5632f4ac8ce8bf1728785da80%2Fdoubleflip.jpg?generation=1755957000559282&alt=media)"
  }
}