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

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, October 14, 2013 2:31:39 AM(UTC)
marilink

Groups: Registered
Posts: 3


Hello, I'm using leadtools version 17 and C#.NET.

Until now, to set one image in Pixel Data I've used these methods:

img = new RasterImage(
RasterMemoryFlags.User,
raw_columns, //of raw data
raw_rows, //of raw data
.., //nbit grayscale
RasterByteOrder.Gray,
RasterViewPerspective.TopLeft,
null,
pData, //pointer to raw data
nbyte // of raw data
);

DicomElement pixelDataElement = ds.InsertElement(.., .., DicomTag.PixelData, .., .., ..);

ds.SetImage(pixelDataElement,
img,
..,......);

Now, I need to set a multiframe image (concatenation of raw data of frames) in Pixel Data .
I can use :
ds.SetImages(pixelDataElement,
img //images to set
....);

But how to create the RasterImage multiframe (img) ?? How to pass the correct parameters of all the frames (raw_columns, raw_rows, pData, nbyte)??
Thanks

 

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 : Monday, October 14, 2013 11:35:25 AM(UTC)

Ryan  
Guest

Groups: Guests
Posts: 3,028

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

Hello,


RasterImage can contain multiple image pages. How ever there isn't a way to create multiple pages with one constructor call.

Instead you'll need to call the constructor for each page and then add them to the complete RasterImage.

You can use the AddPage method of RasterImage to add pages to an existing RasterImage in memory.

http://www.leadtools.com/help/leadtools/v18/dh/l/leadtools~leadtools.rasterimage~addpage.html

Something like this should work

For Each Page
{
RasterImage temp = new RasterImage(
RasterMemoryFlags.User,
raw_columns, //of raw data
raw_rows, //of raw data
.., //nbit grayscale
RasterByteOrder.Gray,
RasterViewPerspective.TopLeft,
null,
pData, //pointer to raw data
nbyte // of raw data
);

img.AddPage(temp);

temp.Dispose();
}

ds.SetImage(pixelDataElement, img, ...);
 
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-2020, Yet Another Forum.NET
This page was generated in 0.094 seconds.