[ITK] [ITK-users] UnsharpMaskLevelSetImageFilter form .dcm Volume

JoseBarretoT jose.de.paula at live.com
Wed Mar 9 08:11:45 EST 2016


Hello,
I'm trying to use itk :: UnsharpMaskLevelSetImageFilter for a volume type
mhd (.dcm [DICOMS]). First I tried to use the type of images
typedef itk :: Image <short, 3> ImageType,
but I did not succeed, because the class had no templente for this type.

created a typedef type itk :: Image <float, 3> ImageType2 image, but I
believe that something is wrong, since the filter takes more than 1 hour
processing, and from a 20mb file exceeds 2GB memories used.

this is my code:

void MyForm::LoadFilter()
{
	typedef itk::Image<short, 3> ImageType;
	typedef itk::Image<float, 3 > ImageType2;


	itk::GDCMImageIOFactory::RegisterOneFactory();
	itk::MetaImageIOFactory::RegisterOneFactory();

	typedef itk::ImageFileReader< ImageType2 > ReaderType;
	typedef itk::ImageToVTKImageFilter< ImageType2 > ConnectorType;
	typedef itk::UnsharpMaskLevelSetImageFilter<ImageType2, ImageType2>
Unsharp;
		
	
	Unsharp::Pointer unsharFilter = Unsharp::New();

	ConnectorType::Pointer connectorvktitk = ConnectorType::New();

	ReaderType::Pointer reader1 = ReaderType::New();
	reader1->SetFileName("D:\\31panoramica.mhd");
	reader1->Update();

	unsharFilter->SetInput(reader1->GetOutput());
	unsharFilter->SetMaxFilterIteration(99);
	unsharFilter->SetNormalProcessUnsharpWeight(0.4);	
	unsharFilter->Update();

	connectorvktitk->SetInput(unsharFilter->GetOutput());
	connectorvktitk->Update();

	imageViewer2->SetInputData(connectorvktitk->GetOutput());
	vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor =
vtkSmartPointer<vtkRenderWindowInteractor>::New();
	imageViewer2->SetupInteractor(renderWindowInteractor);
	
	imageViewer2->SetSliceOrientationToXZ();
	imageViewer2->Render();
	imageViewer2->GetRenderer()->ResetCamera();
	imageViewer2->Render();

}
please can anyone tell me what am I doing wrong?



--
View this message in context: http://itk-insight-users.2283740.n2.nabble.com/UnsharpMaskLevelSetImageFilter-form-dcm-Volume-tp7588568.html
Sent from the ITK Insight Users mailing list archive at Nabble.com.
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list