Skip to main content
. 2022 Mar 7;12(3):649. doi: 10.3390/diagnostics12030649
Algorithm 1: 3D manipulation algorithm
  Input: index’s coordinate hi, thumb’s coordinate tk, encompassing lung
    volume’s coordinates e
  Output: lung’s matrix (rotation matrix Θĩ, translation vector Tĩ)
   hiT ← coordinateFormIndex xdi,ydi,zdi
   tkT ← coordinateFormThumb xtk,ytk,ztk
   ejT ← coordinateFormCube xcj,ycj,zcj
   elT ← coordinateFormCube xcl,ycl,zcl
  while (hiT≠const) and (tkT≠const) do
   if (hiT=ejT) and (tkT=elT) then
    hi,jT ← IncidenceIndexCube (hiT)
    tk,lT← IncidenceThumbCube (tkT)
     if (hi+1,j+1T≠hi,jT) and (tk+1,l+1T≠tk,lT) then
      Θĩ ← (hi+1,j+1T−tk+1,l+1T)×hi,jT−tk,lT−1 
      Tĩ ← [hi+1,j+1T−hi+1,j+1T−tk+1,l+1T×hi,jT−tk,lT−1×hi,j]
     end
   end
  end