[Insight-users] contributions to insight applications
Lino Ramirez
ramirez at ece.ualberta.ca
Thu Oct 28 09:59:35 EDT 2004
Hi Luis,
Here is a small modification for
InsightApplications-1.8.0/ThresholdSegmentationLevelSetFltkGui that I
found useful. I added a small eraser check button to
SegmenterConsoleGUI.fl
and made these changes in the file
SegmenterConsole.cxx
in void SegmenterConsole::GetClickPoints(float x, float y)
add the line
WriteImageType::PixelType initialValue2 = 255;
at the top of the method
and change the line
m_guessImage->SetPixel(pixelIndex2, 0);
with
if (eraseGuess->value() < 1)
{
m_guessImage->SetPixel(pixelIndex2, 0);
}
else
{
m_guessImage->SetPixel(pixelIndex2, initialValue2);
}
These small changes are useful when you are new to ITK and you just want
to test the applications.
You can download the modified source code from
http://www.ece.ualberta.ca/~ramirez/itk/NewThresholdSegmentationLevelSetFltkGui
note that the modified CMakeLists.txt file is available at
http://www.ece.ualberta.ca/~ramirez/itk/
I also did a small modification that consisted in adding a method to
deleteLastClickedPointsStored in
C:\InsightApplications-1.8.0\Auxiliary\FltkImageViewer\SliceView.h
as the name indicates, this method adds the capability of deleting only
the latest clicked point from the buffer. The actual implementation only
lets you clear the buffer.
I wrote a small application to test the method. The source code is
available at
http://www.ece.ualberta.ca/~ramirez/itk/SquareCornersPointSelection/
In this application, you select the 4 corners of a vertebra (or a square
region) and click show body and you get the selection highlighted and the
area in pixels computed.
Notes:
1.- This application is based on the GUI of
ThresholdSegmentationLevelSetFltkGui.
2.- In the image viewer GUI I added a reset button. It does the same that
the r key
3.- This application is part of a larger application that I am developing
for my research: the segmentation of vertebrae from x-ray images of
patients with scoliosis
4.- one image you could use for testing the code is available at
http://www.ece.ualberta.ca/~ramirez/itk/
This image is an x-ray of my lumbar spine so no worries about freely
distributing it
I think these small contributions could be useful for other itk users.
Please, let me know if you need more information or if you have any
problem with the files
Have a nice day
Lino
More information about the Insight-users
mailing list