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
 TImageEnMView and vectorial objects
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

jwest

Brazil
67 Posts

Posted - Jun 21 2011 :  09:23:55  Show Profile  Reply
Hi,
I have a TImageEnMview thumbnail to load images.

When I selected a image on thumbnail, I edit it using a TImageEnVect.
Since I use vectorial object, I canīt save this image with vectorial objects back to thumbnail unless I use ImageEnVect1.CopyObjectsToBack.

The problem is that doing it, my vectorial objects are lost. Next, when I selected other thumbnail image and back to thge first I have no way to recover my vectorial objects.
Is there a workaround to do it?

Regards,

Luiz

fab

1310 Posts

Posted - Jun 21 2011 :  09:49:07  Show Profile  Reply
Hi,
supposing you have to stay compatible with Wang annotations (which is a subset of objects and properties supported by ImageEn), you can transfer objects from TImageEnVect to TImageEnMView writing:

ImageEnMView.MIO.Params[imageIndex].ImagingAnnot.CopyFromTImageEnVect( ImageEnVect1 );

The opposite (from TImageEnMView to TImageEnVect) is:

ImageEnMView.MIO.Params[imageIndex].ImagingAnnot.CopyToTImageEnVect( ImageEnVect1 );
ImageEnVect1.Update();


This way (Wang annotations) allows you to embed objects inside multipage TIFF image files and be compatible with Windows preview, but allows a subset of supported vectorial objects.

Other ways (ie saving/loading vectorial objects in a separated file, for each page) allows you to use all objects and related properties.




Go to Top of Page

jwest

Brazil
67 Posts

Posted - Jun 21 2011 :  10:01:37  Show Profile  Reply
Hi,

It seems it doesn't work with dicom image. The bitmap image in TImageEnVect disappears.

If I use the next, no image is showing:
ImageEnMView1.MIO.Params[idx].ImagingAnnot.CopyToTImageEnVect( ImageEnVect1 );
ImageEnVect1.Update();

If we had a TimageEnMview derived from TImageEnVect, maybe the problem was solved.

Regards,

Luiz
Go to Top of Page

fab

1310 Posts

Posted - Jun 21 2011 :  10:17:23  Show Profile  Reply
>It seems it doesn't work with dicom image. The bitmap image in TImageEnVect disappears.

of course, DICOM images cannot embed Wang annotations.

>If we had a TimageEnMview derived from TImageEnVect, maybe the problem was solved.

TImageEnMView handles multiple images while TImageEnVect handles a single image and annotations over it.

You could load/save vectorial objects, for each dicom frame, in separated files using LoadFromFileIEV and SaveToFileIEV.
Go to Top of Page

jwest

Brazil
67 Posts

Posted - Jun 21 2011 :  10:33:14  Show Profile  Reply
Hi,

You were correct. It works well with Wang Annotations. I thought that I had to delete this line to substitute with your tip:
ImageEnMView1.CopyToIEBitmap( idx, ImageEnVect1.IEBitmap );
I put this line again and all works ok.

But, what event from TImageEnMView thumbnail should I use to save changes to current image, before I select a new image on thumbnail.


Regards,

Luiz
Go to Top of Page

fab

1310 Posts

Posted - Jun 21 2011 :  12:30:42  Show Profile  Reply
>But, what event from TImageEnMView thumbnail should I use to save changes to current
>image, before I select a new image on thumbnail.

This is an application specific question (put a button "Save", "Cancel") or just save the image when TImageEnMView has another image selected (look helps for a events list).
Go to Top of Page

jwest

Brazil
67 Posts

Posted - Jun 21 2011 :  15:56:29  Show Profile  Reply
Hi,

Thank you so much,

Your help was great appreciated in this topic.

I have a basic dicom viewer working now.

Regards,

Luiz
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: