<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000099">
Thanks Bill and Niels,<br>
<br>
I ran itkGDCMImageIOTest in debugging mode (after hard coding in some
file names) and it runs fine! I can step into ITK code and see the
file names being saved. Both ITK and my software are compiled using
the _MBCS option (multi-byte character strings), so I don't think it's
a problem with multi-byte characters, although am still looking at this.<br>
<br>
Does ITK support Unicode or MBCS? I don't know.<br>
<br>
So, as of now, I'm stumped. <br>
<br>
Regards,<br>
Charlie<br>
<br>
Bill Lorensen wrote:
<blockquote
cite="mid:4db4735c0805051007y5c574354l207d1e911b828035@mail.gmail.com"
type="cite">
<pre wrap="">Charles,
Do the tests in Insight/Testing/Code/IO run OK?
We don't have any VS 9.0 platforms in our testing suite unfortunately.
Bill
On Mon, May 5, 2008 at 12:37 PM, Charles Knox <a class="moz-txt-link-rfc2396E" href="mailto:knoxcharles@qwest.net"><knoxcharles@qwest.net></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">The function ReadDICOMImage() gets called to test for/read a DICOM image
file.
It has worked consistently for me through ITK versions 1.x through 3.4 when
compiled
with MS Visual C++ 6.0. But now, when compiling with MS Visual Studio v9.0
for
x86 and under Windows Vista, the debugger traps an access violation from the
destructor ~ImageSource() (located in file itkImageSource.h).
-----------------------------------------------------------------------------------
BOOL CImageData::ReadDICOMImage( CString &csFileName, IMAGEPARAMS &iParam )
{
// First check for a DICOM file.
itk::GDCMImageIO::Pointer gdcmIO = itk::GDCMImageIO::New();
// This works but commented out to get to 'reader'
//if (!gdcmIO->CanReadFile((LPCTSTR)csFileName)
// return FALSE;
typedef signed short PixelType;
// Set dimensions to 3 to have reader return z-value
const UINT Dimension = 3;
typedef itk::Image< PixelType, Dimension > ImageType;
typedef itk::ImageFileReader< ImageType > ReaderType;
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName( (LPCTSTR)csFileName);
reader->SetImageIO( gdcmIO );
// Return prematurely to invoke 'reader' destructor
// when going out of scope.
return FALSE;
try {
reader->Update();
} catch (std::exception &err) {
string msg = err.what();
AfxMessageBox(msg.c_str());
return FALSE;
}
...
---------------------------------------------------------------------------
Debugger stops at the destructor ~ImageSource()
...
* SmartPointer to a DataObject. If a subclass of ImageSource has
* multiple outputs of different types, then that class must provide
* an implementation of MakeOutput(). */
virtual DataObjectPointer MakeOutput(unsigned int idx);
protected:
ImageSource();
virtual ~ImageSource() {} <- Debugger stops here
/** A version of GenerateData() specific for image processing
* filters. This implementation will split the processing across
* multiple threads. The buffer is allocated by this method. Then
...
_______________________________________________
Insight-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Insight-users@itk.org">Insight-users@itk.org</a>
<a class="moz-txt-link-freetext" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a>
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
</body>
</html>