Welcome Guest! To enable all features, please Login or Register.



Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, February 28, 2012 9:43:56 AM(UTC)

Groups: Registered
Posts: 10

Hi, please help me.

Now I am using LEADTools 17.5 and c#.

I use codes like following to load a multi-page image into medical viewer:

MedicalViewerMultiCell cell = new MedicalViewerMultiCell(null, false, 1, 1);
DicomDataSet ds = new DicomDataSet();
ds.Load(sPath, DicomDataSetLoadFlags.None);
int count = ds.GetImageCount(tag);
cell.Image = ds.GetImages(tag, 0, count, 0, RasterByteOrder.Rgb | RasterByteOrder.Gray, DicomGetImageFlags.AutoApplyVoiLut);

and it works.

Problem 1:

when I try to change current page of the image:

cell.image.page = 2;

then nothing happened.

Problem 2:

sure I can play animation by using

cell.Animation..Animated = true;

But after I stopped the animation, I try to set a region

cell.Image.SetRegion(null, region, RasterRegionCombineMode.Set);

I know the region is set successful but I cannot see it!

By the way, if I don't play animation then the region can be seen.

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, February 28, 2012 12:16:14 PM(UTC)


Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Hello David,
The reason you are seeing these issues is because the MedicalViewerMultiCell control actually has a separate property for choosing which page or frame in the multi-page image to display. Rather than changing the cell.Image.Page property, you'll want to change the cell.ActiveSubCell property. So, for example, in the code you posted above you'll want to change "cell.image.page = 2" to "cell.ActiveSubCell = 1". Note that the ActiveSubCell property is a zero based index while the Image Page is a 1 based index.
The second issue you are seeing is actually tied to the same problem as the first. When you call cell.Image.SetRegion(), you are setting a region to the currently selected page. So what you will want to do before calling SetRegion() is make sure that the Image page is set to the same page that is being displayed by the control. Since (as I mentioned before) the ActiveSubCell is a 0 based index and the Page is 1 based, you can ensure that your region is visible by doing something like this:

cell.Image.Page = cell.ActiveSubCell + 1;
cell.Image.SetRegion(null, rgn, RasterRegionCombineMode.Set);

Essentially, you want to make sure that you are updating both properties to match the currently visible page keeping in mind that the properties are offset by 1.

Hope that helps,

#3 Posted : Tuesday, February 28, 2012 12:38:02 PM(UTC)

Groups: Registered
Posts: 10

Thank you very much.
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2023, Yet Another Forum.NET
This page was generated in 0.109 seconds.