Running dcmtk application on iPhone
Moderator: Moderator Team
Running dcmtk application on iPhone
Hi,
I have compiled DCMTK library for iOS and I am trying to call DCMImage library calls for creating image files from dcm file.
While accessing DcmImage function DcmImage->getStatus() it returns E_NOdata dictionary found.
Please let me know how to load data dictionary on iPhone device.
Thanks in advance
I have compiled DCMTK library for iOS and I am trying to call DCMImage library calls for creating image files from dcm file.
While accessing DcmImage function DcmImage->getStatus() it returns E_NOdata dictionary found.
Please let me know how to load data dictionary on iPhone device.
Thanks in advance
-
- DCMTK Developer
- Posts: 120
- Joined: Thu, 2009-11-26, 08:15
Knowing what I had to look for, I googled for "dcmtk built-in data dictionary":
http://support.dcmtk.org/docs/file_datadict.html
(I think you want to read the "Using a built-in data dictionary" paragraph)
http://support.dcmtk.org/docs/file_datadict.html
(I think you want to read the "Using a built-in data dictionary" paragraph)
Hi DICOM team,
After going through datadic.txt file I am not getting what exactly to do for buil in data dictionary file.
1)My question is I am launching my application on iOS device and while using DICOMImage class it gives me error like E: cant load data dictionary.
Please let me know in easy steps how to load dicom.dic file
2) I am not getting when and how dicom.dic files get loaded and I dont know the reason also why it is not getting loaded on iOS device.
Please help.. Its urgent..
Thanks in advance.
After going through datadic.txt file I am not getting what exactly to do for buil in data dictionary file.
1)My question is I am launching my application on iOS device and while using DICOMImage class it gives me error like E: cant load data dictionary.
Please let me know in easy steps how to load dicom.dic file
2) I am not getting when and how dicom.dic files get loaded and I dont know the reason also why it is not getting loaded on iOS device.
Please help.. Its urgent..
Thanks in advance.
-
- DCMTK Developer
- Posts: 2501
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
What exactly is unclear in the following paragraph (taken from the "datadict.txt" file)?
Also included in the sources is a pre-created built-in data dictionary
which can be used instead (dcmdata/libsrc/dcdictzz.cc). For example, the
project files for the Windows platform use this file instead of the default
(empty) built-in data dictionary. Under Unix environments it should also
be possible to selectively use a built-in data dictionary for specific
applications by including dcdictzz.o earlier in the link path than
libdcmdata.a (if your linker allows this).
I have not understood what changes to done in mkdictbi file and what changes to do in makefile.in for using built in data dictionary
I have all the compiled libraries with me then why should i compile it again for libdcmdata. I am totally confused by the below lines.
referring to this below text in datadic.txt file :-
The default built-in data dictionary code (dcmdata/libsrc/dcdictbi.cc)
currently does nothing. The code for a useful built-in data dictionary can
be regenerated at any time by the mkdictbi program (dcmdata/libsrc/mkdictbi)
and the dcmdata library makefile (dcmdata/libsrc/Makefile.in) includes a
target (builtindict) for this purpose. The makefile also includes a target
(nobuiltindict) to reset back to an empty built-in data dictionary. By
making the built-in data dictionary, rebuilding the libdcmdata.a library
and relinking all your applications will ensure that the built-in data
dictionary is used.
Also included in the sources is a pre-created built-in data dictionary
which can be used instead (dcmdata/libsrc/dcdictzz.cc). For example, the
project files for the Windows platform use this file instead of the default
(empty) built-in data dictionary. Under Unix environments it should also
be possible to selectively use a built-in data dictionary for specific
applications by including dcdictzz.o earlier in the link path than
libdcmdata.a (if your linker allows this).
Could you please tell me reason why dictionary is not loaded on iPhone OS device where it loads on simulator. ?
And how to load it.. in simple and easy steps.
Thanks
I have all the compiled libraries with me then why should i compile it again for libdcmdata. I am totally confused by the below lines.
referring to this below text in datadic.txt file :-
The default built-in data dictionary code (dcmdata/libsrc/dcdictbi.cc)
currently does nothing. The code for a useful built-in data dictionary can
be regenerated at any time by the mkdictbi program (dcmdata/libsrc/mkdictbi)
and the dcmdata library makefile (dcmdata/libsrc/Makefile.in) includes a
target (builtindict) for this purpose. The makefile also includes a target
(nobuiltindict) to reset back to an empty built-in data dictionary. By
making the built-in data dictionary, rebuilding the libdcmdata.a library
and relinking all your applications will ensure that the built-in data
dictionary is used.
Also included in the sources is a pre-created built-in data dictionary
which can be used instead (dcmdata/libsrc/dcdictzz.cc). For example, the
project files for the Windows platform use this file instead of the default
(empty) built-in data dictionary. Under Unix environments it should also
be possible to selectively use a built-in data dictionary for specific
applications by including dcdictzz.o earlier in the link path than
libdcmdata.a (if your linker allows this).
Could you please tell me reason why dictionary is not loaded on iPhone OS device where it loads on simulator. ?
And how to load it.. in simple and easy steps.
Thanks
-
- DCMTK Developer
- Posts: 2501
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Please reply for below query:-
I have not understood what changes to done in mkdictbi file and what changes to do in makefile.in for using built in data dictionary
I have all the compiled libraries with me then why should i compile it again for libdcmdata. I am totally confused by the below lines.
referring to this below text in datadic.txt file :-
The default built-in data dictionary code (dcmdata/libsrc/dcdictbi.cc)
currently does nothing. The code for a useful built-in data dictionary can
be regenerated at any time by the mkdictbi program (dcmdata/libsrc/mkdictbi)
and the dcmdata library makefile (dcmdata/libsrc/Makefile.in) includes a
target (builtindict) for this purpose. The makefile also includes a target
(nobuiltindict) to reset back to an empty built-in data dictionary. By
making the built-in data dictionary, rebuilding the libdcmdata.a library
and relinking all your applications will ensure that the built-in data
dictionary is used.
Also included in the sources is a pre-created built-in data dictionary
which can be used instead (dcmdata/libsrc/dcdictzz.cc). For example, the
project files for the Windows platform use this file instead of the default
(empty) built-in data dictionary. Under Unix environments it should also
be possible to selectively use a built-in data dictionary for specific
applications by including dcdictzz.o earlier in the link path than
libdcmdata.a (if your linker allows this).
I have not understood what changes to done in mkdictbi file and what changes to do in makefile.in for using built in data dictionary
I have all the compiled libraries with me then why should i compile it again for libdcmdata. I am totally confused by the below lines.
referring to this below text in datadic.txt file :-
The default built-in data dictionary code (dcmdata/libsrc/dcdictbi.cc)
currently does nothing. The code for a useful built-in data dictionary can
be regenerated at any time by the mkdictbi program (dcmdata/libsrc/mkdictbi)
and the dcmdata library makefile (dcmdata/libsrc/Makefile.in) includes a
target (builtindict) for this purpose. The makefile also includes a target
(nobuiltindict) to reset back to an empty built-in data dictionary. By
making the built-in data dictionary, rebuilding the libdcmdata.a library
and relinking all your applications will ensure that the built-in data
dictionary is used.
Also included in the sources is a pre-created built-in data dictionary
which can be used instead (dcmdata/libsrc/dcdictzz.cc). For example, the
project files for the Windows platform use this file instead of the default
(empty) built-in data dictionary. Under Unix environments it should also
be possible to selectively use a built-in data dictionary for specific
applications by including dcdictzz.o earlier in the link path than
libdcmdata.a (if your linker allows this).
Hello DICOM team,
I have already gone through datadic.txt file I am not getting how to use built in data dictionary.
I have read all the statements mentioned in that file.
Please help me its urgent I am not able to load my application only as its not loading data dictionary on iOS.
Please help.
Thanks in advance.
I have already gone through datadic.txt file I am not getting how to use built in data dictionary.
I have read all the statements mentioned in that file.
Please help me its urgent I am not able to load my application only as its not loading data dictionary on iOS.
Please help.
Thanks in advance.
-
- DCMTK Developer
- Posts: 2048
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Hi Michael,
Thanks for your reply but it didnot help me.. Since morning i was posting on forum but not getting any worth solution for my problem repasting here my problem. Please help me if u have a solution for it.
I have compiled DCMTK library for iOS and I am trying to call DCMImage library calls for creating image files from dcm file.
While accessing DcmImage function DcmImage->getStatus() it returns E_NOdata dictionary found.
After going through datadic.txt file I am not getting what exactly to do for buil in data dictionary file.
1)My question is I am launching my application on iOS device and while using DICOMImage class it gives me error like E: cant load data dictionary.
Please let me know in easy steps how to load dicom.dic file
2) I am not getting when and how dicom.dic files get loaded and I dont know the reason also why it is not getting loaded on iOS device.
3)I have used DCMDICTPATH env variable too but it didn't work.
After reading datadic.txt file ....
I have not understood what changes to done in mkdictbi file and what changes to do in makefile.in for using built in data dictionary
I have all the compiled libraries with me then why should i compile it again for libdcmdata. I am totally confused by the below lines.
referring to this below text in datadic.txt file :-
The default built-in data dictionary code (dcmdata/libsrc/dcdictbi.cc)
currently does nothing. The code for a useful built-in data dictionary can
be regenerated at any time by the mkdictbi program (dcmdata/libsrc/mkdictbi)
and the dcmdata library makefile (dcmdata/libsrc/Makefile.in) includes a
target (builtindict) for this purpose. The makefile also includes a target
(nobuiltindict) to reset back to an empty built-in data dictionary. By
making the built-in data dictionary, rebuilding the libdcmdata.a library
and relinking all your applications will ensure that the built-in data
dictionary is used.
Also included in the sources is a pre-created built-in data dictionary
which can be used instead (dcmdata/libsrc/dcdictzz.cc). For example, the
project files for the Windows platform use this file instead of the default
(empty) built-in data dictionary. Under Unix environments it should also
be possible to selectively use a built-in data dictionary for specific
applications by including dcdictzz.o earlier in the link path than
libdcmdata.a (if your linker allows this).
I m using this following code :-
DicomImage *dcmImage = new DicomImage(dcmFile);
if (dcmImage != NULL)
{
if (dcmImage->getStatus() == EIS_Normal)//It fails here says no data dictionary
{
if (dcmImage->isMonochrome())
{
dcmImage->setMinMaxWindow();
Uint8 *pixelData = (Uint8 *)(dcmImage->getOutputData(8 /* bits */));
if (pixelData != NULL)
{
bool ret = dcmImage->writeBMP(bmpFile);
if (ret) {
std::cout << "Succesfully written bmp file\n";
}else {
std::cout << "Error in writting\n";
}
}
}
} else
cerr << "Error: cannot load DICOM image (" << DicomImage::getString(dcmImage->getStatus()) << ")" << endl;
}
Please help me how to load data dictionary on iOS while application is launched.
We need DICOM team help!!!!!!!!!
Thanks for your reply but it didnot help me.. Since morning i was posting on forum but not getting any worth solution for my problem repasting here my problem. Please help me if u have a solution for it.
I have compiled DCMTK library for iOS and I am trying to call DCMImage library calls for creating image files from dcm file.
While accessing DcmImage function DcmImage->getStatus() it returns E_NOdata dictionary found.
After going through datadic.txt file I am not getting what exactly to do for buil in data dictionary file.
1)My question is I am launching my application on iOS device and while using DICOMImage class it gives me error like E: cant load data dictionary.
Please let me know in easy steps how to load dicom.dic file
2) I am not getting when and how dicom.dic files get loaded and I dont know the reason also why it is not getting loaded on iOS device.
3)I have used DCMDICTPATH env variable too but it didn't work.
After reading datadic.txt file ....
I have not understood what changes to done in mkdictbi file and what changes to do in makefile.in for using built in data dictionary
I have all the compiled libraries with me then why should i compile it again for libdcmdata. I am totally confused by the below lines.
referring to this below text in datadic.txt file :-
The default built-in data dictionary code (dcmdata/libsrc/dcdictbi.cc)
currently does nothing. The code for a useful built-in data dictionary can
be regenerated at any time by the mkdictbi program (dcmdata/libsrc/mkdictbi)
and the dcmdata library makefile (dcmdata/libsrc/Makefile.in) includes a
target (builtindict) for this purpose. The makefile also includes a target
(nobuiltindict) to reset back to an empty built-in data dictionary. By
making the built-in data dictionary, rebuilding the libdcmdata.a library
and relinking all your applications will ensure that the built-in data
dictionary is used.
Also included in the sources is a pre-created built-in data dictionary
which can be used instead (dcmdata/libsrc/dcdictzz.cc). For example, the
project files for the Windows platform use this file instead of the default
(empty) built-in data dictionary. Under Unix environments it should also
be possible to selectively use a built-in data dictionary for specific
applications by including dcdictzz.o earlier in the link path than
libdcmdata.a (if your linker allows this).
I m using this following code :-
DicomImage *dcmImage = new DicomImage(dcmFile);
if (dcmImage != NULL)
{
if (dcmImage->getStatus() == EIS_Normal)//It fails here says no data dictionary
{
if (dcmImage->isMonochrome())
{
dcmImage->setMinMaxWindow();
Uint8 *pixelData = (Uint8 *)(dcmImage->getOutputData(8 /* bits */));
if (pixelData != NULL)
{
bool ret = dcmImage->writeBMP(bmpFile);
if (ret) {
std::cout << "Succesfully written bmp file\n";
}else {
std::cout << "Error in writting\n";
}
}
}
} else
cerr << "Error: cannot load DICOM image (" << DicomImage::getString(dcmImage->getStatus()) << ")" << endl;
}
Please help me how to load data dictionary on iOS while application is launched.
We need DICOM team help!!!!!!!!!
-
- DCMTK Developer
- Posts: 2048
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Hi,
before I read further: What is exactly the status returned:
For a built-in dictionary:
In that case, did you _really_ use mkdictbi to generate the built-in dictionary, did you then _really_ re-compile dcmdata.lib and did you then _really_ re-link your application? If you also re-build dcmdump, for example, what is its output (before actually dumping the file)?
For an external (dicom.dic) dictionary:
Did you check whether the dicom.dic file was actually copied to your iOS device? Check whether it is in /usr/share/dcmtk/dicom.dic. (on the device!). If not, or not possible at all, set the DCMDICT environment variable to the location where dicom.dic is on the device, e.g. "/my/own/path/to/dicom.dic". Be sure that this is done BEFORE starting the application, and if possible (dont know how it works on iOS) check the variable yourself in the program code to make sure it points to the correct location.
Michael
before I read further: What is exactly the status returned:
does not exist. What is the exact error code? If it is actually EIS_NoDataDictionary then it really seems the dictionary is not loaded.E_NOdata dictionary
For a built-in dictionary:
In that case, did you _really_ use mkdictbi to generate the built-in dictionary, did you then _really_ re-compile dcmdata.lib and did you then _really_ re-link your application? If you also re-build dcmdump, for example, what is its output (before actually dumping the file)?
For an external (dicom.dic) dictionary:
Did you check whether the dicom.dic file was actually copied to your iOS device? Check whether it is in /usr/share/dcmtk/dicom.dic. (on the device!). If not, or not possible at all, set the DCMDICT environment variable to the location where dicom.dic is on the device, e.g. "/my/own/path/to/dicom.dic". Be sure that this is done BEFORE starting the application, and if possible (dont know how it works on iOS) check the variable yourself in the program code to make sure it points to the correct location.
Michael
Hi Michael,
Thanks for ur reply...
There is no way to copy or set environment variable on iPhone. iPhone does not support any dynamic loading.
Now my query is please give me steps how to use built in data dictionary. I have gone thru the datadic.txt file and I am not understanding its steps.. It would be great if u give me proper steps to use the built in data dictionary concept.
Thanks.
Thanks for ur reply...
There is no way to copy or set environment variable on iPhone. iPhone does not support any dynamic loading.
Now my query is please give me steps how to use built in data dictionary. I have gone thru the datadic.txt file and I am not understanding its steps.. It would be great if u give me proper steps to use the built in data dictionary concept.
Thanks.
Re: Running dcmtk application on iPhone
Hi,anjumsk29 wrote:Hi,
I have compiled DCMTK library for iOS and I am trying to call DCMImage library calls for creating image files from dcm file.
While accessing DcmImage function DcmImage->getStatus() it returns E_NOdata dictionary found.
Please let me know how to load data dictionary on iPhone device.
Thanks in advance
Even i have compiled the Dcmtk.xcodeproj and it compiled fine, but i am not able to understand how i could integrate these Dcmtk libraries in my existing iphone project. Can anyone help me on this.
Regards
Nitin
-
- DCMTK Developer
- Posts: 2048
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 1 guest