#include <bbitkImageSeriesReader.h>
Private Member Functions | |
BBTK_BLACK_BOX_INTERFACE (ImageSeriesReader, bbtk::AtomicBlackBox) | |
BBTK_DECLARE_INPUT (FileNames, std::vector< std::string >) | |
BBTK_DECLARE_OUTPUT (Out, anyImagePointer) | |
BBTK_PROCESS (Read) | |
void | Read () |
template<class T> | |
void | Read () |
Definition at line 53 of file bbitkImageSeriesReader.h.
bbitk::ImageSeriesReader::BBTK_BLACK_BOX_INTERFACE | ( | ImageSeriesReader | , | |
bbtk::AtomicBlackBox | ||||
) | [private] |
bbitk::ImageSeriesReader::BBTK_DECLARE_INPUT | ( | FileNames | , | |
std::vector< std::string > | ||||
) | [private] |
bbitk::ImageSeriesReader::BBTK_DECLARE_OUTPUT | ( | Out | , | |
anyImagePointer | ||||
) | [private] |
bbitk::ImageSeriesReader::BBTK_PROCESS | ( | Read | ) | [private] |
void bbitk::ImageSeriesReader::Read | ( | ) | [inline, private] |
Template Processing
Definition at line 47 of file bbitkImageSeriesReader.cxx.
References BBTK_TEMPLATE_ITK_IMAGE_SWITCH, and bbitk::GetITKImagePtrTypeInfoFromPixelTypeInfoAndDimension().
00048 { 00049 const std::vector<std::string>& filenames = bbGetInputFileNames(); 00050 if (!filenames.size()) 00051 { 00052 typedef Image_uint8_t_2_ptr itype; 00053 Image_uint8_t_2::Pointer p = Image_uint8_t_2::New(); 00054 Image_uint8_t_2::IndexType i; 00055 i.Fill(0); 00056 Image_uint8_t_2::SizeType s; 00057 s.Fill(1); 00058 Image_uint8_t_2::RegionType r(i,s); 00059 p->SetRegions(r); 00060 p->Allocate(); 00061 p->Register(); 00062 bbSetOutputOut(p.GetPointer()); 00063 return; 00064 //bbtkError("Void vector passed to "<<bbGetFullName()); 00065 } 00066 00067 std::string filename = filenames[0]; 00068 00069 itk::ImageIOBase::Pointer genericReader = 00070 itk::ImageIOFactory::CreateImageIO(filename.c_str(), 00071 itk::ImageIOFactory::ReadMode); 00072 if (!genericReader) 00073 { 00074 bbtkError(bbGetFullName()<<" : File format unknown (while reading \"" << filename << "\")"); 00075 } 00076 genericReader->SetFileName(filename.c_str()); 00077 genericReader->ReadImageInformation(); 00078 00079 bbtk::TypeInfo typ = GetITKImagePtrTypeInfoFromPixelTypeInfoAndDimension(genericReader->GetComponentTypeInfo(), genericReader->GetNumberOfDimensions()); 00080 00081 BBTK_TEMPLATE_ITK_IMAGE_SWITCH(typ,Read); 00082 00083 }
void bbitk::ImageSeriesReader::Read | ( | ) | [inline, private] |