mitk::ToFVisualizationFilter::ToFVisualizationFilter()
{
  this->m_ImageWidth = 0;
  this->m_ImageHeight = 0;
  this->m_ImageSize = 0;

  this->m_MitkDistanceImage = NULL;
  this->m_MitkAmplitudeImage = NULL;
  this->m_MitkIntensityImage = NULL;

  this->m_Widget1ColorTransferFunction = NULL;
  this->m_Widget2ColorTransferFunction = NULL;
  this->m_Widget3ColorTransferFunction = NULL;

  SetImageType(this->m_Widget1ImageType, 0);
  SetImageType(this->m_Widget2ImageType, 1);
  SetImageType(this->m_Widget3ImageType, 2);

  OutputImageType::Pointer output0 = static_cast<OutputImageType*>(this->MakeOutput(0).GetPointer());
  OutputImageType::Pointer output1 = static_cast<OutputImageType*>(this->MakeOutput(1).GetPointer());
  OutputImageType::Pointer output2 = static_cast<OutputImageType*>(this->MakeOutput(2).GetPointer());

  SetNumberOfRequiredOutputs(3);
  SetNthOutput(0, output0.GetPointer());
  SetNthOutput(1, output1.GetPointer());
  SetNthOutput(2, output2.GetPointer());

}
Ejemplo n.º 2
0
mitk::USDiPhASDevice::USDiPhASDevice(std::string manufacturer, std::string model)
	: mitk::USDevice(manufacturer, model), m_ControlsProbes(mitk::USDiPhASProbesControls::New(this)),
	m_ImageSource(mitk::USDiPhASImageSource::New(this)),
  m_ControlInterfaceCustom(mitk::USDiPhASCustomControls::New(this)),
  m_IsRunning(false),
  m_BurstHalfwaveClockCount(7),
  m_Interleaved(true)  
{
  m_NumberOfOutputs = 2;
  this->SetNumberOfIndexedOutputs(m_NumberOfOutputs);

  SetNthOutput(0, this->MakeOutput(0));
  SetNthOutput(1, this->MakeOutput(1));
}
Ejemplo n.º 3
0
    void GenerateData()
      {       
      mitk::USImage::Pointer ni = this->GetInput(0);
      mitk::USImage::Pointer result = mitk::USImage::New();

      result->Initialize(ni);
      result->SetImportVolume(ni->GetData());

      mitk::USImageMetadata::Pointer meta = ni->GetMetadata();
      meta->SetDeviceComment("Test");
      result->SetMetadata(meta);
      SetNthOutput(0, result);
      };
Ejemplo n.º 4
0
    void GenerateData()
    {
        mitk::USImage::Pointer ni = this->GetInput(0);
        mitk::USImage::Pointer result = mitk::USImage::New();

        try
        {
            mitk::Image::Pointer image = ni.GetPointer();
            mitk::ImageWriteAccessor imgA(image, image->GetVolumeData(0));
            result->Initialize(image);
            result->SetImportVolume(imgA.GetData());
            mitk::USImageMetadata::Pointer meta = ni->GetMetadata();
            meta->SetDeviceComment("Test");
            result->SetMetadata(meta);
            SetNthOutput(0, result);
        }
        catch(mitk::Exception& e)
        {
            std::stringstream msg;
            msg << "Cannot open image for reading: " << e.GetDescription();
            MITK_TEST_FAILED_MSG(<<msg.str());
        }
    };