Downs
Downs' analysis is the measurement to identify skeletal malformations by relating the various cephalometric points and planes.
Instructions to use Cephalopoint (Version 2)
Apply Cephalopoint to measure Steiner´s Lateral Cephalometrics Version 2.0 follow the next steps:
Step 1. Download all files from Folder Steiner Version 2 in the same PC Folder
Step 2. Open Octave and select the folder where the code files were downloaded.
Step 3. Open and run Cephalopoint.m .
Step 4. Select Downs.
Step 5. Follow the instructions.
Source Code (Version 1.0):
% Software: Downs' Cephalometric Technique
## Copyright (C) 2017 J.J. Reyes-Salgado
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; If not, see <http://www.gnu.org/licenses/>.
##
## Author: J.J. Reyes-Salgado <juanjose.reyes@upaep.mx>
pkg describe image
clear
clc
% Dialog to choose image to open and file to save the measuremnts
prompt = {'Enter Image name:','Enter File name:'};
dlg_title = 'Input the X-ray Image and the File to save the measuremnts';
num_lines= 1;
def = {'Photo','DownsFile'};
resp = inputdlg(prompt,dlg_title,num_lines,def);
pict=strcat(resp{1,1},'.jpg');
sfile=strcat(resp{2,1},'.csv');
% Begin de software
B=imread(pict); % Open X ray picture
hFig = figure('units','normalized','outerposition',[0 0 1 1]);
imshow(B)
% Select Scale
promptS={'Enter the value of scale bar in cm:'};
digS='Input value of scale (cm):';
defS={'5'};
respS=inputdlg(promptS,digS,num_lines,defS);
value=str2num(respS{1,1});
% Select points
msgbox('Select the start and end point on the scale bar');
[xE,yE,bE] = ginput(2);
pix=value/abs(yE(1)-yE(2));
msgbox('Select Infraorbital (Or)','Point Or');
[xOr,yOr,bOr] = ginput(1);
msgbox('Select Menton (Me)','Point Me');
[xMe,yMe,bMe] = ginput(1);
msgbox('Select Nasion (Na)','Point Na');
[xNa,yNa,bNa] = ginput(1);
msgbox('Select A point','Point A');
[xA,yA,bA] = ginput(1);
msgbox('Select B point','Point B');
[xB,yB,bB] = ginput(1);
msgbox('Select Sella (S)','Point S');
[xS,yS,bS] = ginput(1);
msgbox('Select Gnathion (Gn)','Point Gn');
[xGn,yGn,bGn] = ginput(1);
msgbox('Select Gonion (Gon)','Point Gon');
[xGo,yGo,bGo] = ginput(1);
msgbox('Select Pogonion (Pg)','Point Pg');
[xPog,yPog,bPog] = ginput(1);
msgbox('Select Porion (Po)','Point Po');
[xPo,yPo,bPo] = ginput(1);
msgbox('Select Lower incisor crown (IIC)','Point IIC');
[xIIC,yIIC,bIIC] = ginput(1);
msgbox('Select Lower incisor root (IRC)','Point IRC');
[xIRC,yIRC,bIRC] = ginput(1);
msgbox('Select Upper incisor crown (ISC)','Point ISC');
[xISC,yISC,bISC] = ginput(1);
msgbox('Declarar Upper incisor root (ISR)','Point ISR');
[xISR,yISR,bISR] = ginput(1);
msgbox('Select InterOcclusal Molars (OA)','Point OA');
[xOA,yOA,bOA] = ginput(1);
msgbox('Select InterOcclusal Incisors (OS)','Point OS');
[xOS,yOS,bOS] = ginput(1);
% Measure of distances
rPoOr=[xOr-xPo yOr-yPo];
distPoOr=norm(rPoOr)*pix;
rNaPog=[xNa-xPog yNa-yPog];
distNaPog=norm(rNaPog)*pix;
rNaA=[xNa-xA yNa-yA];
distNaA=norm(rNaA)*pix;
rAB=[xA-xB yA-yB];
distAB=norm(rAB)*pix;
rAPog=[xA-xPog yA-yPog];
distAPog=norm(rAPog)*pix;
rSGn=[xS-xGn yS-yGn];
distSGn=norm(rSGn)*pix;
rMeGo=[xMe-xGo yMe-yGo];
distMeGo=norm(rMeGo)*pix;
rOSOA=[xOS-xOA yOS-yOA];
distOSOA=norm(rOSOA)*pix;
rII=[xIIC-xIRC yIIC-yIRC];
distII=norm(rII)*pix;
rIS=[xISC-xISR yISC-yISR];
distIS=norm(rIS)*pix;
% Measure of angles
angPFac=acosd((dot(rPoOr,rNaPog)*pix.^2)/(distPoOr*distNaPog))
angPConv=acosd((dot(rNaA,rAPog)*pix.^2)/(distNaA*distAPog))
angPAB=acosd((dot(rAB,rNaPog)*pix.^2)/(distAB*distNaPog));
angPMandi=acosd((dot(rPoOr,rMeGo)*pix^2)/(distPoOr*distMeGo))
angEjeY=180-acosd((dot(rSGn,rPoOr)*pix^2)/(distSGn*distPoOr))
angOclu=acosd((dot(rOSOA,rPoOr)*pix^2)/(distOSOA*distPoOr))
angInc=acosd((dot(rII,rIS)*pix^2)/(distII*distIS))
angPIOclu=90-acosd((dot(rII,rOSOA)*pix^2)/(distII*distOSOA))
angPIMand=acosd((dot(rMeGo,rII)*pix^2)/(distII*distMeGo))
% Point Perpendicular Pmax to Upper incisor to APg
rAISC=[xA-xISC yA-yISC];
distAISC=norm(rAISC)*pix;
angT=acosd((dot(rAPog,rAISC)*pix.^2)/(distAPog*distAISC));
Pmax=distAISC*sind(angT)
% Signo AB-NaPog
Sig=cross([rAB 0],[rNaPog 0]);
uSig=Sig./norm(Sig);
angABNPg=uSig(3)* angPAB
% Save Data
Dato=[angPFac angPConv angABNPg angPMandi angEjeY angOclu angInc ...
angPIOclu angPIMand Pmax];
fileID=fopen(sfile,'a');
for i=1:length(Dato)
fprintf(fileID, '%3.4f,',Dato(i));
end
fprintf(fileID, '%8s\n','');
fclose(fileID);