[Insight-developers] two-input filters don't work

Kevin H. Hobbs hobbsk at ohiou.edu
Thu Sep 17 13:30:25 EDT 2009


Michael, sorry for the "dupe" due to the list's file size limit I'm
resending this. The images I mention are at :

http://crab-lab.zool.ohiou.edu/kevin/two-input_filters

On Tue, 2009-09-08 at 12:20 +0200, Michael Xanadu wrote:
> Hi Kevin,
> 
> thank you for your reply. 
> I looked at my feature image and initial level set image and found
> out, that both images suit your requirements. Actually, all level set
> filters work fine with image files, like it's described in the manual.
> But when I use an itk::GDCMImageIO as input - forget about it...

The type of reader ( DICOM, RAW, META, VTK, ... ) does not matter. Only
the information in the image matters. That is : are the values broadly
distributed across the possible range of the data type of each pixel?
Are the edges clearly defined? Is there a lot of noise? ...

> The clue is: Fast Marching Segmentation is the only one, which works
> with dicom, 

The fast marching filter used in the examples and in the code snippet
you posted to the list is not given any input, a constant speed is set,
and the output size is simply copied from the input image.

The result of all of this is that the output of the fast marching filter
is at each pixel just the distance from the seed point.

> the other three level set filters (Shape detection, Geodesic active
> contours, Threshold Level Set) lead to the white spot I decribed in
> the last mail. That led me to believe that the problem has something
> to do with the "two-input" filters.

Absolutely! Since these require two inputs the need to have evrything
about the inputs "just so" is multiplied ( exponentiated ).

> Do you have any further information for me how to solve the problem?
> If not, I think I have to learn the hard way, like you. :-( 

Sorry, it's the hard way for you. Ask for help at any step of the
following. I'll be listening and I'm sure others will be too.

The best recommendation I have is that you should :

1) Write a small program that :
  1.1) reads your DICOM image
  1.2) smooths it
  1.3) writes the smoothed image out to an ".mhd" / ".raw" file pair.

2) Write a small program that :
  2.1) reads your smoothed image
  2.2) takes the gradient magnitude
  2.3) writes to a MHD file

3) Examine the smoothed image and its gradient magnitude image in
paraview, slicer, or whatever.

4) Repeat 1 and 2 until you get a decent gradient magnitude image. 

5) Send a rendering of a slice through the image and gradient magnitude
to the list to make sure everything looks good. I've attached a
rendering of mine with an original image, a smoothed version, and the
gradient magnitude image.

6) Write a small program that :
  6.1) reads your gradient magnitude image
  6.2) flips the values with the sigmoid filter
  6.3) writes it to a file

7) Look at it.

8) Send it to the list. I've attached one of mine.

9) Write a small program that :
  9.1) reads your smoothed gradient magnitude sigmoid image
  9.2) uses it as the speed image for fast marching
  9.3) writes the output to a file

10) Look at it.

11) Send it to the list. I can't show you this since I used the
VectorConfidenceConnected filter to make my initial segmentation.

12) write a small program that :
  12.1) reads your smoothed gradient magnitude sigmoid fast marching
	image
  12.2) subtracts a constant from it
  12.3) reads the output from 6) the smoothed gradient magnitude
	sigmoid image
  12.4) sets these as the feature andinitial images to one of the
	"two-input" filters
  12.5) writes the output to a file

13) look at it

14) Run around the lab whooping. (I did)

15) send it to the list. I've attached one of mine.


  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20090917/6dcc475d/attachment.pgp>


More information about the Insight-developers mailing list