[Insight-users] DICOM 3D Reader Attached. Problems in ImageFunction, RawImageIO
Reinhold Füreder
R.Fureder@exeter.ac.uk
Fri, 18 Oct 2002 14:18:20 +0100
This is a multi-part message in MIME format.
------=_NextPart_000_007C_01C276B1.35F87700
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Hi,
1) Attached is the patched DicomImageIO which is now able to read the most
basic 3D dicom files as before. That means the image must meet the following
requirements:
* either 8 or 16 bit per pixel (not 12)
* no RLE or JPEG compression
New is the check for:
* frames
* spacing between slices & slice thickness
* transfer syntax UID (littel vs big endian; compression)
It is not perfect but works!
--------
(Comment for the other points below: I use MSVC 6.0)
--------
2) ImageFunction (itkimagefunction.h):
May it be that there is one include missing? Because if I include #include
<itkImageBase.h> in my own file (probably before the include or usage of the
above class) the following error doesn't pop up:
d:\yann\cvs\insight\code\common\itkimagefunction.h(61) : error C2039:
'GetImageDimension' : is not a member of 'itk'
d:\yann\cvs\insight\code\common\itkimagefunction.h(181) : see
reference to class template instantiation
'itk::ImageFunction<TInputImage,TOutput,TCoordRep>' being compiled
... (and so on)
--------
3) RawImageIO (itkrawimageio.h):
If I want to use RawImageIO (#include <itkRamImageIO.h>) the link error
LNK2005 pops up. Now I use according to one mailinglist posting the compiler
flag /FORCE:MULTIPLE to turn them into warnings. Of course, I have to admit,
I use other libraries (e.g. wxWindows):
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: void __thiscall
std::basic_ifstream<char,struct std::char_traits<char> >::`vbase
destructor'(void)"
(??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined
in swRamImageIOIncludingFile.obj
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: void __thiscall
std::basic_ifstream<char,struct std::char_traits<char> >::open(char const
*,int)" (?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z)
already defined in swRamImageIOIncludingFile.
obj
... (and so on)
The solely use of DicomImageIO doesn't make any problems and the difference
in reference to the std::string staff is maybe just <string> vs. <string.h>?
RawImageIO.h:
#include <fstream>
#include "itkImageIOBase.h"
#include "itkIndex.h"
#include "itkImageRegion.h"
#include "itkPixelTraits.h"
#include "itkByteSwapper.h"
#include "itkVersion.h"
#include <string>
DicomImageIO.h:
#include "itkDicomImageIO.h"
#include "itkExceptionObject.h"
#include "itkByteSwapper.h"
#include <iostream>
#include <list>
#include <string.h>
#include <math.h>
Thanks,
Reinhold
------------------------------
University of Exeter
School of Engineering and Computer Science
Harrison Building
North Park Road
Exeter, EX4 4QF
UK
------=_NextPart_000_007C_01C276B1.35F87700
Content-Type: application/octet-stream;
name="swDicomImageIO.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="swDicomImageIO.zip"
UEsDBBQAAgAIAJZxUi2RtAF2uhMAAFJpAAASAAAAc3dEaWNvbUltYWdlSU8uY3Bw7T1rU9vIlt9T
lf/Q450KMji2ZMhcLsZMkUAm3ptACsNOTSUpl7DbdoMseSU5hpvh/vY9p7sldevlR5whsxWSwlar
H+d9Tp9+8PRJY7u9qZ+nT54+IeS97418e3JACOm4ARuNQ9Klowl1QztknkuekQs6YkHoi8dLz3Nu
WYgt33mDmUOxIfn54lV3yPAhmJ+wvjfpTOwR7ZzX+9Np7TP5Gau/td3RDEqhwaudHSw5sUPRHDoQ
35um2WxYZsPaJ9bugfniwPyHaPw/1A9g+AM+Fv3MxINVb5KfCRGIvPKm9z6H3+hXeU8xQq88N/D8
kM0mdXLsOIRXC4hPA+p/poM6Nu9SSjqX/4p7qYd3IfF8Mg7D6UGjMZ/P6yy8rXv+qPHm8t3bRlJx
HE7IEGoOaGgzJ6gLcODncswCEnjDcG77lMD3AdKRXc9COiC/dy7fnF9dkuOzP8jvxxcXx2eXf7TI
nIVjbxYS+pm6RHYTjqHxZOowaAU9+bYb3hNvSN6dXrx6A82OX3bedi7/QGBfdy7PTrtd8vr8ghyT
98cXl51XV2+PL6Ku3l9dvD/vntYFutixfe19pqQf0871QtanAUdo4iHYLn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