Code Monkey home page Code Monkey logo

Comments (3)

JunMa11 avatar JunMa11 commented on July 18, 2024 1

Hi @Sayantan17 ,

I do not have the exact code for ACDC and I do not work with it this year.

However, it is easy to save the data

import nibabel as nib
img_4D_nii = nib.load('path to 4D data')
img_4D = img_4D_nii.get_fdata()
img_3D = img_4D[:,:,:,0]
nib.save(nib.Nifti1Image(img_3d, img_4D_nii.affine, img_4D_nii.header), 'path/save_name') 

from seglossodyssey.

JunMa11 avatar JunMa11 commented on July 18, 2024

Hi @Sayantan17 ,

Unfortunately, I do not use the conversion function in nnUNet.
I usually write the conversion function by myself.

If I understand your question right, you want to convert 4D data to 3D, right?

I usually extract one channel to obtain the 3D volume.

import nibabel as nib
img_4D = nib.load('path to 4D data').get_fdata()
img_3D = img_4D[:,:,:,0]

from seglossodyssey.

Sayantan17 avatar Sayantan17 commented on July 18, 2024

Thx Jun,
That's what I tried. Can you please help me to write that for ACDC dataset, I am whole lot confused by its file & structure. We could upload that to the repo for users. I mean the 4D to 3D, and saving thr data, and GT. Let me know.

from seglossodyssey.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.