[ITK] Reading in a 3d tiff stack?

Matt McCormick matt.mccormick at kitware.com
Fri Jan 9 14:06:52 EST 2015


Hi Ronn,

Have you tried creating a SmartPointer to hold the TIFFImageIO instance? i.e.,

  itk::ImageIOBase::Pointer imageIO = itk::TIFFImageIO::New();
  fixedReader->SetImageIO( imageIO );

Thanks,
Matt

On Fri, Jan 9, 2015 at 1:09 PM, Ronn Kling <ronn at rlkling.com> wrote:
> All,
> I have a set of stacked tiff images that I am trying to read in, but I am
> getting an error on this last line
>
>           typedef unsigned char fixedPixelType;
>           typedef unsigned char movingPixelType;
>
>           typedef itk::Image<fixedPixelType, 3>     fixedImageType;
>           typedef itk::Image<movingPixelType, 3>     movingImageType;
>
>
>   typedef itk::ImageSeriesReader< fixedImageType  > FixedImageReaderType;
>   FixedImageReaderType::Pointer  fixedReader  = FixedImageReaderType::New();
>
>   fixedReader->SetImageIO(itk::TIFFImageIO::New());
>
>
> I am getting an "unhandled exception" in itkTIFFimageIO.cxx at the bottom
> line
>
> TIFFImageIO::TIFFImageIO()
> {
>   this->SetNumberOfDimensions(2);
>   m_PixelType = SCALAR;
>   m_ComponentType = UCHAR;
>
>   this->InitializeColors();
>   m_InternalImage = new TIFFReaderInternal;
>
>   m_Spacing[0] = 1.0;
>   m_Spacing[1] = 1.0;
>
>   m_Origin[0] = 0.0;
>
> WHY??????
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
>


More information about the Community mailing list