<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.34">
<TITLE>RE: [Insight-users] large image matrix</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Hi Torsten,<BR>
<BR>
You want to allocate 24 GB of memory, so your computer should have at least that amount of memory. And you need to go to 64 bit systems.<BR>
<BR>
You are able to allocate 2^14 images, since that amounts to 1.5 GB.<BR>
<BR>
So, it is not so much a matter of "how to do this in ITK", but to upgrade your computer.<BR>
<BR>
Alternatively, you may want to consider processing your images piece by piece, i.e. use streaming. You might want to take a look at the itk::StreamingImageFilter.<BR>
<BR>
Regards,<BR>
<BR>
Marius<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: insight-users-bounces@itk.org on behalf of Thorsten W.<BR>
Sent: Mon 10/6/2008 10:57 PM<BR>
To: insight-users@itk.org<BR>
Subject: [Insight-users] large image matrix<BR>
<BR>
Hello ITK-Users,<BR>
<BR>
i'm new on ITK and my english skills are not the best ;)<BR>
<BR>
Within the scope of a research projekt, i have to work with very large<BR>
dicom images, or that is to say 2^16 * 2^16 * 24bit.<BR>
<BR>
I want to create a picture with the above-mentioned resolution with itk<BR>
and write it to disk.<BR>
<BR>
But the highest resolution without allokation errors is under<BR>
Windows ~ 2^14 * 2^14 and under Linux ~ 20000*20000...<BR>
<BR>
My computer has 2 gigabyte ram. Windows XP and Ubuntu Hardy Heron are<BR>
both 32bit.<BR>
<BR>
Can someone help me to create a image with the resolution 2^16 * 2^16 *<BR>
24bit?<BR>
<BR>
Sincerly,<BR>
Thorsten from germany :)<BR>
<BR>
#include "itkImage.h"<BR>
#include "itkImageFileWriter.h"<BR>
#include "itkGDCMImageIO.h"<BR>
#include "itkRGBPixel.h"<BR>
#include <iostream><BR>
<BR>
int main()<BR>
<BR>
{<BR>
<BR>
typedef itk::RGBPixel<unsigned char> PixelType;<BR>
typedef itk::Image< PixelType, 2 > ImageType;<BR>
typedef itk::ImageFileWriter<ImageType> WriterType;<BR>
typedef itk::GDCMImageIO ImageType2;<BR>
<BR>
ImageType::Pointer image = ImageType::New();<BR>
WriterType::Pointer writer = WriterType::New();<BR>
ImageType2::Pointer dicomio = ImageType2::New();<BR>
ImageType::IndexType start;<BR>
<BR>
start[0] = 0;<BR>
start[1] = 0;<BR>
<BR>
ImageType::SizeType size;<BR>
<BR>
size[0] = 20000;<BR>
size[1] = 20000;<BR>
<BR>
ImageType::RegionType region;<BR>
region.SetSize(size);<BR>
region.SetIndex(start);<BR>
<BR>
image->SetRegions(region);<BR>
<BR>
try<BR>
{<BR>
image->Allocate();<BR>
}<BR>
<BR>
catch (itk::ExceptionObject &excp)<BR>
{<BR>
std::cerr << "Exception thrown while 0" << std::endl;<BR>
std::cerr << excp << std::endl;<BR>
}<BR>
<BR>
ImageType::SpacingType spacing;<BR>
spacing[0] = 1;<BR>
spacing[1] = 1;<BR>
image->SetSpacing(spacing);<BR>
<BR>
ImageType::PointType origin;<BR>
origin[0] = 0;<BR>
origin[1] = 0;<BR>
image->SetOrigin(origin);<BR>
<BR>
writer->SetFileName("/home/thorsten/bla.dcm");<BR>
writer->SetInput(image);<BR>
writer->SetImageIO(dicomio);<BR>
<BR>
try<BR>
{<BR>
writer->Update();<BR>
}<BR>
catch (itk::ExceptionObject &excp)<BR>
{<BR>
std::cerr << "Exception thrown while 0" << std::endl;<BR>
std::cerr << excp << std::endl;<BR>
}<BR>
return 0;<BR>
}<BR>
<BR>
_______________________________________________<BR>
Insight-users mailing list<BR>
Insight-users@itk.org<BR>
<A HREF="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</A><BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>