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
 Problem with ImageEnMView1.MIO.SaveToFile(...);
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kkelchev

Bulgaria
3 Posts

Posted - Mar 16 2020 :  13:05:11  Show Profile  Reply
Hi,
I'm still with demo version.
I did try DICOM viewer example and I noticed that
SaveAs functionality seems not works.

ImageEnMView1.MIO.SaveToFile(SaveImageEnDialog1.FileName) <----

Is it because trial version
Thanks Kamen

KZK

xequte

5044 Posts

Posted - Mar 16 2020 :  21:36:34  Show Profile  Reply
Hi Kamen

Saving should work in the trial version (just with a watermark). Can you show me what code you are using and the result you get?

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

kkelchev

Bulgaria
3 Posts

Posted - Mar 17 2020 :  03:45:03  Show Profile  Reply
The code is from provided example:
I notice that example program SaveAs DICOM works fine as expected.

procedure TMainForm.btnSaveClick(Sender: TObject);
var
  i: Integer;
  BMP : TBitmap;
begin
  SaveImageEnDialog1.AutoSetFilterFileType := -1;
  SaveImageEnDialog1.FileName := '';
  if SaveImageEnDialog1.Execute then
  begin
    //set output pixel format to 24 bit
    ImageEnMView1.MIO.Params[0].SamplesPerPixel := 3;
    ImageEnMView1.MIO.Params[0].BitsPerSample := 8;
    ImageEnMView1.MIO.DuplicateCompressionInfo;
    for i := 0 to ImageEnMView1.ImageCount - 1 do
    begin
      ImageEnMView1.GetTIEBitmap(i).PixelFormat := ie24RGB;
      ImageEnMView1.ReleaseBitmap(i);
    end;
   ImageEnMView1.MIO.SaveToFile(SaveImageEnDialog1.FileName); <-- This line do noting.
  end;
end;

KZK
Go to Top of Page

xequte

5044 Posts

Posted - Mar 17 2020 :  15:44:08  Show Profile  Reply
Hi

What is the file extension of SaveImageEnDialog1.FileName?

If you do not pass a filetype to SaveToFile then the file extension is used to determine the type. For TImageEnMIO, it must also be a multi-image format, such as ioGIF, ioTIFF, ioPS, ioPDF, ioDICOM, ioDCX, ioICO

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

xequte

5044 Posts

Posted - Mar 17 2020 :  16:03:22  Show Profile  Reply
We'll improve this for the next update.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

kkelchev

Bulgaria
3 Posts

Posted - Mar 17 2020 :  19:20:41  Show Profile  Reply
Fine , 10x
But for now, is it possible to extract somehow image/images as Bitmap.


KZK
Go to Top of Page

kkelchev

Bulgaria
3 Posts

Posted - Mar 17 2020 :  19:54:22  Show Profile  Reply
I found solution :)
I took it from another our example.
..\ImageEn\Demos\InputOutput\DicomRange

This one works just fine.

Thanks for our time.

KZK
Go to Top of Page

xequte

5044 Posts

Posted - Mar 18 2020 :  03:37:29  Show Profile  Reply
Cool.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To: