diff --git a/Modules/DiffusionImaging/DiffusionCore/DicomImport/mitkDiffusionDICOMFileReader.cpp b/Modules/DiffusionImaging/DiffusionCore/DicomImport/mitkDiffusionDICOMFileReader.cpp index 46daf28f1c..38b156b02c 100644 --- a/Modules/DiffusionImaging/DiffusionCore/DicomImport/mitkDiffusionDICOMFileReader.cpp +++ b/Modules/DiffusionImaging/DiffusionCore/DicomImport/mitkDiffusionDICOMFileReader.cpp @@ -1,248 +1,245 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "mitkDiffusionDICOMFileReader.h" #include "mitkDiffusionDICOMFileReaderHelper.h" #include "mitkDiffusionHeaderSiemensDICOMFileReader.h" #include "mitkDiffusionHeaderSiemensMosaicDICOMFileReader.h" #include "mitkDiffusionHeaderGEDICOMFileReader.h" static void PerformHeaderAnalysis( mitk::DiffusionHeaderDICOMFileReader::DICOMHeaderListType headers ) { unsigned int images = headers.size(); unsigned int unweighted_images = 0; unsigned int weighted_images = 0; mitk::DiffusionHeaderDICOMFileReader::DICOMHeaderListType::const_iterator c_iter = headers.begin(); while( c_iter != headers.end() ) { const mitk::DiffusionImageDICOMHeaderInformation h = *c_iter; if( h.baseline ) unweighted_images++; if( h.b_value > 0 ) weighted_images++; ++c_iter; } MITK_INFO << " :: Analyzed volumes " << images << "\n" << " :: \t"<< unweighted_images << " b = 0" << "\n" << " :: \t"<< weighted_images << " b > 0"; } mitk::DiffusionDICOMFileReader::DiffusionDICOMFileReader() { - + m_IsMosaicData = false; } mitk::DiffusionDICOMFileReader::~DiffusionDICOMFileReader() { } bool mitk::DiffusionDICOMFileReader ::LoadImages() { // prepare data reading DiffusionDICOMFileReaderHelper helper; DiffusionDICOMFileReaderHelper::VolumeFileNamesContainer filenames; const size_t number_of_outputs = this->GetNumberOfOutputs(); for( size_t idx = 0; idx < number_of_outputs; idx++ ) { DICOMImageFrameList flist = this->GetOutput(idx).GetImageFrameList(); std::vector< std::string > FileNamesPerVolume; DICOMImageFrameList::const_iterator cIt = flist.begin(); while( cIt != flist.end() ) { FileNamesPerVolume.push_back( (*cIt)->Filename ); ++cIt; } filenames.push_back( FileNamesPerVolume ); } // TODO : only prototyping to test loading of diffusion images // we need some solution for the different types typedef mitk::DiffusionImage DiffusionImageType; DiffusionImageType::Pointer output_image = DiffusionImageType::New(); DiffusionImageType::GradientDirectionContainerType::Pointer directions = DiffusionImageType::GradientDirectionContainerType::New(); double max_bvalue = 0; for( size_t idx = 0; idx < number_of_outputs; idx++ ) { DiffusionImageDICOMHeaderInformation header = this->m_RetrievedHeader.at(idx); if( max_bvalue < header.b_value ) max_bvalue = header.b_value; } // normalize the retrieved gradient directions according to the set b-value (maximal one) for( size_t idx = 0; idx < number_of_outputs; idx++ ) { DiffusionImageDICOMHeaderInformation header = this->m_RetrievedHeader.at(idx); DiffusionImageType::GradientDirectionType grad = header.g_vector; grad.normalize(); grad *= sqrt( header.b_value / max_bvalue ); directions->push_back( grad ); } - bool is_mosaic_file = false; - // FIXME : criterion for testing MOSAIC - /* { - is_mosaic_file = true; - }*/ - // initialize the output image output_image->SetDirections( directions ); output_image->SetReferenceBValue( max_bvalue ); - if( is_mosaic_file ) + if( this->m_IsMosaicData ) { - mitk::MosaicDescriptor mdesc; - // FIXME : will come from the header information - mdesc.nimages = 50; + mitk::DiffusionHeaderSiemensMosaicDICOMFileReader::Pointer mosaic_reader = + dynamic_cast< mitk::DiffusionHeaderSiemensMosaicDICOMFileReader* >( this->m_HeaderReader.GetPointer() ); + // retrieve the remaining meta-information needed for mosaic reconstruction + // it suffices to get it exemplatory from the first file in the file list + mosaic_reader->RetrieveMosaicInformation( filenames.at(0).at(0) ); + + mitk::MosaicDescriptor mdesc = mosaic_reader->GetMosaicDescriptor(); output_image->SetVectorImage( helper.LoadMosaicToVector( filenames, mdesc ) ); } else { output_image->SetVectorImage( helper.LoadToVector( filenames ) ); } output_image->InitializeFromVectorImage(); //output_image->UpdateBValueMap(); // reduce the number of outputs to 1 as we will produce a single image this->SetNumberOfOutputs(1); // set the image to output DICOMImageBlockDescriptor& block = this->InternalGetOutput(0); block.SetMitkImage( (mitk::Image::Pointer) output_image ); return block.GetMitkImage().IsNotNull(); } void mitk::DiffusionDICOMFileReader ::AnalyzeInputFiles() { Superclass::AnalyzeInputFiles(); // collect output from superclass size_t number_of_outputs = this->GetNumberOfOutputs(); if(number_of_outputs == 0) { MITK_ERROR << "Failed to parse input, retrieved 0 outputs from SeriesGDCMReader "; } DICOMImageBlockDescriptor block_0 = this->GetOutput(0); MITK_INFO << "Retrieved " << number_of_outputs << "outputs."; // collect vendor ID from the first output, first image StringList inputFilename; DICOMImageFrameInfo::Pointer frame_0 = block_0.GetImageFrameList().at(0); inputFilename.push_back( frame_0->Filename ); gdcm::Scanner gdcmScanner; gdcm::Tag t_vendor(0x008, 0x0070); gdcm::Tag t_imagetype(0x008, 0x008); // add DICOM Tag for vendor gdcmScanner.AddTag( t_vendor ); // add DICOM Tag for image type gdcmScanner.AddTag( t_imagetype ); gdcmScanner.Scan( inputFilename ); // retrieve both vendor and image type std::string vendor = gdcmScanner.GetValue( frame_0->Filename.c_str(), t_vendor ); std::string image_type = gdcmScanner.GetValue( frame_0->Filename.c_str(), t_imagetype ); MITK_INFO << "Got vendor: " << vendor << " image type " << image_type; - mitk::DiffusionHeaderDICOMFileReader::Pointer header_reader; - // parse vendor tag if( vendor.find("SIEMENS") != std::string::npos ) { if( image_type.find("MOSAIC") != std::string::npos ) { - header_reader = mitk::DiffusionHeaderSiemensMosaicDICOMFileReader::New(); + m_HeaderReader = mitk::DiffusionHeaderSiemensMosaicDICOMFileReader::New(); + this->m_IsMosaicData = true; } else { - header_reader = mitk::DiffusionHeaderSiemensDICOMFileReader::New(); + m_HeaderReader = mitk::DiffusionHeaderSiemensDICOMFileReader::New(); } } else if( vendor.find("GE") != std::string::npos ) { - header_reader = mitk::DiffusionHeaderGEDICOMFileReader::New(); + m_HeaderReader = mitk::DiffusionHeaderGEDICOMFileReader::New(); } else if( vendor.find("PHILIPS") != std::string::npos ) { } else { // unknown vendor } - if( header_reader.IsNull() ) + if( m_HeaderReader.IsNull() ) { MITK_ERROR << "No header reader for given vendor. "; return; } bool canread = false; for( size_t idx = 0; idx < number_of_outputs; idx++ ) { DICOMImageFrameInfo::Pointer frame = this->GetOutput( idx ).GetImageFrameList().at(0); - canread = header_reader->ReadDiffusionHeader(frame->Filename); + canread = m_HeaderReader->ReadDiffusionHeader(frame->Filename); } // collect the information - m_RetrievedHeader = header_reader->GetHeaderInformation(); + m_RetrievedHeader = m_HeaderReader->GetHeaderInformation(); // TODO : Analyze outputs + header information, i.e. for the loading confidence MITK_INFO << "----- Diffusion DICOM Analysis Report ---- "; PerformHeaderAnalysis( m_RetrievedHeader ); MITK_INFO << "==========================================="; } bool mitk::DiffusionDICOMFileReader ::CanHandleFile(const std::string &filename) { //FIXME : return true; } diff --git a/Modules/DiffusionImaging/DiffusionCore/DicomImport/mitkDiffusionDICOMFileReader.h b/Modules/DiffusionImaging/DiffusionCore/DicomImport/mitkDiffusionDICOMFileReader.h index 61889e840d..b1ab0e1018 100644 --- a/Modules/DiffusionImaging/DiffusionCore/DicomImport/mitkDiffusionDICOMFileReader.h +++ b/Modules/DiffusionImaging/DiffusionCore/DicomImport/mitkDiffusionDICOMFileReader.h @@ -1,53 +1,57 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef MITKDIFFUSIONDICOMFILEREADER_H #define MITKDIFFUSIONDICOMFILEREADER_H #include "MitkDiffusionCoreExports.h" #include "mitkDICOMITKSeriesGDCMReader.h" #include "mitkDiffusionHeaderDICOMFileReader.h" namespace mitk { class MitkDiffusionCore_EXPORT DiffusionDICOMFileReader : public DICOMITKSeriesGDCMReader { public: mitkClassMacro( DiffusionDICOMFileReader, DICOMITKSeriesGDCMReader ) mitkCloneMacro( DiffusionDICOMFileReader ) itkNewMacro( DiffusionDICOMFileReader ) virtual void AnalyzeInputFiles(); virtual bool LoadImages(); virtual bool CanHandleFile(const std::string &filename); protected: DiffusionDICOMFileReader(); virtual ~DiffusionDICOMFileReader(); mitk::DiffusionHeaderDICOMFileReader::DICOMHeaderListType m_RetrievedHeader; + + mitk::DiffusionHeaderDICOMFileReader::Pointer m_HeaderReader; + + bool m_IsMosaicData; }; } #endif // MITKDIFFUSIONDICOMFILEREADER_H diff --git a/Modules/DiffusionImaging/DiffusionCore/DicomImport/mitkDiffusionDICOMFileReaderHelper.h b/Modules/DiffusionImaging/DiffusionCore/DicomImport/mitkDiffusionDICOMFileReaderHelper.h index f49742c62f..19a333b436 100644 --- a/Modules/DiffusionImaging/DiffusionCore/DicomImport/mitkDiffusionDICOMFileReaderHelper.h +++ b/Modules/DiffusionImaging/DiffusionCore/DicomImport/mitkDiffusionDICOMFileReaderHelper.h @@ -1,241 +1,243 @@ #ifndef MITKDIFFUSIONDICOMFILEREADERHELPER_H #define MITKDIFFUSIONDICOMFILEREADERHELPER_H #include "mitkDiffusionImage.h" #include "itkImageSeriesReader.h" #include "itkVectorImage.h" #include "itkImageRegionIteratorWithIndex.h" namespace mitk { /** * @brief The MosaicDescriptor struct is a help struct holding the necessary information for * loading a mosaic DICOM file into an MITK file with correct geometry information */ struct MosaicDescriptor { unsigned int nimages; + bool slicenormalup; itk::ImageBase<3>::SpacingType spacing; itk::ImageBase<3>::DirectionType direction; float origin[3]; }; class DiffusionDICOMFileReaderHelper { public: typedef std::vector< std::string > StringContainer; typedef std::vector< StringContainer > VolumeFileNamesContainer; template< typename PixelType, unsigned int VecImageDimension> typename itk::VectorImage< PixelType, VecImageDimension >::Pointer LoadToVector( const VolumeFileNamesContainer& filenames //const itk::ImageBase<3>::RegionType requestedRegion ) { typedef itk::Image< PixelType, 3> InputImageType; typedef itk::ImageSeriesReader< InputImageType > SeriesReaderType; typename SeriesReaderType::Pointer probe_reader = SeriesReaderType::New(); probe_reader->SetFileNames( filenames.at(0) ); probe_reader->GenerateOutputInformation(); const itk::ImageBase<3>::RegionType requestedRegion = probe_reader->GetOutput()->GetLargestPossibleRegion(); MITK_INFO << " --- Probe reader : \n" << " Retrieved LPR " << requestedRegion; typedef itk::VectorImage< PixelType, 3 > VectorImageType; typename VectorImageType::Pointer output_image = VectorImageType::New(); output_image->SetNumberOfComponentsPerPixel( filenames.size() ); output_image->SetSpacing( probe_reader->GetOutput()->GetSpacing() ); output_image->SetOrigin( probe_reader->GetOutput()->GetOrigin() ); output_image->SetDirection( probe_reader->GetOutput()->GetDirection() ); output_image->SetLargestPossibleRegion( probe_reader->GetOutput()->GetLargestPossibleRegion() ); output_image->SetBufferedRegion( requestedRegion ); output_image->Allocate(); itk::ImageRegionIterator< VectorImageType > vecIter( output_image, requestedRegion ); VolumeFileNamesContainer::const_iterator volumesFileNamesIter = filenames.begin(); // iterate over the given volumes unsigned int component = 0; while( volumesFileNamesIter != filenames.end() ) { MITK_INFO << " ======== Loading volume " << component+1 << " of " << filenames.size(); typename SeriesReaderType::Pointer volume_reader = SeriesReaderType::New(); volume_reader->SetFileNames( *volumesFileNamesIter ); try { volume_reader->UpdateLargestPossibleRegion(); } catch( const itk::ExceptionObject &e) { mitkThrow() << " ITK Series reader failed : "<< e.what(); } itk::ImageRegionConstIterator< InputImageType > iRCIter ( volume_reader->GetOutput(), volume_reader->GetOutput()->GetLargestPossibleRegion() ); // transfer to vector image iRCIter.GoToBegin(); vecIter.GoToBegin(); while( !iRCIter.IsAtEnd() ) { typename VectorImageType::PixelType vector_pixel = vecIter.Get(); vector_pixel.SetElement( component, iRCIter.Get() ); vecIter.Set( vector_pixel ); ++vecIter; ++iRCIter; } ++volumesFileNamesIter; component++; } return output_image; } /** * Create the vector image for the resulting diffusion image from a mosaic DICOM image set, * The method needs to be provided with the MosaicDescriptor struct to be able to compute the * correct index and to set the geometry information of the image itself. */ template< typename PixelType, unsigned int VecImageDimension> typename itk::VectorImage< PixelType, VecImageDimension >::Pointer LoadMosaicToVector( const VolumeFileNamesContainer& filenames, MosaicDescriptor mosaicInfo ) { typedef itk::Image< PixelType, 3> MosaicImageType; typedef itk::ImageFileReader< MosaicImageType > SingleImageReaderType; // generate output typedef itk::VectorImage< PixelType, 3 > VectorImageType; VolumeFileNamesContainer::const_iterator volumesFileNamesIter = filenames.begin(); // probe the first file to retrieve the size of the 2d image // we need this information to compute the index relation between mosaic and resulting 3d position // but we need it only once typename SingleImageReaderType::Pointer mosaic_probe = SingleImageReaderType::New(); mosaic_probe->SetFileName( (*volumesFileNamesIter).at(0) ); try { mosaic_probe->UpdateLargestPossibleRegion(); } catch( const itk::ExceptionObject &e) { mitkThrow() << " ITK Image file reader failed : "<< e.what(); } typename MosaicImageType::RegionType mosaic_lpr = mosaic_probe->GetOutput()->GetLargestPossibleRegion(); MITK_INFO << " == MOSAIC: " << mosaic_lpr; itk::ImageBase<3>::SizeValueType images_per_row = ceil( sqrt( mosaicInfo.nimages ) ); itk::ImageBase<3>::RegionType requestedRegion; requestedRegion.SetSize( 0, mosaic_lpr.GetSize()[0]/images_per_row); requestedRegion.SetSize( 1, mosaic_lpr.GetSize()[1]/images_per_row); requestedRegion.SetSize( 2, mosaicInfo.nimages); typename VectorImageType::Pointer output_image = VectorImageType::New(); output_image->SetNumberOfComponentsPerPixel( filenames.size() ); /* FIXME!!! The struct currently does not provide the geometry information - the loading works as required + the loading works as required*/ output_image->SetSpacing( mosaicInfo.spacing ); - output_image->SetOrigin( mosaicInfo.origin ); + /*output_image->SetOrigin( mosaicInfo.origin ); output_image->SetDirection( mosaicInfo.direction );*/ output_image->SetLargestPossibleRegion( requestedRegion ); output_image->SetBufferedRegion( requestedRegion ); output_image->Allocate(); itk::ImageRegionIteratorWithIndex< VectorImageType > vecIter( output_image, requestedRegion ); // hold the image sizes in an extra variable ( used very often ) typename MosaicImageType::SizeValueType dx = requestedRegion.GetSize()[0]; typename MosaicImageType::SizeValueType dy = requestedRegion.GetSize()[1]; // iterate over the given volumes unsigned int component = 0; while( volumesFileNamesIter != filenames.end() ) { MITK_INFO << " ======== Loading volume " << component+1 << " of " << filenames.size(); typename SingleImageReaderType::Pointer mosaic_reader = SingleImageReaderType::New(); mosaic_reader->SetFileName( (*volumesFileNamesIter).at(0) ); try { mosaic_reader->UpdateLargestPossibleRegion(); } catch( const itk::ExceptionObject &e) { mitkThrow() << " ITK Image file reader failed : "<< e.what(); } typename MosaicImageType::Pointer current_mosaic = mosaic_reader->GetOutput(); vecIter.GoToBegin(); while( !vecIter.IsAtEnd() ) { typename VectorImageType::PixelType vector_pixel = vecIter.Get(); typename VectorImageType::IndexType threeD_index = vecIter.GetIndex(); typename MosaicImageType::IndexType mosaic_index; mosaic_index[2] = 1; // first find the corresponding tile in the mosaic // this is defined by the z-position of the vector (3D) image iterator // in x : z_index % #images_in_grid // in y : z_index / #images_in_grid // // the remaining is just computing the correct position in the mosaic, done by // --------- index of (0,0,z) ----- + --- current 2d position --- - mosaic_index[0] = (threeD_index[2] % images_per_row) * dx + threeD_index[0]; + mosaic_index[0] = (threeD_index[2] % images_per_row) * dx + threeD_index[0] + images_per_row; mosaic_index[1] = (threeD_index[2] / images_per_row) * dy + threeD_index[1]; typename MosaicImageType::PixelType mosaic_pixel = current_mosaic->GetPixel( mosaic_index ); vector_pixel.SetElement( component, mosaic_pixel ); + vecIter.Set( vector_pixel ); ++vecIter; } ++volumesFileNamesIter; component++; } return output_image; } }; } #endif // MITKDIFFUSIONDICOMFILEREADERHELPER_H diff --git a/Modules/DiffusionImaging/DiffusionCore/DicomImport/mitkDiffusionHeaderSiemensMosaicDICOMFileReader.cpp b/Modules/DiffusionImaging/DiffusionCore/DicomImport/mitkDiffusionHeaderSiemensMosaicDICOMFileReader.cpp index f9c6a16049..9779892b5e 100644 --- a/Modules/DiffusionImaging/DiffusionCore/DicomImport/mitkDiffusionHeaderSiemensMosaicDICOMFileReader.cpp +++ b/Modules/DiffusionImaging/DiffusionCore/DicomImport/mitkDiffusionHeaderSiemensMosaicDICOMFileReader.cpp @@ -1,81 +1,120 @@ #include "mitkDiffusionHeaderSiemensDICOMFileHelper.h" #include "mitkDiffusionHeaderSiemensMosaicDICOMFileReader.h" +#include + mitk::DiffusionHeaderSiemensMosaicDICOMFileReader::DiffusionHeaderSiemensMosaicDICOMFileReader() : DiffusionHeaderSiemensDICOMFileReader() { } mitk::DiffusionHeaderSiemensMosaicDICOMFileReader ::~DiffusionHeaderSiemensMosaicDICOMFileReader() { +} + +void mitk::DiffusionHeaderSiemensMosaicDICOMFileReader +::RetrieveMosaicInformation(std::string filename) +{ + gdcm::Reader gdcmReader; + gdcmReader.SetFileName( filename.c_str() ); + + gdcmReader.Read(); + const gdcm::DataSet& dataset = gdcmReader.GetFile().GetDataSet(); + + // (0018,0088) DS [2.5] # 4, 1 SpacingBetweenSlices + // important for mosaic data + std::string spacing_between_slices; + if( RevealBinaryTag( gdcm::Tag(0x0018, 0x0088 ), dataset, spacing_between_slices ) ) + { + std::istringstream ifs_spacing(spacing_between_slices ); + ifs_spacing >> this->m_MosaicDescriptor.spacing[2]; + } + + //(0028,0030) DS [2.5\2.5] # 8, 2 PixelSpacing + std::string inplace_spacing; + if( RevealBinaryTag( gdcm::Tag(0x0028, 0x0030 ), dataset, inplace_spacing ) ) + { + std::stringstream iplss( inplace_spacing ); + std::string buffer; + unsigned int idx=0; + while( std::getline( iplss, buffer, '\\' ) ) + { + std::istringstream substream(buffer); + substream >> this->m_MosaicDescriptor.spacing[idx++]; + } + } + + } bool mitk::DiffusionHeaderSiemensMosaicDICOMFileReader ::ReadDiffusionHeader(std::string filename) { gdcm::Reader gdcmReader; gdcmReader.SetFileName( filename.c_str() ); gdcmReader.Read(); MITK_INFO << " -- Analyzing: " << filename; const gdcm::DataSet& dataset = gdcmReader.GetFile().GetDataSet(); const gdcm::Tag t_sie_diffusion( 0x0029,0x1010 ); std::string siemens_diffusionheader_str; + if( RevealBinaryTag( t_sie_diffusion, dataset, siemens_diffusionheader_str ) ) { mitk::DiffusionImageMosaicDICOMHeaderInformation header_values; - this->ExtractSiemensDiffusionTagInformation( siemens_diffusionheader_str, header_values ); - //MITK_INFO << siemens_diffusionheader_str; - mitk::SiemensDiffusionHeaderType hformat = GetHeaderType( siemens_diffusionheader_str ); Siemens_Header_Format specs = this->m_SiemensFormatsCollection.at( hformat ); std::string::size_type tag_position = siemens_diffusionheader_str.find( "NumberOfImagesInMosaic", 0 ); if( tag_position != std::string::npos ) { std::vector value_array; ParseInputString( siemens_diffusionheader_str.substr( tag_position, siemens_diffusionheader_str.size() - tag_position + 1 ), value_array, specs ); header_values.n_images = value_array[0]; + this->m_MosaicDescriptor.nimages = value_array[0]; } tag_position = siemens_diffusionheader_str.find("SliceNormalVector", 0); if( tag_position != std::string::npos ) { std::vector value_array; ParseInputString( siemens_diffusionheader_str.substr( tag_position, siemens_diffusionheader_str.size() - tag_position + 1 ), value_array, specs ); MITK_DEBUG << "SliceNormal"; for( unsigned int i=0; i 2 ) { header_values.slicenormalup = (value_array[2] > 0); + this->m_MosaicDescriptor.slicenormalup = ( value_array[2] > 0); } } + + m_HeaderInformationList.push_back( header_values ); } return (m_HeaderInformationList.size() > 0); } diff --git a/Modules/DiffusionImaging/DiffusionCore/DicomImport/mitkDiffusionHeaderSiemensMosaicDICOMFileReader.h b/Modules/DiffusionImaging/DiffusionCore/DicomImport/mitkDiffusionHeaderSiemensMosaicDICOMFileReader.h index ebed47c4e1..dd5eb97716 100644 --- a/Modules/DiffusionImaging/DiffusionCore/DicomImport/mitkDiffusionHeaderSiemensMosaicDICOMFileReader.h +++ b/Modules/DiffusionImaging/DiffusionCore/DicomImport/mitkDiffusionHeaderSiemensMosaicDICOMFileReader.h @@ -1,43 +1,53 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef MITKDIFFUSIONHEADERSIEMENSMOSAICDICOMFILEREADER_H #define MITKDIFFUSIONHEADERSIEMENSMOSAICDICOMFILEREADER_H #include "mitkDiffusionHeaderSiemensDICOMFileReader.h" +#include "mitkDiffusionDICOMFileReaderHelper.h" namespace mitk { -class DiffusionHeaderSiemensMosaicDICOMFileReader +class MitkDiffusionCore_EXPORT DiffusionHeaderSiemensMosaicDICOMFileReader : public DiffusionHeaderSiemensDICOMFileReader { public: mitkClassMacro( DiffusionHeaderSiemensMosaicDICOMFileReader, DiffusionHeaderSiemensDICOMFileReader ) itkNewMacro( Self ) virtual bool ReadDiffusionHeader(std::string filename); + mitk::MosaicDescriptor GetMosaicDescriptor() + { + return m_MosaicDescriptor; + } + + void RetrieveMosaicInformation(std::string filename); + protected: DiffusionHeaderSiemensMosaicDICOMFileReader(); virtual ~DiffusionHeaderSiemensMosaicDICOMFileReader(); + + mitk::MosaicDescriptor m_MosaicDescriptor; }; } #endif // MITKDIFFUSIONHEADERSIEMENSMOSAICDICOMFILEREADER_H