Page 1 of 1

smoothing series

Posted: Sun Oct 23, 2005 11:42 pm
by 9340187
we are still having an issue,I think, with the smoothiong series. The smoothed series looks much like the original. Very little it may be the setings. We use factor=10 and our images. we also note that if we set
intepolate=true, the progarm crashes as the interpolate method call.
I cam post an image of the data series and also one of the
smooth series tomorrow if that helps.

Thanks,
Jennifer



profileseries.clear;
smoothseries.clear;
derivseries.clear;
Tfunctiona:=Tsmoothingfunction.create(self);
Tfunctiona.interpolate:=false;
Tfunctiona.factor:=10;
smoothseries.setfunction(Tfunctiona);
smoothseries.DataSources.add(profileseries);
FOR mm:=profminfld.asInteger TO profmaxfld.asInteger Do Begin
profilenode:=mylist.items[mm];
case profcolor.itemindex of
intenline:profval:=tnodetype(profilenode.data^).mono;
redline:profval:=tnodetype(profilenode.data^).r;
greenline:profval:=tnodetype(profilenode.data^).g;
blueline: profval:=tnodetype(profilenode.data^).b;
end;
profileseries.addXY(mm,profval,'',clTeeColor);
smoothseries.checkdatasource;

Posted: Mon Oct 24, 2005 7:47 am
by narcis
Hi Jennifer,

I'm not able to reproduce it here using the code snippet below. It works fine even using Interpolate=true. Could you please post the images you told and, if possible, an example we can run "as-is" to reproduce the problem here?

You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var
  Tfunctiona: TSmoothingFunction;
  i: Integer;
begin
  Tfunctiona:=TSmoothingFunction.create(self);
  Tfunctiona.Interpolate:=true;
  Tfunctiona.Factor:=10;
  Series2.SetFunction(Tfunctiona);
  Series2.DataSources.Add(Series1);
  for i:=0 to 100 do
  Begin
    Series1.AddXY(i,Random);
    Series2.CheckDataSource;
  end;
end;