ITK  5.1.0
Insight Toolkit
itkMeshIOBase.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkMeshIOBase_h
19 #define itkMeshIOBase_h
20 #include "ITKIOMeshBaseExport.h"
21 
22 #include "itkByteSwapper.h"
23 #include "itkCellInterface.h"
24 #include "itkCovariantVector.h"
25 #include "itkDiffusionTensor3D.h"
26 #include "itkIntTypes.h"
27 #include "itkLightProcessObject.h"
28 #include "itkMatrix.h"
29 #include "itkRGBPixel.h"
30 #include "itkRGBAPixel.h"
33 #include "itkVariableSizeMatrix.h"
34 #include "itkVector.h"
35 #include "itkNumberToString.h"
36 
37 #include <string>
38 #include <complex>
39 #include <fstream>
40 
41 namespace itk
42 {
69 class ITKIOMeshBase_EXPORT MeshIOBase : public LightProcessObject
70 {
71 public:
72  ITK_DISALLOW_COPY_AND_ASSIGN(MeshIOBase);
73 
75  using Self = MeshIOBase;
79 
81  using ArrayOfExtensionsType = std::vector<std::string>;
82 
84  using StreamOffsetType = std::streamoff;
85 
87 
94  {};
95 
97  itkTypeMacro(MeshIOBase, LightProcessObject);
98 
100  itkSetStringMacro(FileName);
101  itkGetStringMacro(FileName);
103 
107  typedef enum
108  {
124  VARIABLESIZEMATRIX
125  } IOPixelType;
126 
130  typedef enum
131  {
145  LDOUBLE
146  } IOComponentType;
147 
150  typedef enum
151  {
154  TYPENOTAPPLICABLE
155  } FileType;
156 
159  typedef enum
160  {
163  OrderNotApplicable
164  } ByteOrder;
165 
167  typedef enum
168  {
169  VERTEX_CELL = 0,
179  MAX_ITK_CELLS = 255
180  } CellGeometryType;
181 
187  itkSetEnumMacro(PointPixelType, IOPixelType);
188  itkGetEnumMacro(PointPixelType, IOPixelType);
189  itkSetEnumMacro(CellPixelType, IOPixelType);
190  itkGetEnumMacro(CellPixelType, IOPixelType);
192 
195  itkSetEnumMacro(PointComponentType, IOComponentType);
196  itkGetEnumMacro(PointComponentType, IOComponentType);
197  itkSetEnumMacro(CellComponentType, IOComponentType);
198  itkGetEnumMacro(CellComponentType, IOComponentType);
199  itkSetEnumMacro(PointPixelComponentType, IOComponentType);
200  itkGetEnumMacro(PointPixelComponentType, IOComponentType);
201  itkSetEnumMacro(CellPixelComponentType, IOComponentType);
202  itkGetEnumMacro(CellPixelComponentType, IOComponentType);
204 
205  template <typename T>
207  {
208  static constexpr IOComponentType CType = UNKNOWNCOMPONENTTYPE;
209  };
210 
211  template <typename T>
212  void
213  SetPixelType(const T & itkNotUsed(dummy), bool UsePointPixel = true)
214  {
215  if (UsePointPixel)
216  {
217  SetNumberOfPointPixelComponents(1);
218  SetPointPixelComponentType(MapComponentType<T>::CType);
219  SetPointPixelType(SCALAR);
220  }
221  else
222  {
223  SetNumberOfCellPixelComponents(1);
224  SetCellPixelComponentType(MapComponentType<T>::CType);
225  SetCellPixelType(SCALAR);
226  }
227  }
228 
229  template <typename T>
230  void
231  SetPixelType(const RGBPixel<T> & itkNotUsed(dummy), bool UsePointPixel = true)
232  {
233  if (UsePointPixel)
234  {
235  SetNumberOfPointPixelComponents(3);
236  SetPointPixelComponentType(MapComponentType<T>::CType);
237  SetPointPixelType(RGB);
238  }
239  else
240  {
241  SetNumberOfCellPixelComponents(3);
242  SetCellPixelComponentType(MapComponentType<T>::CType);
243  SetCellPixelType(RGB);
244  }
245  }
246 
247  template <typename T>
248  void
249  SetPixelType(const RGBAPixel<T> & itkNotUsed(dummy), bool UsePointPixel = true)
250  {
251  if (UsePointPixel)
252  {
253  SetNumberOfPointPixelComponents(4);
254  SetPointPixelComponentType(MapComponentType<T>::CType);
255  SetPointPixelType(RGBA);
256  }
257  else
258  {
259  SetNumberOfCellPixelComponents(4);
260  SetCellPixelComponentType(MapComponentType<T>::CType);
261  SetCellPixelType(RGBA);
262  }
263  }
264 
265  template <typename T, unsigned int VLength>
266  void
267  SetPixelType(const Vector<T, VLength> & itkNotUsed(dummy), bool UsePointPixel = true)
268  {
269  if (UsePointPixel)
270  {
271  SetNumberOfPointPixelComponents(VLength);
272  SetPointPixelComponentType(MapComponentType<T>::CType);
273  SetPointPixelType(VECTOR);
274  }
275  else
276  {
277  SetNumberOfCellPixelComponents(VLength);
278  SetCellPixelComponentType(MapComponentType<T>::CType);
279  SetCellPixelType(VECTOR);
280  }
281  }
282 
283  template <typename T, unsigned int VLength>
284  void
285  SetPixelType(const CovariantVector<T, VLength> & itkNotUsed(dummy), bool UsePointPixel = true)
286  {
287  if (UsePointPixel)
288  {
289  SetNumberOfPointPixelComponents(VLength);
290  SetPointPixelComponentType(MapComponentType<T>::CType);
291  SetPointPixelType(COVARIANTVECTOR);
292  }
293  else
294  {
295  SetNumberOfCellPixelComponents(VLength);
296  SetCellPixelComponentType(MapComponentType<T>::CType);
297  SetCellPixelType(COVARIANTVECTOR);
298  }
299  }
300 
301  template <typename T, unsigned int VLength>
302  void
303  SetPixelType(const FixedArray<T, VLength> & itkNotUsed(dummy), bool UsePointPixel = true)
304  {
305  if (UsePointPixel)
306  {
307  SetNumberOfPointPixelComponents(VLength);
308  SetPointPixelComponentType(MapComponentType<T>::CType);
309  SetPointPixelType(FIXEDARRAY);
310  }
311  else
312  {
313  SetNumberOfCellPixelComponents(VLength);
314  SetCellPixelComponentType(MapComponentType<T>::CType);
315  SetCellPixelType(FIXEDARRAY);
316  }
317  }
318 
319  template <typename T, unsigned int VLength>
320  void
321  SetPixelType(const SymmetricSecondRankTensor<T, VLength> itkNotUsed(dummy), bool UsePointPixel = true)
322  {
323  if (UsePointPixel)
324  {
325  SetNumberOfPointPixelComponents(VLength * (VLength + 1) / 2);
326  SetPointPixelComponentType(MapComponentType<T>::CType);
327  SetPointPixelType(SYMMETRICSECONDRANKTENSOR);
328  }
329  else
330  {
331  SetNumberOfCellPixelComponents(VLength * (VLength + 1) / 2);
332  SetCellPixelComponentType(MapComponentType<T>::CType);
333  SetCellPixelType(SYMMETRICSECONDRANKTENSOR);
334  }
335  }
336 
337  template <typename T>
338  void
339  SetPixelType(const DiffusionTensor3D<T> & itkNotUsed(dummy), bool UsePointPixel = true)
340  {
341  if (UsePointPixel)
342  {
343  SetNumberOfPointPixelComponents(6);
344  SetPointPixelComponentType(MapComponentType<T>::CType);
345  SetPointPixelType(DIFFUSIONTENSOR3D);
346  }
347  else
348  {
349  SetNumberOfCellPixelComponents(6);
350  SetCellPixelComponentType(MapComponentType<T>::CType);
351  SetCellPixelType(DIFFUSIONTENSOR3D);
352  }
353  }
354 
355  template <typename T, unsigned int NR, unsigned int NC>
356  void
357  SetPixelType(const Matrix<T, NR, NC> & itkNotUsed(dummy), bool UsePointPixel = true)
358  {
359  if (UsePointPixel)
360  {
361  SetNumberOfPointPixelComponents(NR * NC);
362  SetPointPixelComponentType(MapComponentType<T>::CType);
363  SetPointPixelType(MATRIX);
364  }
365  else
366  {
367  SetNumberOfCellPixelComponents(NR * NC);
368  SetCellPixelComponentType(MapComponentType<T>::CType);
369  SetCellPixelType(MATRIX);
370  }
371  }
372 
373  template <typename T>
374  void
375  SetPixelType(const std::complex<T> & itkNotUsed(dummy), bool UsePointPixel = true)
376  {
377  if (UsePointPixel)
378  {
379  SetNumberOfPointPixelComponents(2);
380  SetPointPixelComponentType(MapComponentType<T>::CType);
381  SetPointPixelType(COMPLEX);
382  }
383  else
384  {
385  SetNumberOfCellPixelComponents(2);
386  SetCellPixelComponentType(MapComponentType<T>::CType);
387  SetCellPixelType(COMPLEX);
388  }
389  }
390 
391  template <typename T>
392  void
393  SetPixelType(const Array<T> & array, bool UsePointPixel = true)
394  {
395  if (UsePointPixel)
396  {
397  SetNumberOfPointPixelComponents(array.Size());
398  SetPointPixelComponentType(MapComponentType<T>::CType);
399  SetPointPixelType(ARRAY);
400  }
401  else
402  {
403  SetNumberOfCellPixelComponents(array.Size());
404  SetCellPixelComponentType(MapComponentType<T>::CType);
405  SetCellPixelType(ARRAY);
406  }
407  }
408 
409  template <typename T>
410  void
411  SetPixelType(const VariableLengthVector<T> & vector, bool UsePointPixel = true)
412  {
413  if (UsePointPixel)
414  {
415  SetNumberOfPointPixelComponents(vector.Size());
416  SetPointPixelComponentType(MapComponentType<T>::CType);
417  SetPointPixelType(VARIABLELENGTHVECTOR);
418  }
419  else
420  {
421  SetNumberOfCellPixelComponents(vector.Size());
422  SetCellPixelComponentType(MapComponentType<T>::CType);
423  SetCellPixelType(VARIABLELENGTHVECTOR);
424  }
425  }
426 
427  template <typename T>
428  void
429  SetPixelType(const VariableSizeMatrix<T> & matrix, bool UsePointPixel = true)
430  {
431  if (UsePointPixel)
432  {
433  SetNumberOfPointPixelComponents(matrix.Rows() * matrix.Cols());
434  SetPointPixelComponentType(MapComponentType<T>::CType);
435  SetPointPixelType(VARIABLESIZEMATRIX);
436  }
437  else
438  {
439  SetNumberOfCellPixelComponents(matrix.Rows() * matrix.Cols());
440  SetCellPixelComponentType(MapComponentType<T>::CType);
441  SetCellPixelType(VARIABLESIZEMATRIX);
442  }
443  }
444 
449  itkSetMacro(NumberOfPointPixelComponents, unsigned int);
450  itkGetConstMacro(NumberOfPointPixelComponents, unsigned int);
451  itkSetMacro(NumberOfCellPixelComponents, unsigned int);
452  itkGetConstMacro(NumberOfCellPixelComponents, unsigned int);
453  itkSetMacro(PointDimension, unsigned int);
454  itkGetConstMacro(PointDimension, unsigned int);
455  itkSetMacro(NumberOfPoints, SizeValueType);
456  itkGetConstMacro(NumberOfPoints, SizeValueType);
457  itkSetMacro(NumberOfCells, SizeValueType);
458  itkGetConstMacro(NumberOfCells, SizeValueType);
459  itkSetMacro(NumberOfPointPixels, SizeValueType);
460  itkGetConstMacro(NumberOfPointPixels, SizeValueType);
461  itkSetMacro(NumberOfCellPixels, SizeValueType);
462  itkGetConstMacro(NumberOfCellPixels, SizeValueType);
463  itkSetMacro(CellBufferSize, SizeValueType);
464  itkGetConstMacro(CellBufferSize, SizeValueType);
465  itkSetMacro(UpdatePoints, bool);
466  itkGetConstMacro(UpdatePoints, bool);
467  itkSetMacro(UpdateCells, bool);
468  itkGetConstMacro(UpdateCells, bool);
469  itkSetMacro(UpdatePointData, bool);
470  itkGetConstMacro(UpdatePointData, bool);
471  itkSetMacro(UpdateCellData, bool);
472  itkGetConstMacro(UpdateCellData, bool);
474 
475  unsigned int
476  GetComponentSize(IOComponentType componentType) const;
477 
480  std::string GetComponentTypeAsString(IOComponentType) const;
481 
484  std::string GetPixelTypeAsString(IOPixelType) const;
485 
488  itkSetEnumMacro(FileType, FileType);
489  itkGetEnumMacro(FileType, FileType);
491 
492  void
494  {
495  this->SetFileType(ASCII);
496  }
497 
498  void
500  {
501  this->SetFileType(BINARY);
502  }
503 
515  itkSetEnumMacro(ByteOrder, ByteOrder);
516  itkGetEnumMacro(ByteOrder, ByteOrder);
518 
519  void
521  {
522  this->SetByteOrder(BigEndian);
523  }
524 
525  void
527  {
528  this->SetByteOrder(LittleEndian);
529  }
530 
532  itkSetMacro(UseCompression, bool);
533  itkGetConstMacro(UseCompression, bool);
534  itkBooleanMacro(UseCompression);
536 
539  std::string GetFileTypeAsString(FileType) const;
540 
543  std::string GetByteOrderAsString(ByteOrder) const;
544 
545  /*-------- This part of the interfaces deals with reading data ----- */
548  virtual bool
549  CanReadFile(const char *) = 0;
550 
553  virtual void
554  ReadMeshInformation() = 0;
555 
557  virtual void
558  ReadPoints(void * buffer) = 0;
559 
560  virtual void
561  ReadCells(void * buffer) = 0;
562 
563  virtual void
564  ReadPointData(void * buffer) = 0;
565 
566  virtual void
567  ReadCellData(void * buffer) = 0;
568 
569  /*-------- This part of the interfaces deals with writing data ----- */
570 
573  virtual bool
574  CanWriteFile(const char *) = 0;
575 
576  virtual void
577  WriteMeshInformation() = 0;
578 
579  virtual void
580  WritePoints(void * buffer) = 0;
581 
582  virtual void
583  WriteCells(void * buffer) = 0;
584 
585  virtual void
586  WritePointData(void * buffer) = 0;
587 
588  virtual void
589  WriteCellData(void * buffer) = 0;
590 
591  virtual void
592  Write() = 0;
593 
598  const ArrayOfExtensionsType &
599  GetSupportedReadExtensions() const;
600 
605  const ArrayOfExtensionsType &
606  GetSupportedWriteExtensions() const;
607 
608 protected:
609  MeshIOBase();
610  ~MeshIOBase() override = default;
611 
612  void
613  PrintSelf(std::ostream & os, Indent indent) const override;
614 
616  void
617  AddSupportedReadExtension(const char * extension);
618 
620  void
621  AddSupportedWriteExtension(const char * extension);
622 
624  template <typename T>
625  void
626  ReadBufferAsAscii(T * buffer, std::ifstream & inputFile, SizeValueType numberOfComponents)
627  {
628  for (SizeValueType i = 0; i < numberOfComponents; i++)
629  {
630  inputFile >> buffer[i];
631  }
632  }
634 
636  template <typename T>
637  void
638  ReadBufferAsBinary(T * buffer, std::ifstream & inputFile, SizeValueType numberOfComponents)
639  {
640  inputFile.read(reinterpret_cast<char *>(buffer), numberOfComponents * sizeof(T));
641 
642  if (m_ByteOrder == BigEndian)
643  {
645  {
646  itk::ByteSwapper<T>::SwapRangeFromSystemToBigEndian(buffer, numberOfComponents);
647  }
648  }
649  else if (m_ByteOrder == LittleEndian)
650  {
652  {
653  itk::ByteSwapper<T>::SwapRangeFromSystemToLittleEndian(buffer, numberOfComponents);
654  }
655  }
656  }
657 
659  template <typename T>
660  void
661  WriteBufferAsAscii(T * buffer,
662  std::ofstream & outputFile,
663  SizeValueType numberOfLines,
664  SizeValueType numberOfComponents)
665  {
666  NumberToString<T> convert;
667  for (SizeValueType ii = 0; ii < numberOfLines; ii++)
668  {
669  for (SizeValueType jj = 0; jj < numberOfComponents; jj++)
670  {
671  outputFile << convert(buffer[ii * numberOfComponents + jj]) << " ";
672  }
673  outputFile << '\n';
674  }
675  }
677 
679  template <typename TOutput, typename TInput>
680  void
681  WriteBufferAsBinary(TInput * buffer, std::ofstream & outputFile, SizeValueType numberOfComponents)
682  {
683  if (typeid(TInput) == typeid(TOutput))
684  {
685  if (m_ByteOrder == BigEndian && itk::ByteSwapper<TInput>::SystemIsLittleEndian())
686  {
688  }
689  else if (m_ByteOrder == LittleEndian && itk::ByteSwapper<TInput>::SystemIsBigEndian())
690  {
692  }
694 
695  outputFile.write(reinterpret_cast<char *>(buffer), numberOfComponents);
696  }
697  else
698  {
699  auto * data = new TOutput[numberOfComponents];
700  for (SizeValueType ii = 0; ii < numberOfComponents; ii++)
701  {
702  data[ii] = static_cast<TOutput>(buffer[ii]);
703  }
704 
705  if (m_ByteOrder == BigEndian && itk::ByteSwapper<TOutput>::SystemIsLittleEndian())
706  {
708  }
709  else if (m_ByteOrder == LittleEndian && itk::ByteSwapper<TOutput>::SystemIsBigEndian())
710  {
712  }
713 
714  outputFile.write(reinterpret_cast<char *>(data), numberOfComponents);
715  delete[] data;
716  }
717  }
718 
722  template <typename TInput, typename TOutput>
723  void
724  ReadCellsBuffer(TInput * input, TOutput * output)
725  {
726  if (input && output)
727  {
730  for (SizeValueType ii = 0; ii < m_NumberOfCells; ii++)
731  {
732  inputIndex++; // ignore the cell type
733  auto numberOfPoints = static_cast<unsigned int>(input[inputIndex++]);
734  for (unsigned int jj = 0; jj < numberOfPoints; jj++)
735  {
736  output[outputIndex++] = static_cast<TOutput>(input[inputIndex++]);
737  }
738  }
739  }
740  }
742 
746  template <typename TInput, typename TOutput>
747  void
748  ReadCellsBuffer(TInput * input, TOutput * output, MeshIOBase::CellGeometryType type)
749  {
750  if (input && output)
751  {
755 
756  for (SizeValueType ii = 0; ii < m_NumberOfCells; ii++)
757  {
758  auto cellType = static_cast<MeshIOBase::CellGeometryType>(input[inputIndex++]);
759  auto nn = static_cast<unsigned int>(input[inputIndex++]);
760  if (cellType == type)
761  {
762  output[outputIndex++] = nn;
763  for (unsigned int jj = 0; jj < nn; jj++)
764  {
765  output[outputIndex++] = static_cast<TOutput>(input[inputIndex++]);
766  }
767  }
768  else
769  {
770  inputIndex += nn;
771  }
772  }
773  }
774  }
775 
778  template <typename TInput, typename TOutput>
779  void
780  WriteCellsBuffer(TInput * input,
781  TOutput * output,
782  CellGeometryType cellType,
783  unsigned int numberOfPoints,
784  SizeValueType numberOfCells)
785  {
786  if (input && output)
787  {
790  for (SizeValueType ii = 0; ii < numberOfCells; ii++)
791  {
792  output[outputIndex++] = static_cast<TOutput>(cellType);
793  output[outputIndex++] = static_cast<TOutput>(numberOfPoints);
794  for (unsigned int jj = 0; jj < numberOfPoints; jj++)
795  {
796  output[outputIndex++] = static_cast<TOutput>(input[inputIndex++]);
797  }
798  }
799  }
800  }
802 
805  template <typename TInput, typename TOutput>
806  void
807  WriteCellsBuffer(TInput * input, TOutput * output, CellGeometryType cellType, SizeValueType numberOfCells)
808  {
809  if (input && output)
810  {
813  for (SizeValueType ii = 0; ii < numberOfCells; ii++)
814  {
815  auto numberOfPoints = static_cast<unsigned int>(input[inputIndex++]);
816  output[outputIndex++] = static_cast<TOutput>(cellType);
817  output[outputIndex++] = static_cast<TOutput>(numberOfPoints);
818  for (unsigned int jj = 0; jj < numberOfPoints; jj++)
819  {
820  output[outputIndex++] = static_cast<TOutput>(input[inputIndex++]);
821  }
822  }
823  }
824  }
826 
827 protected:
829  ByteOrder m_ByteOrder{ OrderNotApplicable };
830  FileType m_FileType{ ASCII };
831 
833  std::string m_FileName;
834 
836  bool m_UseCompression{ false };
837 
839  IOComponentType m_PointComponentType{ UNKNOWNCOMPONENTTYPE };
840  IOComponentType m_CellComponentType{ UNKNOWNCOMPONENTTYPE };
841  IOComponentType m_PointPixelComponentType{ UNKNOWNCOMPONENTTYPE };
842  IOComponentType m_CellPixelComponentType{ UNKNOWNCOMPONENTTYPE };
843 
845  IOPixelType m_PointPixelType{ SCALAR };
846  IOPixelType m_CellPixelType{ SCALAR };
847 
850  unsigned int m_NumberOfPointPixelComponents{ 0 };
851  unsigned int m_NumberOfCellPixelComponents{ 0 };
852 
854  unsigned int m_PointDimension{ 3 };
855 
861 
864 
867  bool m_UpdatePoints{ false };
868  bool m_UpdateCells{ false };
869  bool m_UpdatePointData{ false };
870  bool m_UpdateCellData{ false };
871 
872 private:
875 };
876 #define MESHIOBASE_TYPEMAP(type, ctype) \
877  template <> \
878  struct MeshIOBase::MapComponentType<type> \
879  { \
880  static constexpr IOComponentType CType = ctype; \
881  }
882 
883 MESHIOBASE_TYPEMAP(unsigned char, UCHAR);
884 MESHIOBASE_TYPEMAP(char, CHAR);
885 MESHIOBASE_TYPEMAP(unsigned short, USHORT);
886 MESHIOBASE_TYPEMAP(short, SHORT);
887 MESHIOBASE_TYPEMAP(unsigned int, UINT);
888 MESHIOBASE_TYPEMAP(int, INT);
889 MESHIOBASE_TYPEMAP(unsigned long, ULONG);
890 MESHIOBASE_TYPEMAP(long, LONG);
891 MESHIOBASE_TYPEMAP(unsigned long long, ULONGLONG);
892 MESHIOBASE_TYPEMAP(long long, LONGLONG);
893 MESHIOBASE_TYPEMAP(float, FLOAT);
894 MESHIOBASE_TYPEMAP(double, DOUBLE);
895 MESHIOBASE_TYPEMAP(long double, LDOUBLE);
896 #undef MESHIOBASE_TYPEMAP
897 } // end namespace itk
898 
899 #endif
itk::MeshIOBase::SetPixelType
void SetPixelType(const Matrix< T, NR, NC > &, bool UsePointPixel=true)
Definition: itkMeshIOBase.h:357
itk::MeshIOBase::IOPixelType
IOPixelType
Definition: itkMeshIOBase.h:107
itk::MeshIOBase::ArrayOfExtensionsType
std::vector< std::string > ArrayOfExtensionsType
Definition: itkMeshIOBase.h:81
itk::MeshIOBase::ULONG
Definition: itkMeshIOBase.h:139
itk::MeshIOBase::ULONGLONG
Definition: itkMeshIOBase.h:142
itk::MeshIOBase::UCHAR
Definition: itkMeshIOBase.h:133
itk::MeshIOBase::SetPixelType
void SetPixelType(const VariableSizeMatrix< T > &matrix, bool UsePointPixel=true)
Definition: itkMeshIOBase.h:429
itk::MeshIOBase::QUADRILATERAL_CELL
Definition: itkMeshIOBase.h:172
itk::LightProcessObject
LightProcessObject is the base class for all process objects (source, filters, mappers) in the Insigh...
Definition: itkLightProcessObject.h:72
itk::MeshIOBase::ReadCellsBuffer
void ReadCellsBuffer(TInput *input, TOutput *output, MeshIOBase::CellGeometryType type)
Definition: itkMeshIOBase.h:748
itk::RGBPixel
Represent Red, Green and Blue components for color images.
Definition: itkRGBPixel.h:58
itk::NumberToString
Convert floating and fixed point numbers to strings.
Definition: itkNumberToString.h:42
itkCovariantVector.h
itk::MeshIOBase::WriteBufferAsBinary
void WriteBufferAsBinary(TInput *buffer, std::ofstream &outputFile, SizeValueType numberOfComponents)
Definition: itkMeshIOBase.h:681
itk::MeshIOBase::UNKNOWNCOMPONENTTYPE
Definition: itkMeshIOBase.h:132
itkByteSwapper.h
itk::MeshIOBase::SetPixelType
void SetPixelType(const T &, bool UsePointPixel=true)
Definition: itkMeshIOBase.h:213
itkRGBPixel.h
itk::MeshIOBase::SetFileTypeToASCII
void SetFileTypeToASCII()
Definition: itkMeshIOBase.h:493
itk::MeshIOBase::UNKNOWNPIXELTYPE
Definition: itkMeshIOBase.h:109
itk::MeshIOBase::SizeValueType
IdentifierType SizeValueType
Definition: itkMeshIOBase.h:86
itk::MeshIOBase::SetPixelType
void SetPixelType(const SymmetricSecondRankTensor< T, VLength >, bool UsePointPixel=true)
Definition: itkMeshIOBase.h:321
itkVariableSizeMatrix.h
itkMatrix.h
itk::MeshIOBase::UINT
Definition: itkMeshIOBase.h:137
itkLightProcessObject.h
itk::MeshIOBase::DOUBLE
Definition: itkMeshIOBase.h:144
itkVariableLengthVector.h
itkDiffusionTensor3D.h
itk::Vector
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
itk::MeshIOBase
Abstract superclass defines mesh IO interface.
Definition: itkMeshIOBase.h:69
itk::MeshIOBase::COVARIANTVECTOR
Definition: itkMeshIOBase.h:116
itk::DiffusionTensor3D
Represent a diffusion tensor as used in DTI images.
Definition: itkDiffusionTensor3D.h:79
itkRGBAPixel.h
itk::MeshIOBase::VECTOR
Definition: itkMeshIOBase.h:114
itk::SmartPointer< const Self >
itk::MeshIOBase::SetPixelType
void SetPixelType(const RGBPixel< T > &, bool UsePointPixel=true)
Definition: itkMeshIOBase.h:231
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::MeshIOBase::HEXAHEDRON_CELL
Definition: itkMeshIOBase.h:175
itk::MeshIOBase::SetPixelType
void SetPixelType(const DiffusionTensor3D< T > &, bool UsePointPixel=true)
Definition: itkMeshIOBase.h:339
itk::VariableSizeMatrix
A templated class holding a M x N size Matrix.
Definition: itkVariableSizeMatrix.h:44
itk::MeshIOBase::m_NumberOfPointPixels
SizeValueType m_NumberOfPointPixels
Definition: itkMeshIOBase.h:859
itk::MESHIOBASE_TYPEMAP
MESHIOBASE_TYPEMAP(unsigned char, UCHAR)
itk::MeshIOBase::m_SupportedReadExtensions
ArrayOfExtensionsType m_SupportedReadExtensions
Definition: itkMeshIOBase.h:873
itk::MeshIOBase::m_NumberOfPoints
SizeValueType m_NumberOfPoints
Definition: itkMeshIOBase.h:857
itk::SymmetricSecondRankTensor
Represent a symmetric tensor of second rank.
Definition: itkSymmetricSecondRankTensor.h:75
itk::MeshIOBase::ReadBufferAsAscii
void ReadBufferAsAscii(T *buffer, std::ifstream &inputFile, SizeValueType numberOfComponents)
Definition: itkMeshIOBase.h:626
itk::MeshIOBase::COMPLEX
Definition: itkMeshIOBase.h:119
itk::MeshIOBase::ByteOrder
ByteOrder
Definition: itkMeshIOBase.h:159
itk::MeshIOBase::m_CellBufferSize
SizeValueType m_CellBufferSize
Definition: itkMeshIOBase.h:863
itk::MeshIOBase::VARIABLELENGTHVECTOR
Definition: itkMeshIOBase.h:123
itk::MeshIOBase::SetPixelType
void SetPixelType(const RGBAPixel< T > &, bool UsePointPixel=true)
Definition: itkMeshIOBase.h:249
itk::MeshIOBase::IOComponentType
IOComponentType
Definition: itkMeshIOBase.h:130
itk::MeshIOBase::SetPixelType
void SetPixelType(const CovariantVector< T, VLength > &, bool UsePointPixel=true)
Definition: itkMeshIOBase.h:285
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::MeshIOBase::DIFFUSIONTENSOR3D
Definition: itkMeshIOBase.h:118
itkNumberToString.h
itk::MeshIOBase::WriteBufferAsAscii
void WriteBufferAsAscii(T *buffer, std::ofstream &outputFile, SizeValueType numberOfLines, SizeValueType numberOfComponents)
Definition: itkMeshIOBase.h:661
itk::MeshIOBase::TETRAHEDRON_CELL
Definition: itkMeshIOBase.h:174
itk::MeshIOBase::ReadCellsBuffer
void ReadCellsBuffer(TInput *input, TOutput *output)
Definition: itkMeshIOBase.h:724
itk::ByteSwapper::SwapRangeFromSystemToBigEndian
static void SwapRangeFromSystemToBigEndian(T *p, BufferSizeType num)
itk::MeshIOBase::m_NumberOfCells
SizeValueType m_NumberOfCells
Definition: itkMeshIOBase.h:858
itkSymmetricSecondRankTensor.h
itk::MeshIOBase::INT
Definition: itkMeshIOBase.h:138
itk::MeshIOBase::LAST_ITK_CELL
Definition: itkMeshIOBase.h:178
itk::MeshIOBase::SetFileTypeToBinary
void SetFileTypeToBinary()
Definition: itkMeshIOBase.h:499
itk::MeshIOBase::LittleEndian
Definition: itkMeshIOBase.h:162
itk::MeshIOBase::FLOAT
Definition: itkMeshIOBase.h:143
itk::ByteSwapper
Perform machine dependent byte swapping.
Definition: itkByteSwapper.h:50
itk::VariableSizeMatrix::Cols
unsigned int Cols() const
Definition: itkVariableSizeMatrix.h:237
itk::MeshIOBase::UnknownType
Definition: itkMeshIOBase.h:93
itk::MeshIOBase::ReadBufferAsBinary
void ReadBufferAsBinary(T *buffer, std::ifstream &inputFile, SizeValueType numberOfComponents)
Definition: itkMeshIOBase.h:638
itk::MeshIOBase::SetPixelType
void SetPixelType(const Array< T > &array, bool UsePointPixel=true)
Definition: itkMeshIOBase.h:393
itk::MeshIOBase::MapComponentType
Definition: itkMeshIOBase.h:206
itk::MeshIOBase::ASCII
Definition: itkMeshIOBase.h:152
itk::MeshIOBase::SetPixelType
void SetPixelType(const VariableLengthVector< T > &vector, bool UsePointPixel=true)
Definition: itkMeshIOBase.h:411
itk::MeshIOBase::LINE_CELL
Definition: itkMeshIOBase.h:170
itk::VariableLengthVector::Size
unsigned int Size() const
Definition: itkVariableLengthVector.h:592
itk::MeshIOBase::POLYGON_CELL
Definition: itkMeshIOBase.h:173
itk::MeshIOBase::SYMMETRICSECONDRANKTENSOR
Definition: itkMeshIOBase.h:117
itk::VariableLengthVector
Represents an array whose length can be defined at run-time.
Definition: itkConstantBoundaryCondition.h:28
itkIntTypes.h
itk::FixedArray
Simulate a standard C array with copy semantics.
Definition: itkFixedArray.h:52
itk::MeshIOBase::TRIANGLE_CELL
Definition: itkMeshIOBase.h:171
itk::Matrix
A templated class holding a M x N size Matrix.
Definition: itkMatrix.h:50
itk::MeshIOBase::SCALAR
Definition: itkMeshIOBase.h:110
itk::CovariantVector
A templated class holding a n-Dimensional covariant vector.
Definition: itkCovariantVector.h:68
itk::MeshIOBase::WriteCellsBuffer
void WriteCellsBuffer(TInput *input, TOutput *output, CellGeometryType cellType, unsigned int numberOfPoints, SizeValueType numberOfCells)
Definition: itkMeshIOBase.h:780
itk::NumericTraits::ZeroValue
static T ZeroValue()
Definition: itkNumericTraits.h:148
itk::RGBAPixel
Represent Red, Green, Blue and Alpha components for color images.
Definition: itkRGBAPixel.h:59
itk::MeshIOBase::SHORT
Definition: itkMeshIOBase.h:136
itk::MeshIOBase::CellGeometryType
CellGeometryType
Definition: itkMeshIOBase.h:167
itk::MeshIOBase::USHORT
Definition: itkMeshIOBase.h:135
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkArray.h:26
itk::MeshIOBase::RGB
Definition: itkMeshIOBase.h:111
itk::MeshIOBase::BINARY
Definition: itkMeshIOBase.h:153
itk::MeshIOBase::QUADRATIC_EDGE_CELL
Definition: itkMeshIOBase.h:176
itk::MeshIOBase::FIXEDARRAY
Definition: itkMeshIOBase.h:120
itk::MeshIOBase::SetPixelType
void SetPixelType(const Vector< T, VLength > &, bool UsePointPixel=true)
Definition: itkMeshIOBase.h:267
itk::MeshIOBase::LONG
Definition: itkMeshIOBase.h:140
itk::MeshIOBase::SetPixelType
void SetPixelType(const FixedArray< T, VLength > &, bool UsePointPixel=true)
Definition: itkMeshIOBase.h:303
itkVector.h
itk::ByteSwapper::SwapRangeFromSystemToLittleEndian
static void SwapRangeFromSystemToLittleEndian(T *p, BufferSizeType num)
itk::Array
Array class with size defined at construction time.
Definition: itkArray.h:46
itk::MeshIOBase::QUADRATIC_TRIANGLE_CELL
Definition: itkMeshIOBase.h:177
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:60
itkCellInterface.h
itk::Array::Size
SizeValueType Size() const
Definition: itkArray.h:124
itk::MeshIOBase::MATRIX
Definition: itkMeshIOBase.h:122
itk::MeshIOBase::ARRAY
Definition: itkMeshIOBase.h:121
itk::MeshIOBase::SetPixelType
void SetPixelType(const std::complex< T > &, bool UsePointPixel=true)
Definition: itkMeshIOBase.h:375
itk::MeshIOBase::POINT
Definition: itkMeshIOBase.h:115
itk::MeshIOBase::RGBA
Definition: itkMeshIOBase.h:112
itk::MeshIOBase::m_FileName
std::string m_FileName
Definition: itkMeshIOBase.h:833
itk::MeshIOBase::LONGLONG
Definition: itkMeshIOBase.h:141
itk::MeshIOBase::SetByteOrderToLittleEndian
void SetByteOrderToLittleEndian()
Definition: itkMeshIOBase.h:526
itk::MeshIOBase::m_SupportedWriteExtensions
ArrayOfExtensionsType m_SupportedWriteExtensions
Definition: itkMeshIOBase.h:874
itk::MeshIOBase::WriteCellsBuffer
void WriteCellsBuffer(TInput *input, TOutput *output, CellGeometryType cellType, SizeValueType numberOfCells)
Definition: itkMeshIOBase.h:807
itk::VariableSizeMatrix::Rows
unsigned int Rows() const
Definition: itkVariableSizeMatrix.h:230
itk::MeshIOBase::FileType
FileType
Definition: itkMeshIOBase.h:150
itk::MeshIOBase::OFFSET
Definition: itkMeshIOBase.h:113
itk::IdentifierType
SizeValueType IdentifierType
Definition: itkIntTypes.h:87
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83
itk::MeshIOBase::StreamOffsetType
std::streamoff StreamOffsetType
Definition: itkMeshIOBase.h:84
itk::MeshIOBase::m_NumberOfCellPixels
SizeValueType m_NumberOfCellPixels
Definition: itkMeshIOBase.h:860
itk::MeshIOBase::CHAR
Definition: itkMeshIOBase.h:134
itk::MeshIOBase::BigEndian
Definition: itkMeshIOBase.h:161
itk::MeshIOBase::SetByteOrderToBigEndian
void SetByteOrderToBigEndian()
Definition: itkMeshIOBase.h:520