ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 UserData and UserDataVect example
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

lzehnder

France
14 Posts

Posted - Nov 16 2012 :  02:45:38  Show Profile  Reply
Hello,

with the UserDataVect delphi example it's not possible to save a Tif file. I have Zstream format error.

I have made this modification for test with Tiff File, the Annotation is Save and Load but not the ObjUserData:

// Open
procedure TMainForm.Button1Click(Sender: TObject);
var
filename:string;
begin
if OpenDialog1.Execute then
begin
filename:=OpenDialog1.FileName;
if IsKnownFormat(filename) then
begin
ImageEnVect1.IO.LoadFromFile(filename);
ImageEnvect1.Fit;
// load annotations
ImageEnVect1.RemoveAllObjects;
ImageEnVect1.IO.Params.ImagingAnnot.CopyToTImageEnVect(ImageEnVect1);
end
else
ImageEnVect1.LoadFromFileAll(filename);
end;
end;

// Save
procedure TMainForm.Button2Click(Sender: TObject);
begin
if SaveDialog1.Execute then
begin
ImageEnVect1.IO.Params.ImagingAnnot.CopyFromTImageEnVect(ImageEnVect1);
ImageEnVect1.IO.SaveToFile(SaveDialog1.FileName);
ImageEnVect1.SaveObjectsToTIFF(SaveDialog1.FileName);
end;
end;

Thank you

lzehnder

France
14 Posts

Posted - Nov 19 2012 :  06:35:19  Show Profile  Reply

For Tiff image :

Load :
ImageEnVect1.IO.LoadFromFile(filename);
ImageEnvect1.Fit;
// load annotations
ImageEnVect1.RemoveAllObjects;
ImageEnVect1.LoadObjectsFromTIFF(filename);

Save :
ImageEnVect1.IO.SaveToFile(SaveDialog1.FileName);
ImageEnVect1.SaveObjectsToTIFF(SaveDialog1.FileName);
Go to Top of Page

fab

1310 Posts

Posted - Nov 22 2012 :  00:30:53  Show Profile  Reply
Wang Annotations (ImagingAnnot) support a subset of TImageEnVect properties. ObjUserData (and many others) is not supported by Want Annotations.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: