Giter Site home page Giter Site logo

centerRow param does not work? about leap HOT 8 CLOSED

hws203 avatar hws203 commented on September 14, 2024
centerRow param does not work?

from leap.

Comments (8)

kylechampley avatar kylechampley commented on September 14, 2024

What geometry are you using? Note that centerRow is not a modular-beam parameter. For modular-beam data, use the shift_detector function.

from leap.

winguphehe avatar winguphehe commented on September 14, 2024

The column shift is more often. In my case, the centerCol takes No effect. I use the tau parameter to handle column shift instead.

from leap.

kylechampley avatar kylechampley commented on September 14, 2024

It has no effect?! It definitely does have an effect, so it makes me think you are using it incorrectly. Definitely don't use tau instead of centerCol. These are different parameters for different things. Sure, tau can be used to effectively shift the detector, but it also implicitly rotates the detector. Can you send me a sample script to demonstrate your issue?

from leap.

hws203 avatar hws203 commented on September 14, 2024

My meaning of no work on centerRow is as like below sequence for issue regeneration.

  1. leapct->set_centerCol(leapct->params.centerCol+ offx);
    1-1. Leap->params.convert_conebeam_to_modularbeam();
    1-2. then offx works on volume image, and I can see volume image change.

  2. leapct->set_centerRow(leapct->params.centerRow+ offy);
    2-1. Leap->params.convert_conebeam_to_modularbeam();
    2-2. then offy does not work on volume image, and I can not see any volume image change.

  3. offx, offy is pixel unit for example 10,10.

from leap.

winguphehe avatar winguphehe commented on September 14, 2024

In my case, tau is OK for cone beam CT.

from leap.

hws203 avatar hws203 commented on September 14, 2024

Yes, tau is effective now, I reported this tau issue a few days ago. You can see it at closed issue list.

from leap.

kylechampley avatar kylechampley commented on September 14, 2024

@hws203 I believe you are confusing things with the tau parameter. The tau parameter always worked with cone-beam data. The issue was that it was not being accounted for in the convert_to_modularbeam() function. But like you said, you reported this issue and I fixed it.

Below is a script that shows you that centerRow does indeed work. This parameter is less sensitive than centerCol, so to see a significant change in the reconstruction you must make a significant change in the centerRow value.

import sys
import os
import time
import numpy as np
from leapctype import *
leapct = tomographicModels()
leapct.about()

numCols = 512
numAngles = 2*2*int(360*numCols/1024)
pixelSize = 0.65*512/numCols
numRows = numCols

leapct.set_conebeam(numAngles, numRows, numCols, pixelSize, pixelSize, 0.5*(numRows-1), 0.5*(numCols-1), leapct.setAngleArray(numAngles, 360.0), 1100, 1400)
leapct.set_default_volume()

g = leapct.allocate_projections()
f = leapct.allocate_volume()

leapct.set_FORBILD(f,True)
leapct.project(g,f)

leapct_modular = tomographicModels()
leapct_modular.copy_parameters(leapct)
leapct_modular.convert_to_modularbeam()
f_orig = leapct_modular.FBP(g)

# Now shift the centerRow parameter
# Remember that shifting centerRow redefines the location of
# the z=0 plane, so we will also shift the offsetZ parameter
# so that the two volumes will be aligned
leapct_modular.copy_parameters(leapct)
leapct_modular.set_centerRow(leapct_modular.get_centerRow()+10)
leapct_modular.convert_to_modularbeam()
leapct_modular.set_offsetZ(-10.0*leapct_modular.get_voxelHeight())
f_shifted = leapct_modular.FBP(g)

leapct.display(f_orig)
leapct.display(f_shifted)
leapct.display(f_orig-f_shifted)

from leap.

hws203 avatar hws203 commented on September 14, 2024

Yes, I can assure that centerRow is working at leatct package by checking your above test script. The issue is just too small pixel value(10) of centerRow at my own c++ package, because I used too small pixelheight of detector for ct magnification. I will close this issue. Thanks for your test script.

from leap.

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.