This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Tuesday, December 22, 2009 9:59:19 PM(UTC)
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
#2
Posted
:
Wednesday, December 23, 2009 7:11:53 AM(UTC)
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)
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)
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)
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)
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)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
I'm sorry here's the file.
#8
Posted
:
Tuesday, December 29, 2009 8:54:56 PM(UTC)
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)
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)
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.