Пример #1
0
mitk::TestDICOMLoading::ImageList mitk::TestDICOMLoading::LoadFiles( const StringContainer& files )
{
  for (StringContainer::const_iterator iter = files.begin();
       iter != files.end();
       ++iter)
  {
    MITK_DEBUG << "File " << *iter;
  }

  ImageList result;

  DicomSeriesReader::FileNamesGrouping seriesInFiles = DicomSeriesReader::GetSeries( files, true );

  // TODO sort series UIDs, implementation of map iterator might differ on different platforms (or verify this is a standard topic??)
  for (DicomSeriesReader::FileNamesGrouping::const_iterator seriesIter = seriesInFiles.begin();
       seriesIter != seriesInFiles.end();
       ++seriesIter)
  {
    StringContainer files = seriesIter->second.GetFilenames();

    DataNode::Pointer node = DicomSeriesReader::LoadDicomSeries( files );

    if (node.IsNotNull())
    {
      Image::Pointer image = dynamic_cast<mitk::Image*>( node->GetData() );

      result.push_back( image );
    }
    else
    {
    }
  }

  return result;
}
Пример #2
0
  bool SegmentationSink::ReadyToRun()
  {
    Image::Pointer image;
    GetPointerParameter("Input", image);

    DataNode::Pointer groupNode;
    GetPointerParameter("Group node", groupNode);

    return image.IsNotNull() && groupNode.IsNotNull();
  }
Пример #3
0
  DataNode *SegmentationSink::LookForPointerTargetBelowGroupNode(const char *name)
  {
    DataNode::Pointer groupNode;
    GetPointerParameter("Group node", groupNode);

    if (groupNode.IsNotNull() && m_DataStorage.IsNotNull())
    {
      return m_DataStorage->GetNamedDerivedNode(name, groupNode, true);
    }

    return nullptr;
  }