DCMTK_ENABLE_CHARSET_CONVERSION can not be enabled - c++

i'm trying to build dcmtk-3.6.6 using Cmake Gui https://github.com/DCMTK/dcmtk to convert a dcm file to Json, i faced the same problem in this link https://forum.dcmtk.org/viewtopic.php?t=4769 i can't enable the option DCMTK_ENABLE_CHARSET_CONVERSION in my cmake Gui (as you can see in the image, only disabled is show ) , i tried to build it with both DCMTK_WITH_CONV and DCMTK_WITH_ICU to be able to use convertToUTF8() but it seems that does not work
we can see in the second image that DCMTK_ENABLE_CHARSET_CONVERSION Is not defined
Could someone help me ? thanks
EDIT : my cmakeGui log show that he didn't find ICU, so probably the problem are coming from me, how can i install ICU ?

Related

Get .stl format 3D mesh from Binary Mask (Segmentation)

I am currently able to get mesh files of these formats however I would like to save the mesh file as .stl. I found documentation about this STL MeshIO Class, however, I can't seem to find the header to "include".
Additionally, if I follow from this, it still asks me to enter proper file extension, as in it doesn't work when I give .stl extension.
Any help or work around?
P.S. ITK-4.11.0, VS 13 Update 5, CMake - 3.8.0.
Let me know if you need the code, I don't see a requirement here.
Just adding the procedure here for someone who might be interested.
Get git executable.
In CMake go to advanced and add the path to the git executable
In Modules, add Module_IOSTL
Configure and Generate.
Build the ITK.sln file. (If using VS)
Configure and Generate your project.
Add #include "itkSTLMeshIOFactory.h"
Add itk::STLMeshIOFactory::RegisterOneFactory(); before you initialize the MeshType.
Give file extension for MeshFileWriter as .stl, and voila!
IOSTL is a remote module. When configuring ITK with CMake, you need to enable Module_IOSTL in group Module. Rebuild ITK, rebuild your program, and now you should be able to read and write .stl just the same as .vtk, .off etc. Hopefully, without any code changes.

dlib Displaying values on the screen

I encountered a strange error- whenever I'm including #include <dlib/gui_widgets.h>
to my projects and declaring a variable (for example dlib::image_window win) following errors appear:
'DLIB_NO_GUI_SUPPORT is defined so you can't use the GUI code. Turn DLIB_NO_GUI_SUPPORT off if you want to use it.' and 'Also make sure you have libx11-dev installed on your system' (from guy_core_kernel_2.h). I was searching and found some suggestions that the cmake of dlib could fail- but I really doubt so, I'm already doing a detection of landmarks.
The reason why I'm trying to include and declare one of the widgets is displaying values on the screen (there is no equivalent of opencv putText(), is there?.
I would be very grateful for any help. :)
At the end I decided to use covertion from dlib::array2d to cv::Matrix (dlib::toMat(dlib::array2d) function) and use cv::putText() (as mentioned previousely). It turned out the Xcode didn't properly linked libraries from openCV- helpful were the following links: How can I create OpenCV framework?
and
http://blogs.wcode.org/2014/11/howto-setup-xcode-6-1-to-work-with-opencv-libraries/
Also if someone can't find Frameworks in Library:
https://discussions.apple.com/thread/4195808?tstart=0

error using miniDFSCluster on windows

I'm trying to write unit tests using miniDFSCluster and it's throwing the error below
java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z
any pointers to resolve this issue?
With errors like this, I use three steps
Find out what it is looking for
In this case, *org.apache.hadoop.io.nativeio.NativeIO$Windows.access0*
Find out what jar/lib it is in.
I don't use the Windows version, but I believe it is in hadoop.dll -
you'll have to check this.
Find out where I'm telling it to use that jar/lib
Update: See also this Answer.
I was able to resolve this error by following these steps:
Download hadoop.dll and winutils.exe in the same version that I'm using in the sbt/maven configuration, you can find these files in all versions of hadoop here: link
Put these 2 files in your %hadoop directory%\bin folder
make sure that %hadoop directory%\bin is listed under PATH in your device's environmental path(if using windows)
then the code should work just fine.

How can I make LLVM display graphs in a different viewer?

LLVM can create graphs in Graphviz's "dot" format, and automatically invoke a viewer to display them. By default it uses dotty to display those graphs. I know that I can change it to use a different viewer, but I was not able to find precise instructions on how to do so.
How can I make it open the graphs with a different viewer?
I'm running on Linux but would be interested in an answer for Windows as well.
I found out I'm supposed to change the CMakeCache.txt file in my build folder. For instance, to use XDot instead of dotty, I edited the LLVM_PATH_XDOT_P property in that file to point to the full path of my xdot.py file.
It now opens the alternative viewer successfully, after rebuilding the project.
I just needed to do this.
I managed to do this with a workaround: made a backup of dotty (just in case) and created a link from dotty to XDot.
cp /usr/bin/dotty /usr/bin/dotty_copy
ln -s /usr/bin/dotty /usr/bin/xdot
I believe you could also set some variable during configuration step (possibly LLVM_PATH_DOTTY), but I never tried this as I didn't want to recompile LLVM.
You may try hacking the DisplayGraph function or fidging with the makefiles until you manage to enable one of the #ifdefs in DisplayGraph.

The Xcode4.2 with ASIHTTPRequest configuration

I installed ASIHTTPRequest follow the document on their official site . But still have errors here. Please help. The related info is as follows :
Xcode 4.2 build 4D58
Lion 10.7.2
I can not upload the images because I am rookie here.(now I upload to site and linked here)
http://roundmov.com/project.png
build settings and build phrase png is here :
http://www.roundmov.com/buildphases.png
I have added all the files including external dir. and added libraries ,all of them in docs mentioned.
Even added the header search paths as $[SDKROOT]/usr/include/libxml2
But still have 107 or 67 errors . This problem has boring me one more day.
Thanks a lot in advance!
How can I disable ARC for a single file in a project?
If you follow the instructions here for all of the ASIHTTPRequest files it will compile as you need to disable arc on those files.
ah right, yep, so ASIHTTPRequest isn't ARC compatible and it doesn't look like that will change. i've never actually "downgraded" a project from ARC to non-ARC, but if it's something you've just started on you could create a new project and uncheck the ARC checkbox when you do and re-add all your existing files. this will mean you need to handle the memory management of objects (retain/release/autorelease).
this thread has more info:
https://groups.google.com/group/asihttprequest/browse_thread/thread/3f26e442dc6868e8
as an alternative, you could look into AFNetworking:
https://github.com/AFNetworking/AFNetworking
you still need to take some extra steps to get it working with ARC, but it doesn't look too bad.