[Ctk-developers] mingw compiles dcmtk.git

Dean Inglis dean.inglis at camris.ca
Sat Oct 30 10:53:49 EDT 2010


getting closer!  As long as I set DCMTK_DIR:PATH to the root of an install
path for dcmtk (ie build dcmtk with "mingw32-make install") all the 
subsequent
CMakeCache entries are set up correctly.

However, the latest dcmtk I am using from offis's git repository no longer 
uses
"Patients" but uses "Patient" in the defined dcm tags in dcdeftag.h .

D:\Developer\Sources\CTK\Libs\DICOM\Core\ctkDICOMIndexer.cpp:168: error: 
'DCM_Pa
tientsName' was not declared in this scope
D:\Developer\Sources\CTK\Libs\DICOM\Core\ctkDICOMIndexer.cpp:193: error: 
'DCM_Pa
tientsBirthDate' was not declared in this scope
D:\Developer\Sources\CTK\Libs\DICOM\Core\ctkDICOMIndexer.cpp:194: error: 
'DCM_Pa
tientsBirthTime' was not declared in this scope
D:\Developer\Sources\CTK\Libs\DICOM\Core\ctkDICOMIndexer.cpp:195: error: 
'DCM_Pa
tientsSex' was not declared in this scope
D:\Developer\Sources\CTK\Libs\DICOM\Core\ctkDICOMIndexer.cpp:196: error: 
'DCM_Pa
tientsAge' was not declared in this scope
D:\Developer\Sources\CTK\Libs\DICOM\Core\ctkDICOMIndexer.cpp:204: error: 
'DCM_Pe
rformingPhysiciansName' was not declared in this scope
D:\Developer\Sources\CTK\Libs\DICOM\Core\ctkDICOMIndexer.cpp:205: error: 
'DCM_Re
ferringPhysiciansName' was not declared in this scope
mingw32-make[5]: *** 
[Libs/DICOM/Core/CMakeFiles/CTKDICOMCore.dir/ctkDICOMIndexe
r.cpp.obj] Error 1
mingw32-make[4]: *** [Libs/DICOM/Core/CMakeFiles/CTKDICOMCore.dir/all] Error 
2
mingw32-make[3]: *** [all] Error 2
mingw32-make[2]: *** [CMakeExternals/Stamp/CTK-build/CTK-build-build] Error 
2
mingw32-make[1]: *** [CMakeFiles/CTK-build.dir/all] Error 2
mingw32-make: *** [all] Error 2


I added the following to ctkDICOMIndexer ctkDICOMQuery and 
ctkDICOMIndexerBase

#ifndef DCM_PatientsName
  #ifdef DCM_PatientName
    #define DCM_PatientsName DCM_PatientName
  #endif
#endif

#ifndef DCM_PatientsBirthDate
  #ifdef DCM_PatientBirthDate
    #define DCM_PatientsBirthDate DCM_PatientBirthDate
  #endif
#endif

#ifndef DCM_PatientsBirthTime
  #ifdef DCM_PatientBirthTime
    #define DCM_PatientsBirthTime DCM_PatientBirthTime
  #endif
#endif

#ifndef DCM_PatientsAge
  #ifdef DCM_PatientAge
    #define DCM_PatientsAge DCM_PatientAge
  #endif
#endif

#ifndef DCM_PatientsSex
  #ifdef DCM_PatientSex
    #define DCM_PatientsSex DCM_PatientSex
  #endif
#endif

#ifndef DCM_PerformingPhysiciansName
  #ifdef DCM_PerformingPhysicianName
    #define DCM_PerformingPhysiciansName DCM_PerformingPhysicianName
  #endif
#endif

#ifndef DCM_ReferringPhysiciansName
  #ifdef DCM_ReferringPhysicianName
    #define DCM_ReferringPhysiciansName DCM_ReferringPhysicianName
  #endif
#endif


which then finally conks out with

D:\Developer\Sources\CTK\Libs\DICOM\Core\ctkDICOMQuery.cpp: In member 
function '
void ctkDICOMQuery::query(QSqlDatabase)':
D:\Developer\Sources\CTK\Libs\DICOM\Core\ctkDICOMQuery.cpp:333: error: no 
matchi
ng function for call to 'DcmSCU::closeAssociation(const OFCondition&)'
d:\Developer\Releases\MinGW\SHARED\dcmtkInstall\include/dcmtk/dcmnet/scu.h:272:
note: candidates are: virtual void 
DcmSCU::closeAssociation(DcmCloseAssociationT
ype)
mingw32-make[5]: *** 
[Libs/DICOM/Core/CMakeFiles/CTKDICOMCore.dir/ctkDICOMQuery.
cpp.obj] Error 1
mingw32-make[4]: *** [Libs/DICOM/Core/CMakeFiles/CTKDICOMCore.dir/all] Error 
2
mingw32-make[3]: *** [all] Error 2
mingw32-make[2]: *** [CMakeExternals/Stamp/CTK-build/CTK-build-build] Error 
2
mingw32-make[1]: *** [CMakeFiles/CTK-build.dir/all] Error 2
mingw32-make: *** [all] Error 2

which is due to dcmtk.git redefining the signature of closeAssociation:

/** Different types of closing an association
 */
enum DcmCloseAssociationType
{
  /// Release the current association
  DCMSCU_RELEASE_ASSOCIATION,
  /// Abort the current association
  DCMSCU_ABORT_ASSOCIATION,
  /// Peer requested release (Aborting)
  DCMSCU_PEER_REQUESTED_RELEASE,
  /// Peer aborted the association
  DCMSCU_PEER_ABORTED_ASSOCIATION
};

virtual void closeAssociation(const DcmCloseAssociationType closeType);

whereas there was in dcmtk 3.5.5

virtual void closeAssociation(const OFCondition& abortOrReleaseRequested);

So it appears that there are too many differences between dcmtk.git and that
used in ctk to make a go of getting DICOM working in CTK with MinGW.
Can the dcmtk repository currently associated with CTK be adapted for MinGW
until Offis dcmtk.git is aligned with ctk.git?

Dean


----- Original Message ----- 
From: "Sascha Zelzer" <s.zelzer at dkfz-heidelberg.de>
To: "Dean Inglis" <dean.inglis at camris.ca>
Cc: <ctk-developers at commontk.org>
Sent: Tuesday, October 26, 2010 1:51 AM
Subject: Re: [Ctk-developers] mingw compiles dcmtk.git


> Make sure to use the cmake cache in <CTK-build-dir>/CTK-build , not 
> <CTK-build-dir>, and to enable something in CTK which uses DCMTK.
>
> - Sascha
>
> On 10/26/2010 03:14 AM, Dean Inglis wrote:
>> Hi Sascha
>>
>> Ive installed CMake 2.8.2, specified the external build dir in the
>> cmakecache,
>> there are no DCMTK_ vars in the advanced section of my cache to set.
>> It's odd that I can set and external VTK_DIR and the vtk core gets built.
>>
>> Dean
>>
>>>   You might also want to try a recent CMake version (>  2.8.0). I think 
>>> the
>>> FindDCMTK.cmake file in those will automatically find the include
>>> directories.
>>>
>>> - Sascha
>>
>> ----- Original Message -----
>> From: "Sascha Zelzer"<s.zelzer at dkfz-heidelberg.de>
>> To: "Dean Inglis"<dean.inglis at camris.ca>
>> Cc:<ctk-developers at commontk.org>
>> Sent: Monday, October 25, 2010 12:14 PM
>> Subject: Re: [Ctk-developers] mingw compiles dcmtk.git
>>
>>
>>> Well, it seems that the restriction I mentioned in my previous post
>>> applies to DCMTK...
>>>
>>> There is no DCMTKConfig.cmake file in the build tree and the
>>> FindDCMTK.cmake file (shipped with CMake) is not able to find the 
>>> include
>>> dirs automatically. However, you should be able to set them manually. 
>>> Have
>>> a look at DCMTK_*_INCLUDE_DIR variables (probably advanced) and set them
>>> to the appropriate directories in DCMTKs source tree.
>>>
>>> - Sascha
>>>
>>> On 10/25/2010 05:21 PM, Dean Inglis wrote:
>>>> Hi Sascha,
>>>>
>>>> ctk cant find the include paths to the header files even though I have 
>>>> in
>>>> cache
>>>>
>>>> //No help, variable specified on the command line.
>>>> DCMTK_DIR:PATH=d:/Developer/Releases/MinGW/SHARED/dcmtk
>>>>
>>>> Dean
>>>>
>>>> Scanning dependencies of target CTKDICOMCore
>>>> [ 58%] Building CXX object
>>>> Libs/DICOM/Core/CMakeFiles/CTKDICOMCore.dir/ctkDICOM.
>>>> cpp.obj
>>>> [ 58%] Building CXX object
>>>> Libs/DICOM/Core/CMakeFiles/CTKDICOMCore.dir/ctkDICOMI
>>>> ndexer.cpp.obj
>>>> D:\Developer\Sources\CTK\Libs\DICOM\Core\ctkDICOMIndexer.cpp:40:36:
>>>> error:
>>>> dcmtk
>>>> /dcmdata/dcfilefo.h: No such file or directory
>>>> D:\Developer\Sources\CTK\Libs\DICOM\Core\ctkDICOMIndexer.cpp:42:36:
>>>> error:
>>>> dcmtk
>>>> /dcmdata/dcdeftag.h: No such file or directory
>>>> D:\Developer\Sources\CTK\Libs\DICOM\Core\ctkDICOMIndexer.cpp:43:36:
>>>> error:
>>>> dcmtk
>>>> /dcmdata/dcdatset.h: No such file or directory
>>>> D:\Developer\Sources\CTK\Libs\DICOM\Core\ctkDICOMIndexer.cpp:44:32:
>>>> error:
>>>> dcmtk
>>>> /ofstd/ofcond.h: No such file or directory
>>>> D:\Developer\Sources\CTK\Libs\DICOM\Core\ctkDICOMIndexer.cpp:45:34:
>>>> error:
>>>> dcmtk
>>>> /ofstd/ofstring.h: No such file or directory
>>>> D:\Developer\Sources\CTK\Libs\DICOM\Core\ctkDICOMIndexer.cpp:46:65:
>>>> error:
>>>> dcmtk
>>>> /ofstd/ofstd.h: No such file or directory
>>>> D:\Developer\Sources\CTK\Libs\DICOM\Core\ctkDICOMIndexer.cpp:47:72:
>>>> error:
>>>> dcmtk
>>>> /dcmdata/dcddirif.h: No such file or directory
>>>> D:\Developer\Sources\CTK\Libs\DICOM\Core\ctkDICOMIndexer.cpp: In member
>>>> function
>>>>    'void ctkDICOMIndexer::addDirectory(QSqlDatabase, const QString&, 
>>>> const
>>>> QString
>>>> &)':
>>>> D:\Developer\Sources\CTK\Libs\DICOM\Core\ctkDICOMIndexer.cpp:93: error:
>>>> 'OFList'
>>>>    was not declared in this scope
>>>> D:\Developer\Sources\CTK\Libs\DICOM\Core\ctkDICOMIndexer.cpp:93: error:
>>>> 'OFStrin
>>>> g' was not declared in this scope
>>>> D:\Developer\Sources\CTK\Libs\DICOM\Core\ctkDICOMIndexer.cpp:93: error:
>>>> 'origina
>>>> lDcmtkFileNames' was not declared in this scope
>>>> D:\Developer\Sources\CTK\Libs\DICOM\Core\ctkDICOMIndexer.cpp:94: error:
>>>> 'dcmtkFi
>>>> leNames' was not declared in this scope
>>>>
>>>> ----- Original Message -----
>>>> From: "Sascha Zelzer"<s.zelzer at dkfz-heidelberg.de>
>>>> To: "Dean Inglis"<dean.inglis at camris.ca>
>>>> Cc:<ctk-developers at commontk.org>
>>>> Sent: Monday, October 25, 2010 9:43 AM
>>>> Subject: Re: [Ctk-developers] mingw compiles dcmtk.git
>>>>
>>>>
>>>>
>>>>> Hi Dean,
>>>>>
>>>>> you can set DCMTK_DIR to an external DCMTK build tree. Either add the
>>>>> variable manually in the CMake GUI or start cmake in an empty build
>>>>> directory like:
>>>>>
>>>>> cmake -DDCMTK_DIR:PATH=/path/to/dcmtk/build/tree<CTK-source>
>>>>>
>>>>> That should work...
>>>>>
>>>>> - Sascha
>>>>>
>>>>> On 10/25/2010 03:15 PM, Dean Inglis wrote:
>>>>>
>>>>>> Ive been submitting an experimental mingw dashboard for a few weeks
>>>>>> now, and Id like to have it testing the dcmtk options, however, there
>>>>>> is
>>>>>> no
>>>>>> cmake cache option for using an external dcmtk (yet there is for 
>>>>>> vtk).
>>>>>> Can there either be an intermediate "re-alignment" or a cmake option
>>>>>> to use an external dcmtk with an appropriate "do so at your own 
>>>>>> risk!"
>>>>>> warning message?
>>>>>>
>>>>>> ----- Original Message -----
>>>>>> From: "OFFIS DICOM Team"<dicom at offis.de>
>>>>>> To:<ctk-developers at commontk.org>
>>>>>> Sent: Monday, October 25, 2010 8:49 AM
>>>>>> Subject: Re: [Ctk-developers] mingw compiles dcmtk.git
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Hi Dean,
>>>>>>>
>>>>>>> Am 25.10.2010 14:43, schrieb Dean Inglis:
>>>>>>>
>>>>>>>
>>>>>>>> can the latest OFFIS DCMTK git repository be adopted for CTK?
>>>>>>>>
>>>>>>>>
>>>>>>> No, vice versa: The goal is to finally align CTK's DCMTK repository
>>>>>>> with
>>>>>>> the
>>>>>>> official DCMTK repository from OFFIS so CTK is always based on the
>>>>>>> latest
>>>>>>> official DCMTK code available from OFFIS. Both are already very
>>>>>>> similar,
>>>>>>> however, that goal is not reached (yet! :-).
>>>>>>>
>>>>>>> Best regards,
>>>>>>> Michael Onken
>>>>>>>
>>>>>>> -- 
>>>>>>> OFFIS DICOM Team, Escherweg 2, 26121 Oldenburg, Germany
>>>>>>> E-Mail: dicom at offis.de, URL: http://dicom.offis.de
>>>>>>> _______________________________________________
>>>>>>> Ctk-developers mailing list
>>>>>>> Ctk-developers at commontk.org
>>>>>>> http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers
>>>>>>>
>>>>>>>
>>>>>> _______________________________________________
>>>>>> Ctk-developers mailing list
>>>>>> Ctk-developers at commontk.org
>>>>>> http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers
>>>>>>
>>>>>>
> 




More information about the Ctk-developers mailing list