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 : Tuesday, December 22, 2009 9:59:19 PM(UTC)
rulingking

Groups: Registered
Posts: 26


Hi,

I am trying to convert avi file to dicom from inside asp page to client side using javascript code.

I am using LTMM 14.5 and the patch of 14.5.0.77. this conversion works fine in my VB6 application. To convert I have used the TargetFormat for convert control to ltmmConvert_TargetFormat_DICOM, TargetType to ltmmConvert_Target_Object, and TargetObject to DicomWriter Filter. When the ltmmConvertCtrl.StartConvert() method is called it gives the error message for "LTMM Error: The operation could not be performed because the filter is in the wrong state.". My question is could I use DicomWriter filter in client side scripting. If no, what is the way to convert AVI file to Dicom from within a page then.

Attached the copy of code page as ConvertAVIToDICOM.txt to run convert it as "ConvertAVIToDICOM.asp"


Waiting for reply for a solution over this ...

Thanks in advance
File Attachment(s):
ConvertAVIToDICOM.txt (2kb) downloaded 45 time(s).
 

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 : Wednesday, December 23, 2009 7:11:53 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,022

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

Are you running this code on the same machine where the VB6 code worked? If not, are you sure the PC has all the needed LEADTOOLS DLL files and DirectShow filters?
 
#3 Posted : Wednesday, December 23, 2009 7:05:55 PM(UTC)
rulingking

Groups: Registered
Posts: 26


Hi,

Yes I m running this page on the same machine where leadtools is installed and where VB6 code works perfectly.

Thanks,
 
#4 Posted : Thursday, December 24, 2009 6:40:50 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,022

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

Do you mean this is the client machine or the server machine?
Also, what do I need to do to test here exactly? You mentioned renaming the file to .ASP, but what next? Must I put it on a server and try to access it from a client PC?

 
#5 Posted : Friday, December 25, 2009 12:34:56 AM(UTC)
rulingking

Groups: Registered
Posts: 26


Hi,
just run the page as a standalone application from local machine.

Follow the steps as below:

1) Replace file extension from .txt to .asp
2) Put this page where leadtools are installed or present.
3) Run the page from browser locally where it is.
4) Click on StartConversion button from page.
 
#6 Posted : Sunday, December 27, 2009 6:09:52 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,022

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


Please see the attached file and try it. I have tested it to convert an AVI file to DICOM and it worked.
 
#7 Posted : Sunday, December 27, 2009 6:10:56 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,022

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

I'm sorry here's the file.
File Attachment(s):
ConvertAVIToDICOM2.txt (1kb) downloaded 38 time(s).
 
#8 Posted : Tuesday, December 29, 2009 8:54:56 PM(UTC)
rulingking

Groups: Registered
Posts: 26


Hi Basel,

In updated file you removed the DicomWriter, it works fine with the conversion without DicomWriter, but the error is the result of attaching the DicomWriter filter to ltmm.

As the conversion without dicom writer result in default modality and other tags, I have used dicom writer to update them and to convert file in VB.

If we donot use dicom writer filter then one more heavy step is followed to load the converted dicom, and update all the necessary modules and tags in it and save it back again. To avoid this step I used dicom writer filter in VB6 application.

The error occured if we attach the dicom writer filter to ltmm.

Thanks,
 
#9 Posted : Wednesday, December 30, 2009 5:52:45 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,022

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

Please try the following code:
function button1_onclick()
{
   var ltmmConvertCtrl1 = new ActiveXObject("LTMM.ltmmConvert.130");
   ltmmConvertCtrl1.sourcefile = "c:\\DaDa_CMP.avi";
   ltmmConvertCtrl1.TargetFormat = 4; //ltmmConvert_TargetFormat_DICOM;
   ltmmConvertCtrl1.TargetFile = "c:\\dada2.dcm";
   var writerFilter = ltmmConvertCtrl1.GetSubObject(2); // ltmmConvert_Object_TargetFilter
   alert(writerFilter.OutputFileName);
   ltmmConvertCtrl1.StartConvert();
}

I have tried it and it worked correctly.

 
#10 Posted : Wednesday, December 30, 2009 8:25:34 PM(UTC)
rulingking

Groups: Registered
Posts: 26


Hi Basel,

I tried this in my sample and it works correctly for me too. Get back to you for a new problem after working with this in my main page.

Thanks alot,
 
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-2024, Yet Another Forum.NET
This page was generated in 0.104 seconds.