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