Ok, here's how you create a CmdLet that uses DotImage:

1 Download the attached zip open the solution

2. Build it -- my dll is named AtalasoftSnapin.dll

Here is the code for GetImage.cs, the implementation of the get-image cmdlet

using System;

using System.ComponentModel;

using System.Management.Automation;


using Atalasoft.Imaging;


namespace Atalasoft.Commands


      // the name of the cmdlet is get-image

      [Cmdlet("Get", "Image")]

      public class GetImageCommand : Cmdlet


            private string _filename;


            // it has one parameter and it is mandatory

            // and can be piped in

            [Parameter(Mandatory=true, Position=0,


            public string Filename



                        return _filename;



                  set {

                        _filename = value;




            protected override void BeginProcessing()




            // take the string they pass, treat it as

            // a filename, and load it into an image

            protected override void ProcessRecord()



                   new AtalaImage(_filename));     



            protected override void EndProcessing()





3. Install it with these lines in Powershell

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\installutil AtalasoftSnapin.dll

add-pssnapin AtalasoftSnapin

4. Now in Powershell, you can type

> get-image "full path to image"
> dir *.jpg | get-image

After adding in the cmdlets for gray-image and combinechannels-image, you can now create the red-blue 3D images I showed.

1. Take two pictures, one with your left eye, and one with your right
2. Make them both gray:

> get-image "path to image" | gray-image | save-image "output image"

3. And now put the left image in the red channel, and the right image in the blue and green.

> combinechannels-image -r (get-image "left image") -g (get-image "right image") -b (get-image "right image") | save-image "3d image"

replace "left image" and "right image" with the names of your gray images. replace "3d image" with the name of your output image

You might think that the whole point of the presentation was to get this picture (click for larger version):

But, it's not -- the point of the presentation is to get this picture:


A solution with my code is attached below.