Hi Annabelle,
to better help you it would help us if you could provide more context.
Where did you put the code below? (In a MITK module, contained in a
separate project; somewhere in the MITK source tree itself; etc.).
Please also post the code which "didn't work" so we know what you
already tried.
Best,
Sascha
On 02/18/2014 02:02 PM, Annabelle Dupuis wrote:
Hi guys :) , I just stated using MITK and I would like to apply a
simple filter from the ITK examples one a picture:
CODE:--------------------------------------------------------------------------------------------
#include "itkImage.h"
#include "itkImageFileReader.h"
#include "itkImageFileWriter.h"
#include "itkGradientMagnitudeRecursiveGaussianImageFilter.h"
#include "QuickView.h"
int main(int argc,char * argv[])
{
// Verify command line arguments
if( argc< 2 )
{
std::cerr << "Usage:" << std::endl;
std::cerr << argv[0] << " inputImageFile" << std::endl;
return EXIT_FAILURE;
}
// Parse command line arguments
std::string inputFilename= argv[1];
// Setup types
typedef itk::Image< float,2 > FloatImageType;
typedef itk::Image< unsigned char,2 > UnsignedCharImageType;
typedef itk::ImageFileReader< UnsignedCharImageType> readerType;
typedef itk::GradientMagnitudeRecursiveGaussianImageFilter<
UnsignedCharImageType, FloatImageType> filterType;
// Create and setup a reader
readerType::Pointer reader= readerType::New();
reader->SetFileName( inputFilename.c_str() );
// Create and setup a gradient filter
filterType::Pointer gradientFilter= filterType::New();
gradientFilter->SetInput( reader->GetOutput() );
QuickView viewer;
viewer.AddImage<UnsignedCharImageType>(reader->GetOutput());
viewer.AddImage<FloatImageType>(gradientFilter->GetOutput());
viewer.Visualize();
return EXIT_SUCCESS;
}
CODE---------------------------------------------------------------------------
So, the things is that everything goes alrightuntil the image rendering phaseas
QuickView is not a library in MITK.
I would like hence to have some help to print the images that have been
processed.
I tried to use the datastorag and the renderingWindow like in the tutorial but
it did not work :(.
Anyone to help me?
Thank you :)
Anna
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users