#ifndef __bbUtilitiesGreyLevel_h_INCLUDED__ #define __bbUtilitiesGreyLevel_h_INCLUDED__ #include "bbtkAtomicBlackBox.h" #include "iostream" #include "vtkMetaImageReader.h" #include "vtkImageData.h" namespace bbUtilities { class /*BBTK_EXPORT*/ GreyLevel : public bbtk::AtomicBlackBox { // BBTK_USER_BLACK_BOX_INTERFACE(GreyLevel,bbtk::AtomicBlackBox); BBTK_BLACK_BOX_INTERFACE(GreyLevel,bbtk::AtomicBlackBox); //================================================================== BBTK_DECLARE_INPUT(In,double); BBTK_DECLARE_INPUT(DSDirectoy,std::string); BBTK_DECLARE_INPUT(FileNameManualPoints,std::string); BBTK_DECLARE_OUTPUT(Out,double); BBTK_PROCESS(Process); void Process(); std::string getNumber(int num); void getPoint(std::string fileName, double* x, double* y, double* z); private: vtkImageData* img; vtkMetaImageReader* mir; }; BBTK_BEGIN_DESCRIBE_BLACK_BOX(GreyLevel,bbtk::AtomicBlackBox); BBTK_NAME("GreyLevel"); BBTK_AUTHOR("car-prie@uniandes.edu.co"); BBTK_DESCRIPTION("Reads the level of grey in an image given a point in a predefined directoy structure (see CAT08 directoy structure, image and file with X,Y,Z coordinates)"); BBTK_CATEGORY("__CATEGORY__"); BBTK_INPUT(GreyLevel,DSDirectoy,"Directoy that contains the directory structre DatasetXX/imageXX.mhd and DatasetXX/vesselN",std::string,""); BBTK_INPUT(GreyLevel,FileNameManualPoints,"File name of points in the directoy DatasetXX/vesselN/FILENAME.txt",std::string,""); BBTK_OUTPUT(GreyLevel,Out,"First output",double,""); BBTK_END_DESCRIBE_BLACK_BOX(GreyLevel); } // EO namespace bbUtilities #endif // __bbUtilitiesGreyLevel_h_INCLUDED__