visit-dav / summer-projects

A place to manage activity on summer projects
1 stars 0 forks source link

Data on Big Toe / Right foot (week 2 updates) (Joshua's project) #27

Closed corvette20 closed 1 year ago

corvette20 commented 1 year ago

I looked at a few different samples.

Screen Shot 2022-07-18 at 11 27 51 AM Screen Shot 2022-07-18 at 11 27 04 AM

From the data, I found that the middle of the data is (8x10^3)

Screen Shot 2022-07-18 at 1 59 04 PM Screen Shot 2022-07-18 at 1 58 01 PM

From the data, I found that the middle of the data is (8x10^3)

Screen Shot 2022-07-18 at 4 54 34 PM Screen Shot 2022-07-18 at 4 50 39 PM

From the data, I found that the middle of the data is (.6x10^3)

markcmiller86 commented 1 year ago

@corvette20 ok, thanks for this. Did you do this analysis for a few of the larger, easily identified vessels? Its probably ok if you didn't but having a few different examples is good just to be sure we don't have a dataset with wildly different outside-to-inside density profiles. I don't think we do but its always good to double check.

I think you inadvertently mixed up the two thresholds.

To summarize your results...

I agree with this.

Now, on to identifying 4 landmarks you can find in common between the the lo-res, whole foot and the hi-res big toe. You want these landmarks to be somewhat distributed from each each other. This helps to minimize possible linear dependencies that would make the process of calculating the transform parameters more sensitive to minor variations in their values.

Our goal is a transform that maps FROM the hi-res toe data (we'll do it for each toe but just the big toe is fine for now), TO its proper position in the lo-res whole foot data. So, the target coordinate system is that of the lo-res whole foot. Now, these datasets are different in many ways. We know their scales are different. The big toe is 4032x4032x9000 (or there abouts) while the lo-res whole foot is 512x512x300 (about). There will also be translation and maybe rotation. Oh, almost forgot...there is a diffference in the oritentation of slices (.tiff images) to the XYZ coordiantes. In lo-res whole foot, heel-to-toe oriention is along X axis. In hi-res big toe, it is in Z.

See this article for a 2D example.

You want 3D though. See this article for more details that work for 3D.

Using that article...you will have the equation y = Mx for every pair of landmark points you identify where y is a point in the target (lo-res whole foot) and x is a point in the source (hi-res toe). The M matrix is 4x4 so it has 16 entries but the 3D article above explains why there are zeros in M on the bottom row and last column. So, there are really only 12 unknowns. Each pair of points defines 3 equations so 4 pairs of landmark points defines 12 equations and with that you have a problem in 12 equations and 12 unknowns to define the M transform. If you want, you can go for more landmark points creating N equations in 12 unknowns and then you can solve the least squares solutions of that over-determined system to get the M matrix. It is those values you would enter into VisIt's transform operator to map the toe onto the foot.

If we just map the toe onto the foot, we have a problem in that where the two overlap, we have overlapping data. We don't want that. So, we also need to clip away or other wise cut out the lo-res whole foot data for the region we are mapping the toe into. I think the box operator in VisIt is what you want to use for that. What are the parameters for that box? They are the same as the extreme corners of the big-toe mapped through the transform, M.

markcmiller86 commented 1 year ago

Once you have the above designed, we then need to build a keyframe sequence that will serve as the basis for the animation. Let me propose a sequence and see what you think...

  1. Start with simple Pseudocolor plot of whole brick of lo-res whole foot data, maybe rotate around it for a bit.
  2. Then, make the "air" part of the dataset (low density stuff) slowly melt away revealing the blood vessel network alone.
  3. Again, rotate it around a bit.
  4. Then apply the box operator to the big toe in such a way that over a few secs of animation the toe is cut away...the box operator would slowly grow (in X direction I think for lo-res whole foot dataset).
  5. Oh...what could be way cool is that you zoom in on the big toe and have the box operator on the one hand remove the lo-res data but have another box operator reveal the high res data right behind it. So, it would be like a sweep over the big toe where the lo-res (in front of the sweep) is removed and the hi-res (behind the sweep) is revealed.

I know we talked about maybe animating the transformation itself so that the hi-res big toe appeared to fly into place from some position away from the lo-res whole foot. That is also doable but I think the above animation might be cooler.

wmondy commented 1 year ago

What are the units for the distance measurements here?

markcmiller86 commented 1 year ago

What are the units for the distance measurements here?

@corvette20 can you reply? I think the folders contining the .tiff slice images contain some readme files or other such metadata with that information.

markcmiller86 commented 1 year ago

@corvette20 I tried some volume rendering in VisIt...

short video

Screen Shot 2022-07-21 at 8 45 53 PM

session file

It helps to orient yourself in the data but you can't pick on a volume plot.

corvette20 commented 1 year ago

Thank you for the video!