Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
itkMRMLIDImageIO.h
Go to the documentation of this file.
1 /*=auto=========================================================================
2 
3  Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
4 
5  See COPYRIGHT.txt
6  or http://www.slicer.org/copyright/copyright.txt for details.
7 
8 =========================================================================auto=*/
9 
10 #ifndef itkMRMLIDImageIO_h
11 #define itkMRMLIDImageIO_h
12 
13 #ifdef _MSC_VER
14 #pragma warning ( disable : 4786 )
15 #endif
16 
17 #include <vtkVersion.h>
18 
19 #include "itkMRMLIDIOExport.h"
20 
21 #include "itkImageIOBase.h"
22 
23 class vtkMRMLVolumeNode;
26 class vtkImageData;
27 
28 namespace itk
29 {
53 class MRMLIDImageIO_EXPORT MRMLIDImageIO : public ImageIOBase
54 {
55 public:
58  typedef ImageIOBase Superclass;
59  typedef SmartPointer<Self> Pointer;
60 
62  itkNewMacro(Self);
63 
65  itkTypeMacro(MRMLIDImageIO, ImageIOBase);
66 
69  virtual bool CanReadFile(const char*) ITK_OVERRIDE;
70 
71  virtual bool CanUseOwnBuffer();
72  virtual void ReadUsingOwnBuffer();
73  virtual void * GetOwnBuffer();
74 
76  virtual void ReadImageInformation() ITK_OVERRIDE;
77 
79  virtual void Read(void* buffer) ITK_OVERRIDE;
80 
81  /*-------- This part of the interfaces deals with writing data. ----- */
82 
85  virtual bool CanWriteFile(const char*) ITK_OVERRIDE;
86 
89  virtual void WriteImageInformation() ITK_OVERRIDE;
90 
93  virtual void Write(const void* buffer) ITK_OVERRIDE;
94 
95 protected:
96  MRMLIDImageIO();
97  ~MRMLIDImageIO();
98  void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
99 
101  virtual void WriteImageInformation(vtkMRMLVolumeNode *, vtkImageData*,
102  int *scalarType, int *numberOfScalarComponents);
103 
106  void SetDWDictionaryValues(MetaDataDictionary &dict,
108 
111  void SetDTDictionaryValues(MetaDataDictionary &dict,
113 
116  void SetDWNodeValues(vtkMRMLDiffusionWeightedVolumeNode *dw,
117  MetaDataDictionary &dict);
118 
121  void SetDTNodeValues(vtkMRMLDiffusionImageVolumeNode *di,
122  MetaDataDictionary &dict);
123 
124 private:
125  MRMLIDImageIO(const Self&); //purposely not implemented
126  void operator=(const Self&); //purposely not implemented
127 
128  bool IsAVolumeNode(const char*);
129  vtkMRMLVolumeNode* FileNameToVolumeNodePtr(const char*);
130 
131  std::string m_Scheme;
132  std::string m_Authority;
133  std::string m_SceneID;
134  std::string m_NodeID;
135 
136 };
137 
138 
139 }
140 #endif
SmartPointer< Self > Pointer
LRU Cache.
ImageIOBase Superclass
Simplified inverse ITK transforms.
MRML node for representing a volume (image stack).
MRMLIDImageIO Self
MRML node for representing diffusion weighted MRI volume.
MRML node for representing diffusion weighted MRI volume.
#define MRMLIDImageIO_EXPORT
ImageIO object for reading and writing imaegs from a MRML scene.