[Insight-users] Reading MHD/RAW problem
itkvtk123 at gmx.net
itkvtk123 at gmx.net
Wed Sep 16 10:47:19 EDT 2009
I'm using Visual Studio 2008 (Version 9.0) Professional Edition with ITK 3.14 on Windows XP SP3.
Again my entire code:
#include <fstream>
#include "itkImageFileReader.h"
#include "itkImageFileWriter.h"
#include "itkImage.h"
int main()
{
// ATTENTION THIS IS THE PIXEL TYPE FOR
// THE RESULTING IMAGE
typedef unsigned short PixelType;
typedef itk::Image<PixelType, 3> myImage;
itk::ImageFileReader<myImage>::Pointer reader = itk::ImageFileReader<myImage>::New();
reader->SetFileName("C:/LungConeBeam.mhd");
try
{
reader->Update();
}
catch (itk::ExceptionObject & e)
{
std::cerr << "exception in file reader " << std::endl;
std::cerr << e << std::endl;
}
myImage::Pointer image = reader->GetOutput();
image->Print(std::cout );
myImage::RegionType region = image->GetLargestPossibleRegion();
std::cout << "region " << region;
system("pause");
return EXIT_SUCCESS;
}
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
More information about the Insight-users
mailing list