-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into spinboxui
- Loading branch information
Showing
25 changed files
with
1,307 additions
and
268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Week 4: First draft of the DTI uncertainty visualization | ||
======================================================== | ||
|
||
.. post:: June 27, 2023 | ||
:author: Tania Castillo | ||
:tags: google | ||
:category: gsoc | ||
|
||
What did I do this week? | ||
------------------------ | ||
|
||
`#PR 810: DTI uncertainty visualization <https://github.com/fury-gl/fury/pull/810>`_ | ||
|
||
I made a second PR with the implementation of DTI uncertainty calculation and visualization. Below is an image of diffusion tensor ellipsoids and their associated uncertainty cones. | ||
|
||
.. image:: https://user-images.githubusercontent.com/31288525/254747296-09a8674e-bfc0-4b3f-820f-8a1b1ad8c5c9.png | ||
:width: 530 | ||
:align: center | ||
|
||
I had to use some **dipy** functions, specifically: `estimate_sigma <https://github.com/dipy/dipy/blob/321e06722ef42b5add3a7f570f6422845177eafa/dipy/denoise/noise_estimate.py#L272>`_ for the noise variance calculation, `design_matrix <https://github.com/dipy/dipy/blob/321e06722ef42b5add3a7f570f6422845177eafa/dipy/reconst/dti.py#L2112>`_ to get the b-matrix, and `tensor_prediction <https://github.com/dipy/dipy/blob/321e06722ef42b5add3a7f570f6422845177eafa/dipy/reconst/dti.py#L639>`_ for the signal estimation. The details of this calculations can be found `here <https://onlinelibrary.wiley.com/doi/full/10.1002/mrm.21111>`_. | ||
|
||
What is coming up next? | ||
----------------------- | ||
|
||
I will continue working on the uncertainty PR which is still in its early stage, I'm going to make a couple of adjustments to the description of the parameters and the actor, and keep working on based on the feedback I receive. There are also minor details to be discussed with my mentors about the first PR, which I hope to finish refining. | ||
|
||
Did I get stuck anywhere? | ||
------------------------- | ||
|
||
It took me a while to make the PR because I had some problems with the uncertainty function definition. I tried to use the least amount of parameters for the function, since with data, bvals and bvecs it is possible to obtain the rest of the parameters needed to generate the cones, which led me to readjust some calculations from the base implementation I had, to keep everything working correctly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Week 5: Trying out PRs and Planning Ahead | ||
========================================= | ||
|
||
.. post:: July 01, 2023 | ||
:author: Praneeth Shetty | ||
:tags: google | ||
:category: gsoc | ||
|
||
|
||
What did you do this week? | ||
-------------------------- | ||
Due to ongoing exams, my productivity was limited this week. However, I managed to find some time to explore and review a few PRs submitted by contributors: | ||
|
||
1. Ellipsoid PR `#791 <https://github.com/fury-gl/fury/pull/791>`_: | ||
This PR focuses on creating a new ellipsoid actor defined with SDF and raymarching techniques. | ||
|
||
2. Website Improvement PR `#812 <https://github.com/fury-gl/fury/pull/812>`_: | ||
This PR includes changes for the new compatibility section on the FURY home page. | ||
|
||
Towards the end of the week, I had a meeting with my mentor. We discussed the current status of ongoing PRs and identified action points to focus on in the upcoming weeks. This discussion provided clarity on the challenges faced with certain PRs and issues. | ||
|
||
Did you get stuck anywhere? | ||
--------------------------- | ||
Fortunately, I didn't encounter any major roadblocks or challenges that hindered my progress this week. | ||
|
||
What is coming up next? | ||
------------------------ | ||
With the action points provided by my mentor, I will be dedicating the next week to completing those tasks. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
Week 5: All Roads Lead to Rome | ||
============================== | ||
|
||
.. post:: July 03, 2023 | ||
:author: João Victor Dell Agli Floriano | ||
:tags: google | ||
:category: gsoc | ||
|
||
|
||
Hello everyone, time for another weekly blogpost! Today, we will talk about taking different paths to reach your objective. | ||
|
||
Last Week's Effort | ||
------------------ | ||
After having the FBO properly set up, the plan was to finally *render* something to it. Well, I wished for a less bumpy road | ||
at my :doc:`last blogpost <2023-06-26-week-4-joaodellagli>` but as in this project things apparently tend to go wrong, | ||
of course the same happened with this step. | ||
|
||
|
||
Where the Problem Was | ||
--------------------- | ||
Days passed without anything being rendered to the FBO. The setup I was working on followed the simplest OpenGL pipeline of rendering to | ||
an FBO: | ||
|
||
1. Setup the FBO | ||
2. Attach a texture to it's color attachment | ||
3. Setup the shader to be used in the FBO render and the shader to render the FBO's Color Attachment | ||
4. Render to the FBO | ||
5. Use the color attachment as texture attached to a billboard to render what was on the screen | ||
|
||
But it seems like this pipeline doesn't translate well into VTK. I paired again on wednesday with my mentors, Bruno and Filipi, to try to figure out | ||
where the problem was, but after hours we could not find it. Wednesday passed and then thursday came, and with thursday, a solution: | ||
Bruno didn't give up on the idea and dug deep on VTK's documentation until he found a workaround to do what we wanted, that was retrieving a | ||
texture from what was rendered to the screen and pass it as a texture to render to the billboard. To do it, he figured out we needed to use | ||
a different class, `vtkWindowToImageFilter <https://vtk.org/doc/nightly/html/classvtkWindowToImageFilter.html>`_, a class that has the specific | ||
job of doing exactly what I described above. Below, the steps to do it: | ||
|
||
:: | ||
|
||
windowToImageFilter = vtk.vtkWindowToImageFilter() | ||
windowToImageFilter.SetInput(scene.GetRenderWindow()) | ||
windowToImageFilter.Update() | ||
|
||
texture = vtk.vtkTexture() | ||
texture.SetInputConnection(windowToImageFilter.GetOutputPort()) | ||
|
||
# Bind the framebuffer texture to the desired actor | ||
actor.SetTexture(texture) | ||
|
||
This is enough to bind to the desired actor a texture that corresponds to what was prior rendered to the screen. | ||
|
||
|
||
This Week's Goals | ||
----------------- | ||
Having a solution to that, now its time to finally render some KDE's! This week's plans involve implementing the first version of a KDE | ||
calculation. For anyone interested in understanding what a Kernel Density Estimation is, here is a brief summary from this | ||
`Wikipedia page <https://en.wikipedia.org/wiki/Kernel_density_estimation>`_: | ||
|
||
|
||
In statistics, kernel density estimation (KDE) is the application of kernel smoothing for probability density estimation, i.e., a | ||
non-parametric method to estimate the probability density function of a random variable based on kernels as weights. KDE answers a | ||
fundamental data smoothing problem where inferences about the population are made, based on a finite data sample. In some fields | ||
such as signal processing and econometrics it is also termed the Parzen–Rosenblatt window method, after Emanuel Parzen and Murray | ||
Rosenblatt, who are usually credited with independently creating it in its current form. One of the famous applications of | ||
kernel density estimation is in estimating the class-conditional marginal densities of data when using a naive Bayes classifier, | ||
which can improve its prediction accuracy. | ||
|
||
This complicated sentence can be translated into the below image: | ||
|
||
.. image:: https://raw.githubusercontent.com/JoaoDell/gsoc_assets/main/images/KDE_plot.png | ||
:align: center | ||
:alt: KDE plot of 100 random points | ||
|
||
That is what a KDE plot of 100 random points looks like. The greener the area, the greater the density of points. The plan is to implement | ||
something like that with the tools we now have available. | ||
|
||
Let's get to work! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Week 5: Preparing the data for the Ellipsoid tutorial | ||
===================================================== | ||
|
||
.. post:: July 03, 2023 | ||
:author: Tania Castillo | ||
:tags: google | ||
:category: gsoc | ||
|
||
What did I do this week? | ||
------------------------ | ||
|
||
During the weekly meeting with my mentors, there was a small discussion over the naming of the actor and its usage. On the one hand, although the purpose of the actor is to visualize diffusion tensor ellipsoids, the idea is that it can also be used for any other type of visualization that requires the use of ellipsoids, so in the end, we decided to keep the name *ellipsoid* as it is more generic. On the other hand, as there is already an actor made for the purpose of tensor visualization, namely `tensor_slicer <https://github.com/fury-gl/fury/blob/e595bad0246899d58d24121dcc291eb050721f9f/fury/actor.py#L1172>`_, it might not be obvious how and why one would use this new ellipsoid actor for this purpose, thus it was proposed to make a tutorial that can clarify this. The main difference between both actors relies on the quality and the amount of data that can be displayed, so the idea is to show the difference between both alternatives so the user can choose which one to use depending on their needs. To prepare the tutorial the first step was to `add the data <https://github.com/fury-gl/fury-data/pull/12>`_ I will use on `fury-data <https://github.com/fury-gl/fury-data>`_ so I can then fetch and load the datasets I need to work on the tutorial. | ||
|
||
What is coming up next? | ||
----------------------- | ||
|
||
I need `#PR 791 <https://github.com/fury-gl/fury/pull/791>`_ to be reviewed by my GSoC fellows at FURY, so I will address their comments, and additionally make adjustments on `#PR 810 <https://github.com/fury-gl/fury/pull/810>`_ based on the feedback I receive. I will also start working on the tutorial, the idea is to show the use that can be made of the ellipsoid actor in the visualization of diffusion tensor ellipsoids, compared to the *tensor_slicer* actor. I plan to create a WIP PR to start getting feedback on the general structure of the tutorial and the way everything will be explained. | ||
|
||
Did I get stuck anywhere? | ||
------------------------- | ||
|
||
I did not encounter any obstacles this week. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Week 6: BoundingBox for TextBlock2D! | ||
==================================== | ||
|
||
.. post:: July 08, 2023 | ||
:author: Praneeth Shetty | ||
:tags: google | ||
:category: gsoc | ||
|
||
|
||
What did you do this week? | ||
-------------------------- | ||
This week, I worked on improving the **TextBlock2D** component in the UI system. I started from scratch to address alignment and scaling issues. When resizing the **TextBlock2D**, the text alignment and justification with the background rectangle were inconsistent. To resolve this, I introduced a new "boundingbox" property that calculates the text bounding box based on its content. Additionally, I separated the scaling mode from the resizing action with the new "auto_font_scale" property, enabling automatic font scaling according to the bounding box. This will provide better alignment, justified text, and smoother font scaling for the **TextBlock2D** component. Try it out at `PR #803 <https://github.com/fury-gl/fury/pull/803>`_. | ||
|
||
.. image:: https://github.com/fury-gl/fury/assets/64432063/94212105-7259-48da-8fdc-41ee987bda84 | ||
:align: center | ||
:alt: TextBlock2D will different justifications | ||
|
||
As discussed last week, we also made a decision regarding the scrollbar. After exploring different use cases, we concluded that creating an independent scrollbar is not necessary at the moment. Therefore, we will close the related pull requests. You can find out more about it in the discussion `here <https://github.com/fury-gl/fury/discussions/816>`_. | ||
|
||
Did you get stuck anywhere? | ||
--------------------------- | ||
Implementing the bounding box feature took some extra time as I needed to carefully consider its impact on other UI elements that rely on the **TextBlock2D** component. | ||
|
||
What is coming up next? | ||
----------------------- | ||
Next, I will focus on completing the TextBlock2D Bounding Box PR, which will also indirectly finalize the Spinbox PR. |
Oops, something went wrong.