<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Right, that is the one I followed, the only thing unusual that I am
is compiling the code as a managed C++ (Common Language Runtime), is
that a problem with ITK?????<br>
<br>
<br>
<div class="moz-cite-prefix">On 1/3/2015 9:35 AM, Bradley Lowekamp
wrote:<br>
</div>
<blockquote
cite="mid:1E1D7D9E-5E16-4B5D-80F3-5C33ACC17156@mail.nih.gov"
type="cite">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<div>Hello,</div>
<div><br>
</div>
<div>You need to set everything for the inageio to know it. The
is a complicated example but hopefully it'll be helpful. </div>
<div><br>
</div>
<div><a moz-do-not-send="true"
href="http://itk.org/Insight/Doxygen/html/Examples_2IO_2VisibleHumanStreamReadWrite_8cxx-example.html">http://itk.org/Insight/Doxygen/html/Examples_2IO_2VisibleHumanStreamReadWrite_8cxx-example.html</a></div>
<div><br>
</div>
<div>I generally recommend writing a metadata mhd header file. </div>
<div><br>
</div>
<div><a moz-do-not-send="true"
href="http://www.itk.org/Wiki/MetaIO/Documentation#Reading_a_Brick-of-Bytes_.28an_N-Dimensional_volume_in_a_single_file.29">http://www.itk.org/Wiki/MetaIO/Documentation#Reading_a_Brick-of-Bytes_.28an_N-Dimensional_volume_in_a_single_file.29</a></div>
<div><br>
</div>
<div>Brad</div>
<div><br>
<br>
</div>
<div><br>
On Jan 3, 2015, at 7:33 AM, Ronn Kling <<a
moz-do-not-send="true" href="mailto:ronn@rlkling.com">ronn@rlkling.com</a>>
wrote:<br>
<br>
</div>
<blockquote type="cite">
<div>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8">
Does anyone have a clue on how to fix this?<br>
<br>
<div class="moz-cite-prefix">On 12/24/2014 2:26 PM, Ronn Kling
wrote:<br>
</div>
<blockquote cite="mid:549B1352.8090207@rlkling.com"
type="cite"> I am using ITK 4.6.1, VS2010 and windows 7 64
bit. It gives this error on the last line in the try box<br>
<br>
<mime-attachment.png><br>
<br>
#include <stdlib.h><br>
#include <string.h><br>
#include <stdio.h><br>
#include <iostream><br>
#include <fstream><br>
#include <afxwinforms.h><br>
<br>
#include "itkRawImageIO.h"<br>
#include "itkImageFileReader.h"<br>
#include "itkImageFileWriter.h"<br>
<br>
#using <mscorlib.dll><br>
<br>
using namespace System;<br>
using namespace System::IO;<br>
using namespace System::Windows::Forms;<br>
using namespace System::Drawing;<br>
using namespace System::Collections;<br>
using namespace System::Runtime::InteropServices;<br>
<br>
<br>
int main()<br>
<br>
{<br>
<br>
<br>
try {<br>
typedef unsigned char fixedPixelType;<br>
typedef unsigned char movingPixelType;<br>
<br>
typedef itk::Image<fixedPixelType, 3>
fixedImageType;<br>
typedef itk::Image<movingPixelType, 3>
movingImageType;<br>
// create a ImageIO for the raw data files<br>
typedef itk::RawImageIO<fixedPixelType, 2>
ImageIOType;<br>
ImageIOType::Pointer fixedimageio =
ImageIOType::New();<br>
<br>
<br>
<br>
} catch(itk::ExceptionObject & err)<br>
<br>
{std::cerr << "itkWrapper caught an ITK
exception:\n";<br>
err.Print(std::cerr);<br>
}<br>
}<br>
<div class="moz-cite-prefix">On 12/24/2014 2:07 PM, Bill
Lorensen wrote:<br>
</div>
<blockquote
cite="mid:CADZJ4hMTAd-nFkd9FPb_uqXVXhX1XMBOxNj8m-YbKfhZsv6hEg@mail.gmail.com"
type="cite">
<pre wrap="">Please provide a small, complete compilable example and I'm sure we can help.
On Wed, Dec 24, 2014 at 1:14 PM, Ronn Kling <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:ronn@rlkling.com"><ronn@rlkling.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hello All,
I am trying to read in a binary data file using RawImageIO. When I step
through with the debugger I get an error on the last line below about memory
corruption. As far as I can tell I have everything correct, what am I
missing?
typedef unsigned char fixedPixelType;
typedef unsigned char movingPixelType;
typedef itk::Image<fixedPixelType, 3> fixedImageType;
typedef itk::Image<movingPixelType, 3> movingImageType;
// create a ImageIO for the raw data files
typedef itk::RawImageIO<fixedPixelType, 2> ImageIOType;
ImageIOType::Pointer fixedimageio = ImageIOType::New();
_______________________________________________
Community mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Community@itk.org">Community@itk.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://public.kitware.com/mailman/listinfo/community">http://public.kitware.com/mailman/listinfo/community</a>
</pre>
</blockquote>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Community mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Community@itk.org">Community@itk.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://public.kitware.com/mailman/listinfo/community">http://public.kitware.com/mailman/listinfo/community</a>
</pre>
</blockquote>
<br>
</div>
</blockquote>
<blockquote type="cite">
<div><span>_______________________________________________</span><br>
<span>Community mailing list</span><br>
<span><a moz-do-not-send="true"
href="mailto:Community@itk.org">Community@itk.org</a></span><br>
<span><a moz-do-not-send="true"
href="http://public.kitware.com/mailman/listinfo/community">http://public.kitware.com/mailman/listinfo/community</a></span><br>
</div>
</blockquote>
</blockquote>
<br>
</body>
</html>