Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkFileReader.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #include "mitkFileReader.h"
18 
19 mitk::FileReader::FileReader() : m_CanReadFromMemory(false), m_ReadFromMemory(false)
20 {
21 }
22 
24 {
25 }
27 {
28  return m_CanReadFromMemory;
29 }
30 
32 {
33  m_ReadFromMemory = read;
34 }
36 {
37  return m_ReadFromMemory;
38 }
39 void mitk::FileReader::SetMemoryBuffer(const char *dataArray, unsigned int size)
40 {
41  m_MemoryBuffer = dataArray;
42  m_MemorySize = size;
43 }
virtual bool CanReadFromMemory()
Specifies, whether the file reader also can read a file from a memory buffer.
virtual void SetMemoryBuffer(const char *dataArray, unsigned int size)
To be used along with a call of SetReadFromMemory(true). This sets the memory buffer and the size fro...
virtual void SetReadFromMemory(bool read)
Set/Get functions to advise the file reader to use a memory array for reading a file.
virtual bool GetReadFromMemory()