How is Linear Contrast for Image working?

136 views
Skip to first unread message

Dongha Kang

unread,
Mar 3, 2021, 3:11:26 AM3/3/21
to itksnap-users
Hi, I am new quite new to ITKSNAP and I really do respect your work.

I am actually looking at the source code and trying to recreate some of the functions simply using Simple ITK python.

I am looking at the Image layer inspector right now. My question is what type of filter are you guys using in itk? It is hard for me to find the exact function for Linear contrast adjustment  that is directly related to image that appears. Also, there are just so many filters in ITK in general.
I eventually want to let users to decide min/max or level/window and recreate the image with different intensity

Thanks !

origin.png
wanted_output.png

Paul Yushkevich

unread,
Mar 5, 2021, 9:09:21 AM3/5/21
to itksna...@googlegroups.com
It's actually a mess. We use a vtk spline (vtkKochanekSpline) to do the intensity mapping. The spline is used for non-linear remapping too.

If you want to do linear mapping using pure ITK the simplest thing would be to use the itk UnaryFunctionImageFilter and supply your own function. I am not sure if this kind of customizable filter is supported in SimpleITK.

Paul.

--
You received this message because you are subscribed to the Google Groups "itksnap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/itksnap-users/9ec06c2f-a1a9-4919-8f68-ebc1839912een%40googlegroups.com.


--
Paul A. Yushkevich, Ph.D.
Professor of Radiology
Penn Image Computing and Science Laboratory
University of Pennsylvania Perelman School of Medicine

강동하

unread,
Mar 5, 2021, 9:54:28 AM3/5/21
to itksna...@googlegroups.com
Thank you for your reply Paul,

I guess I was just a little confused because there were so many Filter options in Simple-ITK. I will try what you suggested and will get back to you if there are more questions.
Once again, thank you so much.

Dongha

You received this message because you are subscribed to a topic in the Google Groups "itksnap-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/itksnap-users/yaJ91D1nWyw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to itksnap-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/itksnap-users/CAPR4OGPhvb64dx6qHqUXpUP9ScMFnib_v2OUtV_maeyXgcwiEw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages