18 #ifndef itkSCIFIOImageIO_h
19 #define itkSCIFIOImageIO_h
21 #include "SCIFIOExport.h"
24 #include "itksys/Process.h"
25 #include "itksys/SystemTools.hxx"
94 bool SupportsDimension(
unsigned long dim )
override;
98 bool CanReadFile(
const char* FileNameToRead)
override;
101 virtual bool SetSeries(
int series);
104 virtual int GetSeriesCount();
107 void ReadImageInformation()
override;
110 void Read(
void* buffer)
override;
114 bool CanWriteFile(
const char* FileNameToWrite)
override;
117 void WriteImageInformation()
override;
120 void Write(
const void* buffer)
override;
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 auto **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()] =
nullptr;
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.
SizeType GetHeaderSize() const override
Returns the size of the header in the file.
ImageIOBase::IOComponentType scifioToITKComponentType(int pixelType)
itksysProcess * m_Process
char ** toCArray(std::vector< std::string > &args)
int itkToSCIFIOPixelType(ImageIOBase::IOComponentType cmp)
std::vector< std::string > m_Args
MetaDataDictionary m_MetaDataDictionary
Base class for most ITK classes.