[Insight-users] Filter slowing down

Hoole, Andrew andrew.hoole at addenbrookes.nhs.uk
Tue Jun 13 03:58:50 EDT 2006


Hi All 

Sorry I've got another question. I asked about a slow AHE Filter. It was
taking ~15sec to do a 512x512 16bit image using a image size window of 8x8.
What is puzzling me more now is the fact that if I run the filter repeatedly
on the same image (i.e. applying filter and then applying it again and then
again) the process time seems to go up for each iteration. 
1st - ~15sec
2nd - ~55sec
3rd - ~65sec

The code of the filter is given below:

void CImageAxCtrl::OnImage2EnhanceAHE() 
{
	typedef
itk::AdaptiveHistogramEqualizationImageFilter<InputImageType> AHEFilterType;
	AHEFilterType::Pointer AHEFilter = AHEFilterType::New();

	AHEFilter->SetAlpha(0);
	AHEFilter->SetBeta(1);

	AHEFilterType::ImageSizeType ImageSize;
	ImageSize[0] = 8;
	ImageSize[1] = 8;
	AHEFilter->SetRadius(ImageSize);

	AHEFilter->SetInput(m_SecondaryImage);
	AHEFilter->Update();

	m_SecondaryImage = AHEFilter->GetOutput();
	m_SecondaryImage->DisconnectPipeline();

	// Force a redraw
	RedrawWindow(NULL,NULL,RDW_INVALIDATE | RDW_UPDATENOW);
}

Any ideas why this might be. Also I would still appreciate any ideas related
to the absolute speed of the filter. 

Many thanks 

Andrew Hoole
 

-----Original Message-----
From: Hoole, Andrew [mailto:andrew.hoole at addenbrookes.nhs.uk] 
Sent: 12 June 2006 15:59
To: insight-users at itk.org
Subject: [Insight-users] Adaptive Histogram Equalization

Hi 

I am using the AHE filter on an image of 512x512 resolution, 16 bit. An
image size of 8x8 for the filter takes ~15sec to run and increases in the
image size of the filter push this time up to unacceptable levels. I have
seen this function running extremely quickly on other systems. Is there
anyway to improve the performance?

Andrew Hoole

 

-----Original Message-----
From: Laurent PAUL [mailto:Laurent.Paul at orto.ucl.ac.be] 
Sent: 12 June 2006 11:15
To: insight-users at itk.org
Subject: Re: [Insight-users] Reslice volume according to 'Image Orientation'
Dicom tag.

Hi users,

Now I've got another problem.
For the moment I use origin of the initial volume but for volumes widely
rotated initially, the transformed volume is 'only' a piece of the intial
volume. I'd want to get, not the whole volume, I know it's impossible, but
at least entire slices (when there are).
I guess I need to transform the origin and pass it to the resampleFilter
as OutputOrigin.
Am I right?

I looked for a way to transform a point and I found that I can call the
TransformPoint() method from any Transform.
The problem is that I don't know which type of transform
ResampleImageFilter use when setting OutputDirection.

Any advice concerning correct origin setting would be great!

Thanks,

Laurent.




Hi!

I tried with OrientImageFilter , but I can only orient image following
predefined orientation (RIP, LIP...).
If I well understood, it does the same job as flip filter, isn't it?

I found an example in ITK!
For people interested in, it is ResampleOrientedImageFilter.cxx in
ITK-2.6.0\Examples\Filtering.

Laurent.



> Laurent PAUL wrote:
>> Hi users,
>> I get images with Image Orientation Dicom tag non equal to 1\0\0\0\1\0.
I'd want to align rows and columns respectively on X and Y axes. I know
there a class in VTK to reslice volume (great to dispaly
coronal,
>> sagittal and transversal views!).
>> Is there an equivalent class in ITK which reslices the volume using
Direction cosines?
> You can use the OrientImageFilter to get a new image which has direction
cosines close to 1 0 0 , 0 1 0 , 0 0 1 .
>> Thanks,
>> Laurent.
>> _______________________________________________
>> Insight-users mailing list
>> Insight-users at itk.org
>> http://www.itk.org/mailman/listinfo/insight-users
> --
> Simon














_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users
_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list