namespace bbcreaImageIO
{
-
BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaImageIO,ReadImages)
BBTK_BLACK_BOX_IMPLEMENTATION(ReadImages,bbtk::AtomicBlackBox);
//=====
//=====
void ReadImages::Process()
{
-
// THE MAIN PROCESSING METHOD BODY
// Here we simply set the input 'In' value to the output 'Out'
// And print out the output value
// (the one provided in the attribute 'type' of the tag 'input')
// bbSetOutputOut( bbGetInputIn() );
// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
-
std::vector<vtkImageData*> mResults;
VectorMapInfoDicom mResultsDicomAtr;
creaImageIO::SimpleView mView;
-
if (bbGetInputActive()==true)
{
if( mView.readFile(bbGetInputLstNameImages() , bbGetInputDicomTags() , mResultsDicomAtr , mResults)==true )
bbSetOutputOut( NULL );
}//Active
}
-//=====
+
+//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
//=====
void ReadImages::bbUserSetDefaultValues()
{
-
// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
// Here we initialize the input 'In' to 0
bbSetInputActive(true);
-
}
-//=====
+
+//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
//=====
void ReadImages::bbUserInitializeProcessing()
{
-
// THE INITIALIZATION METHOD BODY :
// Here does nothing
// but this is where you should allocate the internal/output pointers
-// if any
-
-
+// if any
}
-//=====
+
+//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
//=====
void ReadImages::bbUserFinalizeProcessing()
{
-
// THE FINALIZATION METHOD BODY :
// Here does nothing
// but this is where you should desallocate the internal/output pointers
// if any
-
-}
}
-// EO namespace bbcreaImageIO
+
+}// EO namespace bbcreaImageIO
BBTK_INPUT(ReadImages,Active,"(default true) Active true/false",bool,"");
BBTK_INPUT(ReadImages,DicomTags,"Dicom Tags (vector of Dicom tags ex: D0028_0030 D0020_0037)",std::vector<std::string>,"");
- BBTK_INPUT(ReadImages,LstNameImages,"List path to images",std::vector<std::string>,"");
+ BBTK_INPUT(ReadImages,LstNameImages,"List path to images (png, tiff, jpeg, bmp, SLC, mhd, mha, nii.gz, nrrd)",std::vector<std::string>,"");
BBTK_OUTPUT(ReadImages,Out,"Output Image",vtkImageData*,"");
BBTK_OUTPUT(ReadImages,OutImages,"List of Output Image",std::vector<vtkImageData*>,"");
#include <vtkSLCReader.h>
#include <vtkMetaImageReader.h>
#include <vtkNIFTIImageReader.h>
+#include <vtkNrrdReader.h>
//#include <vtkGESignalReader.h>
Register(boost::shared_ptr<AbstractImageReader>(new VtkImageReader(vtkSLCReader::New())));
Register(boost::shared_ptr<AbstractImageReader>(new VtkImageReader(vtkMetaImageReader::New(),"MHD",".mhd")));
Register(boost::shared_ptr<AbstractImageReader>(new VtkImageReader(vtkNIFTIImageReader::New(),"NIF",".nii.gz")));
+ Register(boost::shared_ptr<AbstractImageReader>(new VtkImageReader(vtkNrrdReader::New(),"NRRD",".nrrd")));
// Register(new VtkImageReader(vtkGESignalReader::New()));
Register(boost::shared_ptr<AbstractImageReader>(new DicomImageReader));