Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkDicomSR_LoadDICOMRGBPixel4D.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 
18 
19 namespace mitk
20 {
22  ImageBlockDescriptor imageBlockDescriptor,
23  bool correctTilt,
24  const GantryTiltInformation &tiltInfo,
26  CallbackCommand *command,
27  Image::Pointer preLoadedImageBlock)
28  {
29  switch (io->GetComponentType())
30  {
31  case DcmIoType::UCHAR:
32  return LoadDICOMByITK4D<itk::RGBPixel<unsigned char>>(
33  imageBlocks, imageBlockDescriptor, correctTilt, tiltInfo, io, command, preLoadedImageBlock);
34  case DcmIoType::CHAR:
35  return LoadDICOMByITK4D<itk::RGBPixel<char>>(
36  imageBlocks, imageBlockDescriptor, correctTilt, tiltInfo, io, command, preLoadedImageBlock);
37  case DcmIoType::USHORT:
38  return LoadDICOMByITK4D<itk::RGBPixel<unsigned short>>(
39  imageBlocks, imageBlockDescriptor, correctTilt, tiltInfo, io, command, preLoadedImageBlock);
40  case DcmIoType::SHORT:
41  return LoadDICOMByITK4D<itk::RGBPixel<short>>(
42  imageBlocks, imageBlockDescriptor, correctTilt, tiltInfo, io, command, preLoadedImageBlock);
43  case DcmIoType::UINT:
44  return LoadDICOMByITK4D<itk::RGBPixel<unsigned int>>(
45  imageBlocks, imageBlockDescriptor, correctTilt, tiltInfo, io, command, preLoadedImageBlock);
46  case DcmIoType::INT:
47  return LoadDICOMByITK4D<itk::RGBPixel<int>>(
48  imageBlocks, imageBlockDescriptor, correctTilt, tiltInfo, io, command, preLoadedImageBlock);
49  case DcmIoType::ULONG:
50  return LoadDICOMByITK4D<itk::RGBPixel<long unsigned int>>(
51  imageBlocks, imageBlockDescriptor, correctTilt, tiltInfo, io, command, preLoadedImageBlock);
52  case DcmIoType::LONG:
53  return LoadDICOMByITK4D<itk::RGBPixel<long int>>(
54  imageBlocks, imageBlockDescriptor, correctTilt, tiltInfo, io, command, preLoadedImageBlock);
55  case DcmIoType::FLOAT:
56  return LoadDICOMByITK4D<itk::RGBPixel<float>>(
57  imageBlocks, imageBlockDescriptor, correctTilt, tiltInfo, io, command, preLoadedImageBlock);
58  case DcmIoType::DOUBLE:
59  return LoadDICOMByITK4D<itk::RGBPixel<double>>(
60  imageBlocks, imageBlockDescriptor, correctTilt, tiltInfo, io, command, preLoadedImageBlock);
61  default:
62  MITK_ERROR << "Found unsupported DICOM scalar pixel type: (enum value) " << io->GetComponentType();
63  return nullptr;
64  }
65  }
66 
67 } // end namespace mitk
itk::SmartPointer< Self > Pointer
Return type of GetSeries, describes a logical group of files.
#define MITK_ERROR
Definition: mitkLogMacros.h:24
DataCollection - Class to facilitate loading/accessing structured data.
static itk::SmartPointer< Image > MultiplexLoadDICOMByITK4DRGBPixel(std::list< StringContainer > &imageBlocks, ImageBlockDescriptor imageBlockDescriptor, bool correctTilt, const GantryTiltInformation &tiltInfo, DcmIoType::Pointer &io, CallbackCommand *command, itk::SmartPointer< Image > preLoadedImageBlock)
Progress callback for DicomSeriesReader.