[Insight-users] Reading a Tiff image series
Camilo Melani
camilomelani at gmail.com
Thu May 4 04:30:41 EDT 2006
*Hi, I'm trying to read a series of TIFF images captured with a
confocal microscope, but ITK give me this error message.
Error Message:
*
------------------------------------------------------------------
TIFFReadDirectory: Warning,
e:/Documentos/Universidad/Data/ch0/t01_001.tif: unknown field with tag
33923 (0x8483) encountered.
------------------------------------------------------------------
*I send also a link to the images I'm trying to read.
http://us.f13.yahoofs.com/bc/4415f191ma8e3b5a7/bc/Imagenes/images.zip?bf8ybWEBPx7Z_y9k
*
------------------------------------------------------------------
Print of the reader:
NumericSeriesFileNames (01729180)
RTTI typeinfo: class itk::NumericSeriesFileNames
Reference Count: 2
Modified Time: 13
Debug: Off
Observers:
none
StartIndex: 0
EndIndex: 1
IncrementIndex: 1
SeriesFormat: e:/Documentos/Universidad/Data/ch0/t01_%03d.tif
Filenames[0]: e:/Documentos/Universidad/Data/ch0/t01_000.tif
Filenames[1]: e:/Documentos/Universidad/Data/ch0/t01_001.tif
------------------------------------------------------------------
*
The code I use to read the volumen is: *
------------------------------------------------------------------
const unsigned char Dimension = 3;
typedef unsigned char PixelType;
typedef itk::Image< PixelType, Dimension > ImageType;
ImageType::Pointer LoadImage( const char * fileNameFormat, int first,
int last )
{
typedef itk::ImageSeriesReader< ImageType > ReaderType;
ReaderType::Pointer reader;
ImageType::Pointer image;
reader = ReaderType::New();
reader->SetImageIO(itk::TIFFImageIO::New());
reader->SetFileName(fileNameFormat);
typedef itk::NumericSeriesFileNames NameGeneratorType;
NameGeneratorType::Pointer nameGenerator = NameGeneratorType::New();
nameGenerator->SetSeriesFormat( fileNameFormat );
nameGenerator->SetStartIndex( first );
nameGenerator->SetEndIndex( last );
nameGenerator->SetIncrementIndex( 1 );
reader->SetFileNames( nameGenerator->GetFileNames() );
std::cout << nameGenerator << std::endl;
try
{
reader->Update(); }
catch( itk::ExceptionObject &e )
{
std::cout<<e<<std::endl;
}
image = reader->GetOutput();
return image;
}
------------------------------------------------------------------
*And if I use the itkLSMImageIO object and the file has .lsm extension I
get the folowing message: *
------------------------------------------------------------------
TIFFFieldWithTag: Internal error, unknown tag 0x866c.
Assertion failed: fip != NULL, file
E:\lenguajes\Insight\Utilities\tiff\tif_dirinfo.c, line 468
abnormal program termination
------------------------------------------------------------------
*if the file has .tif extension the error is:
*
------------------------------------------------------------------
itk::ExceptionObject (0117FBE0)
Location: "unknown"
File: E:\lenguajes\Insight\Code\IO\itkTIFFImageIO.cxx
Line: 1092
Description: itk::ERROR: LSMImageIO(017290B0): Cannot open the file!
------------------------------------------------------------------
*Does anyone know how to read this image format or if I'm missing
something?
Thanks.
Camilo.
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20060504/4244223b/attachment.htm
More information about the Insight-users
mailing list