Code Monkey home page Code Monkey logo

Comments (4)

romainVala avatar romainVala commented on June 24, 2024

Hi
sound weird, I suspect it comes from your images
but try with
transform_rotate = tio.transforms.RandomAffine(degrees=(0,0,0,0,5,5), p=1, scale=0)
by default scaling factor is 0.1

from torchio.

fepegar avatar fepegar commented on June 24, 2024

@javidsss, can you please share some data, a minimal working example and screenshots?

from torchio.

fepegar avatar fepegar commented on June 24, 2024

By the way, you are showing the top slice, which will probably be black if you are looking, for example, at an MRI in RAS orientation:

torchio_image_rotate.data[0, :, :, 1]

For example:

In [1]: import torchio as tio

In [2]: t1 = tio.datasets.FPG().t1

In [3]: import matplotlib.pyplot as plt

In [4]: plt.imshow(t1.data[0, :, :, 1], cmap='gray')
Installed osx event loop hook.
Out[4]: <matplotlib.image.AxesImage object at 0x16c7cc950>

In [5]: plt.show()

Figure_1

You can use the plot method instead:

In [6]: t1.plot()

Figure_1

I'm going to assume that it's simply a visualization issue and not a bug. Feel free to reopen if you disagree.

from torchio.

javidsss avatar javidsss commented on June 24, 2024

Thank you all for your help. The trick with adding scales=0 solved the issue.

from torchio.

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.