diff --git a/Modules/DiffusionImaging/DicomImport/mitkDicomDiffusionImageHeaderReader.h b/Modules/DiffusionImaging/DicomImport/mitkDicomDiffusionImageHeaderReader.h index 077d697d69..50cd4e3121 100644 --- a/Modules/DiffusionImaging/DicomImport/mitkDicomDiffusionImageHeaderReader.h +++ b/Modules/DiffusionImaging/DicomImport/mitkDicomDiffusionImageHeaderReader.h @@ -1,107 +1,115 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date: 2008-02-08 13:23:19 +0100 (Fr, 08 Feb 2008) $ Version: $Revision: 13561 $ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #ifndef __mitkDicomDiffusionImageHeaderReader_h__ #define __mitkDicomDiffusionImageHeaderReader_h__ #include "MitkDiffusionImagingExports.h" #include #include "itkImageSeriesReader.h" #include "itkImageFileReader.h" #include "itkOrientedImage.h" #include "itkGDCMImageIO.h" #include "mitkDiffusionImageHeaderInformation.h" namespace mitk { - + /** + @brief Reads the header information from a DICOM series and stores it into an output object of type + DiffusionImageHeaderInformation + */ class MitkDiffusionImaging_EXPORT DicomDiffusionImageHeaderReader : public itk::Object { public: mitkClassMacro( DicomDiffusionImageHeaderReader, itk::Object ); itkNewMacro(Self); + /** En enum to distinguish in processing between the different vendoors */ enum SupportedVendors{ SV_SIEMENS, SV_SIEMENS_MOSAIC, SV_PHILIPS, SV_GE, SV_UNKNOWN_VENDOR }; typedef std::vector< std::string > FileNamesContainer; typedef short PixelValueType; typedef itk::OrientedImage< PixelValueType, 2 > SliceType; typedef itk::OrientedImage< PixelValueType, 3 > VolumeType; typedef itk::ImageSeriesReader< VolumeType > VolumeReaderType; typedef itk::ImageFileReader< SliceType > SliceReaderType; typedef itk::GDCMImageIO ImageIOType; - /// set input + /** Set the dicom file names to be considered */ void SetSeriesDicomFilenames(FileNamesContainer dicomFilenames) { this->m_DicomFilenames = dicomFilenames; } void SetGdcmIO(ImageIOType::Pointer gdcmIO) { this->m_GdcmIO = gdcmIO; } + /** Set the volume reader in case the default volume reader shouldn't be used */ void SetVolumeReader(VolumeReaderType::Pointer volumeReader) { this->m_VolumeReader = volumeReader; } + /** Set the output object that will contain the read-in information after update */ void SetOutputPointer(DiffusionImageHeaderInformation::Pointer output) { this->m_Output = output; } - /// do the work + /** do the work */ virtual void Update(); - /// return output + /** return output */ DiffusionImageHeaderInformation::Pointer GetOutput(); - /// identify vendor + /** identify vendor */ SupportedVendors GetVendorID(); protected: - + /** Default c'tor */ DicomDiffusionImageHeaderReader(); + + /** Default d'tor */ virtual ~DicomDiffusionImageHeaderReader(); void ReadPublicTags(); void ReadPublicTags2(); void TransformGradients(); FileNamesContainer m_DicomFilenames; DiffusionImageHeaderInformation::Pointer m_Output; ImageIOType::Pointer m_GdcmIO; VolumeReaderType::Pointer m_VolumeReader; bool m_SliceOrderIS; bool m_SingleSeries; int m_nSlice; std::vector m_sliceLocations; }; } #endif diff --git a/Modules/DiffusionImaging/DicomImport/mitkDicomDiffusionImageReader.h b/Modules/DiffusionImaging/DicomImport/mitkDicomDiffusionImageReader.h index 6e9485cbd5..a0ba633b9c 100644 --- a/Modules/DiffusionImaging/DicomImport/mitkDicomDiffusionImageReader.h +++ b/Modules/DiffusionImaging/DicomImport/mitkDicomDiffusionImageReader.h @@ -1,102 +1,102 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date: 2009-07-14 19:11:20 +0200 (Tue, 14 Jul 2009) $ Version: $Revision: 18127 $ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #ifndef __mitkDicomDiffusionImageReader_h #define __mitkDicomDiffusionImageReader_h #include "itkImageSource.h" #include "itkVectorImage.h" #include "mitkDiffusionImageHeaderInformation.h" #include "itkDataObject.h" #include "mitkCommon.h" namespace mitk { -/** \brief +/** \brief Reads in the image data stored as DICOM series. The series is specified by a HeaderContainer */ template class DicomDiffusionImageReader : public itk::ImageSource< itk::VectorImage< TPixelType, TDimension > > { public: typedef itk::VectorImage< TPixelType, TDimension > OutputImageType; typedef itk::Image InputImageType; typedef itk::ImageSource< OutputImageType > ImageSourceType; mitkClassMacro( DicomDiffusionImageReader, ImageSourceType ); itkNewMacro(Self); /** The size of the output image. */ typedef typename OutputImageType::SizeType SizeType; /** The region of the output image. */ typedef typename OutputImageType::RegionType ImageRegionType; typedef std::vector HeaderContainer; /** Set the vector of strings that contains the file names. Files * are processed in sequential order. */ void SetHeaders (const HeaderContainer &headers) { if ( m_Headers != headers) { m_Headers = headers; this->Modified(); } } const HeaderContainer & GetHeaders() const { return m_Headers; } /** Prepare the allocation of the output image during the first back * propagation of the pipeline. */ virtual void GenerateOutputInformation(void); /** Give the reader a chance to indicate that it will produce more * output than it was requested to produce. ImageSeriesReader cannot * currently read a portion of an image (since the ImageIO objects * cannot read a portion of an image), so the ImageSeriesReader must * enlarge the RequestedRegion to the size of the image on disk. */ virtual void EnlargeOutputRequestedRegion(itk::DataObject *output); protected: void PrintSelf(std::ostream& os, itk::Indent indent) const; /** Does the real work. */ virtual void GenerateData(); /** A list of filenames to be processed. */ HeaderContainer m_Headers; /** The number of independent variables in the images that comprise * the series. */ int m_NumberOfDimensionsInImage; private: void operator=(const Self&); //purposely not implemented }; } //namespace MITK #include "mitkDicomDiffusionImageReader.cpp" #endif // __mitkDicomDiffusionImageReader_h diff --git a/Modules/DiffusionImaging/DicomImport/mitkPhilipsDicomDiffusionImageHeaderReader.h b/Modules/DiffusionImaging/DicomImport/mitkPhilipsDicomDiffusionImageHeaderReader.h index 34e8bfde03..39d265c982 100644 --- a/Modules/DiffusionImaging/DicomImport/mitkPhilipsDicomDiffusionImageHeaderReader.h +++ b/Modules/DiffusionImaging/DicomImport/mitkPhilipsDicomDiffusionImageHeaderReader.h @@ -1,47 +1,53 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date: 2008-02-08 13:23:19 +0100 (Fr, 08 Feb 2008) $ Version: $Revision: 13561 $ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #ifndef __mitkPhilipsDicomDiffusionImageHeaderReader_h__ #define __mitkPhilipsDicomDiffusionImageHeaderReader_h__ #include "mitkDicomDiffusionImageHeaderReader.h" namespace mitk { + /** + @brief The PhilipsDicomDiffusionImageHeaderReader class reads in the image header information for the Philips DICOM Format */ class PhilipsDicomDiffusionImageHeaderReader : public DicomDiffusionImageHeaderReader { public: mitkClassMacro( PhilipsDicomDiffusionImageHeaderReader, DicomDiffusionImageHeaderReader ); itkNewMacro(Self); + /** read in the data */ virtual void Update(); protected: + /** Default c'tor */ PhilipsDicomDiffusionImageHeaderReader(); + + /** Default d'tor */ virtual ~PhilipsDicomDiffusionImageHeaderReader(); }; } #endif diff --git a/Modules/DiffusionImaging/DicomImport/mitkSiemensDicomDiffusionImageHeaderReader.h b/Modules/DiffusionImaging/DicomImport/mitkSiemensDicomDiffusionImageHeaderReader.h index 9a9b053537..257bdf2023 100644 --- a/Modules/DiffusionImaging/DicomImport/mitkSiemensDicomDiffusionImageHeaderReader.h +++ b/Modules/DiffusionImaging/DicomImport/mitkSiemensDicomDiffusionImageHeaderReader.h @@ -1,50 +1,59 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date: 2008-02-08 13:23:19 +0100 (Fr, 08 Feb 2008) $ Version: $Revision: 13561 $ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #ifndef __mitkSiemensDicomDiffusionImageHeaderReader_h__ #define __mitkSiemensDicomDiffusionImageHeaderReader_h_ #include "mitkDicomDiffusionImageHeaderReader.h" namespace mitk { + /** + @brief The SiemensDicomDiffusionImageHeaderReader class reads in the header information for the standard Siemens DICOM format + */ class SiemensDicomDiffusionImageHeaderReader : public DicomDiffusionImageHeaderReader { public: mitkClassMacro( SiemensDicomDiffusionImageHeaderReader, DicomDiffusionImageHeaderReader ); itkNewMacro(Self); + /** Extract the key value for the key nameString from the tagString */ int ExtractSiemensDiffusionInformation( std::string tagString, std::string nameString, std::vector& valueArray, int startPos = 0 ); + + /** Extracts the diffusion gradient information from the tagString and stores it into the valueArray vector */ int ExtractSiemensDiffusionGradientInformation( std::string tagString, std::string nameString, std::vector& valueArray); + /** Read the data */ virtual void Update(); protected: - + /** Default c'tor */ SiemensDicomDiffusionImageHeaderReader(); + + /** Default d'tor */ virtual ~SiemensDicomDiffusionImageHeaderReader(); }; } #endif diff --git a/Modules/DiffusionImaging/DicomImport/mitkSiemensMosaicDicomDiffusionImageHeaderReader.h b/Modules/DiffusionImaging/DicomImport/mitkSiemensMosaicDicomDiffusionImageHeaderReader.h index 548e838745..cd561c7842 100644 --- a/Modules/DiffusionImaging/DicomImport/mitkSiemensMosaicDicomDiffusionImageHeaderReader.h +++ b/Modules/DiffusionImaging/DicomImport/mitkSiemensMosaicDicomDiffusionImageHeaderReader.h @@ -1,49 +1,55 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date: 2008-02-08 13:23:19 +0100 (Fr, 08 Feb 2008) $ Version: $Revision: 13561 $ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #ifndef __mitkSiemensMosaicDicomDiffusionImageHeaderReader_h__ #define __mitkSiemensMosaicDicomDiffusionImageHeaderReader_h__ #include "mitkDicomDiffusionImageHeaderReader.h" namespace mitk { + /** + @brief The SiemensMosaicDicomDiffusionImageHeaderReader class reads the image header for diffusion MR data stored in + Siemens MOSAIC Format + */ class SiemensMosaicDicomDiffusionImageHeaderReader : public DicomDiffusionImageHeaderReader { public: - mitkClassMacro( SiemensMosaicDicomDiffusionImageHeaderReader, DicomDiffusionImageHeaderReader ); itkNewMacro(Self); + /** Extracts the information stored under the key nameString in the tagString */ int ExtractSiemensDiffusionInformation( std::string tagString, std::string nameString, std::vector& valueArray ); + /** Read the data */ virtual void Update(); protected: - + /** Default c'tor */ SiemensMosaicDicomDiffusionImageHeaderReader(); - virtual ~SiemensMosaicDicomDiffusionImageHeaderReader(); + /** Default class d'tor */ + virtual ~SiemensMosaicDicomDiffusionImageHeaderReader(); }; } #endif