summaryrefslogtreecommitdiff
path: root/werteunit.inc
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-10-18 16:14:44 +0200
committerErich Eckner <git@eckner.net>2019-10-18 16:14:44 +0200
commit66000f787560c38678cb24c96543560b58d6cebb (patch)
tree7531ee1deabb0576959a800df4866616b9b3ca21 /werteunit.inc
parente5457f7f50db8b629808349380c8f0a403b4a4f1 (diff)
downloadepost-66000f787560c38678cb24c96543560b58d6cebb.tar.xz
Radontransformation nun per fft (momentan noch nicht 100% ok)
Diffstat (limited to 'werteunit.inc')
-rw-r--r--werteunit.inc58
1 files changed, 28 insertions, 30 deletions
diff --git a/werteunit.inc b/werteunit.inc
index 4ee71ce..884edbc 100644
--- a/werteunit.inc
+++ b/werteunit.inc
@@ -170,39 +170,37 @@ begin
end;
{$ENDIF}
-{$IFDEF tLLWerte_radonTransformation}
-//procedure tLLWerte.radonTransformation(xMin,xMax: longint; xStep,yStep: extended; qu: pTLLWerteSingle);
+{$IFDEF tLLWerte_radonTransformationsLineOut}
+//procedure tLLWerte.radonTransformationsLineOut(xMin,xMax: longint; xStep,yStep: extended; qu: pTLLWerteSingle);
var
- oX,oY,iX,iY: longint;
- oYf,cX,sX,iXM,iYM,oXM,oYM,wert: extended;
+ oX,oY,iXG,iYG: int64;
+ cX,sX,iX,iY,iXF,iYF: extended;
begin
- iXM:=(qu^.params.xSteps-1)/2;
- iYM:=(qu^.params.tSiz-1)/2;
- oXM:=(params.xSteps-1)/2;
- oYM:=(params.tSiz-1)/2;
+ // y-doResSmi-georndeter Wert an Stelle (oX,oY) soll gefüllt werden mit
+ // x-&y-doResSmi-geornetem Wert auf der Ursprungsgerade mit Winkel oX*XStep; Position oY*yStep
+ // Wir gehen davon aus, dass das Feld groß genug ist, sodass wir die Mitte nicht erreichen.
for oX:=xMin to xMax do begin
- cX:=cos((oX-oXM)*xStep);
- sX:=sin((oX-oXM)*xStep);
- for oY:=0 to params.tSiz-1 do
- werte[oX+oY*params.xSteps]:=0;
- for iY:=0 to qu^.params.tSiz-1 do
- for iX:=0 to qu^.params.xSteps-1 do begin
- oYf:=((iX-iXM)*sX + (iY-iYM)*cX) / yStep + oYM;
- wert:=qu^.werte[iX + iY*qu^.params.xSteps];
- if oYf<=0 then
- werte[oX]:=
- werte[oX] + wert
- else if oYf >= params.tSiz-1 then
- werte[oX + (params.tSiz-1)*params.xSteps]:=
- werte[oX + (params.tSiz-1)*params.xSteps] + wert
- else begin
- oY:=floor(oYf);
- werte[oX + oY*params.xSteps]:=
- werte[oX + oY*params.xSteps] + wert * (1-oYf+oY);
- werte[oX + (oY+1)*params.xSteps]:=
- werte[oX + (oY+1)*params.xSteps] + wert * (oYf-oY);
- end;
- end;
+ cX:=cos(oX*xStep);
+ sX:=sin(oX*xStep);
+ for oY:=0 to params.tSiz div 2 do begin
+ iX:=oY*yStep*cX;
+ iY:=oY*yStep*sX;
+ iXG:=floor(iX);
+ iXF:=iX-iXG;
+ iYG:=floor(iY);
+ iYF:=iY-iYG;
+ werte[oX+oY*params.xSteps]:=
+ qu^.reBei2DDoResSmi(iXG,iYG)*(1-iXF)*(1-iYF)
+ + qu^.reBei2DDoResSmi(iXG+1,iYG)*iXF*(1-iYF)
+ + qu^.reBei2DDoResSmi(iXG,iYG+1)*(1-iXF)*iYF
+ + qu^.reBei2DDoResSmi(iXG+1,iYG+1)*iXF*iYF;
+ if (oY>0) and (2*oY<params.tSiz) then
+ werte[oX+(params.tSiz-oY)*params.xSteps]:=
+ qu^.imBei2DDoResSmi(iXG,iYG)*(1-iXF)*(1-iYF)
+ + qu^.imBei2DDoResSmi(iXG+1,iYG)*iXF*(1-iYF)
+ + qu^.imBei2DDoResSmi(iXG,iYG+1)*(1-iXF)*iYF
+ + qu^.imBei2DDoResSmi(iXG+1,iYG+1)*iXF*iYF;
+ end;
end;
end;
{$ENDIF}