18 #ifndef itkSCIFIOImageIO_h
19 #define itkSCIFIOImageIO_h
21 #include "SCIFIOExport.h"
24 #include "itksys/Process.h"
25 #include "itksys/SystemTools.hxx"
94 virtual bool SupportsDimension(
unsigned long dim ) ITK_OVERRIDE;
98 virtual bool CanReadFile(
const char* FileNameToRead) ITK_OVERRIDE;
101 virtual bool SetSeries(
int series);
104 virtual int GetSeriesCount();
107 virtual void ReadImageInformation() ITK_OVERRIDE;
110 virtual
void Read(
void* buffer) ITK_OVERRIDE;
114 virtual
bool CanWriteFile(const
char* FileNameToWrite) ITK_OVERRIDE;
117 virtual
void WriteImageInformation() ITK_OVERRIDE;
120 virtual
void Write(const
void* buffer) ITK_OVERRIDE;
126 virtual
SizeType GetHeaderSize() const ITK_OVERRIDE {
return 0; }
129 void CreateJavaProcess();
130 void DestroyJavaProcess();
131 std::string FindDimensionOrder(
const ImageIORegion & region );
132 std::string WaitForNewLines(
int pipedatalength);
133 void CheckError(std::string message);
134 bool CheckJavaPath(std::string javaHome, std::string &javaCmd);
135 std::string RemoveFinalSlash(std::string path)
const;
137 char **
toCArray( std::vector< std::string > & args )
139 char **argv =
new char *[args.size() + 1];
140 for(
int i = 0; i < static_cast< int >( args.size() ); i++ )
142 itkDebugMacro(
"SCIFIOImageIO::toCArray::args["<<i<<
"] = " << args[i]);
143 argv[i] = (
char*)args[i].c_str();
145 argv[args.size()] = NULL;
201 itksysProcess_Pipe_Handle m_Pipe[2];
206 #endif // itkSCIFIOImageIO_h
Light weight base class for most itk classes.
An ImageIORegion represents a structured region of data.
Abstract superclass defines image IO interface.
A base class for specific ImageIO file formats which support streaming.
Interface to the OME SCIFIO Java Library.
ImageIOBase::IOComponentType scifioToITKComponentType(int pixelType)
itksysProcess * m_Process
char ** toCArray(std::vector< std::string > &args)
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
int itkToSCIFIOPixelType(ImageIOBase::IOComponentType cmp)
std::vector< std::string > m_Args
MetaDataDictionary m_MetaDataDictionary
Base class for most ITK classes.