Medical Imaging Interaction Toolkit  2018.4.99-6a3ea89d
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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #include "mitkFileReader.h"
14 
15 mitk::FileReader::FileReader() : m_CanReadFromMemory(false), m_ReadFromMemory(false)
16 {
17 }
18 
20 {
21 }
23 {
24  return m_CanReadFromMemory;
25 }
26 
28 {
29  m_ReadFromMemory = read;
30 }
32 {
33  return m_ReadFromMemory;
34 }
35 void mitk::FileReader::SetMemoryBuffer(const char *dataArray, unsigned int size)
36 {
37  m_MemoryBuffer = dataArray;
38  m_MemorySize = size;
39 }
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.
unsigned int m_MemorySize
const char * m_MemoryBuffer
virtual bool GetReadFromMemory()