Adding a band to an image raster.

I am writing a geomatics program that takes GeoTiff images as input and allows the users to run analysis on these images. I would like the results of the analysis to become part of the image as a new band (in addition to the RGB bands). How can I do that? It would also be useful to know how to remove bands, or select which bands to be displayed.
I am also using the GeoTools API in case someone has experience with it.

I suggest a google search using these qualifiers: "java jai geotiff"
If it is going to be supported in Oracle Java, it will be in the JAI package.

Similar Messages

  • How do I stop Photoshop Elements 12 from adding a caption to my image?

    How do I stop Photoshop Elements 12 Editor from adding a caption to my image?  It is automatically adding the name of my camera (as a caption) to the file any time I make a change in the Editor.  Then I have to manually delete them.

    That's not Elements which writes the Camera model in the exif, that's your camera. It's a common complaint with Olympus.
    Solution (edited)
    Use the 'Find' menu to select the files starting with the offending caption (Olympus, for instance). Highlight all selected files and right click; select the option to add a caption; leave the caption blank and click enter; you'll be prompted if you want to delete the captions : you do.
    See also:
    http://www.johnrellis.com/psedbtool/photoshop-elements-faq.htm#_Camera_name_appears

  • Java imaging  raster bands

    Urgent,
    Do any1 konws the meaning of band and raster in java imaging?
    How to use raster to partition the pic and determine the location of a pixel at a picture?
    Thanks.

    any1 know?

  • How to remove banding from exported images (png, tiff) from illustrator layout with gradient

    is there any way to remove or reduce banding that I am getting in a layout I've done that contains a gradient? I am exporting raster images (png or tiff) and there is a noticeable stepping of tonalities, rather than a smooth shift
    thanks

    In an 8bit format like PNG you only have 1024 unique levels...
    1024 is 10 bits. 8 bits is 256.
    But PNG is an RGB 8-bit per channel format. That yields 256^3 (i.e.; 24-bit or 16.7 million) potential "levels" (colors).
    ...banding that I am getting in a layout...
    Banding that you are getting where?
    What are the specific color values involved?
    What is the final use?
    What will be the distance across the gradient in its final use?
    You have to consider whether the banding is actually in the raster image, or if it is merely an artifact of where/how the image is being viewed.
    Banding is not a simple matter of image color depth. Banding is a device-dependent phenomena. The banding you see on your monitor is not the same banding that will be seen on your grayscale laser printer; is not the same banding that will be seen on your CMYK inkjet printer; is not the same banding that will be seen on press. Banding in print is generally more a function of levels of gray (per separation) of the imaging device, and can vary depending on the halftone ruling (assuming conventional AM screening).
    Depending on the answers to the questions above, you may very well be fretting over nothing.
    JET

  • Adding "loading" movieclip to dynamic image gallery?

    Hello again,
    I've completed my XML-driven image gallery, however upon live testing I'd realized I made a rookie mistake and not put some kind of placeholder "loading" movie clip loop while the thumbnails—and subsequent full-size images—are being loaded. The images will randomly appear when loaded and I would like to be able to insert a placeholder movie clip while they load, and swap them up with the thumbnails/images after it has been loaded. The placeholder movie clip is in my library (loadingLoop), but I'm having problems getting it to work correctly.
    Below is the original function that processes the XML and adds the thumbnail images; this is where I'm trying to insert the placeholder movie clip per XML child node (every attempt I've made just keeps throwing more errors, so I've omitted my attempts to avoid confusion), and I've attached the XML file for testing. And insight or help would be appreciated.
    //Locate the external XML file and trigger xmlLoaded when complete
    xmlLoader.load(new URLRequest("data/artGallery.xml"));
    xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
    //Load the XML and process the image locations
    function xmlLoaded(event:Event):void {
        xml = XML(event.target.data);
        //parse the nodes in the XML file
        xmlList = xml.children();
        //count the number of nodes in the XML file via XMLList
        trace(xmlList.length());
        //loop to load all of the thumbnails, based on the number of nodes in XMLList
        //"i" = every child node in the XML file
        for (var i:int = 0; i < xmlList.length(); i++) {
            //Add loadingLoop movie clip per node and wait for thumnail to load before swapping out with imageLoader thumbnail images <-- help!!
            //for every node, create a new instance to be put on stage
            imageLoader = new Loader();
            //load each thumbnail from its location per XML node's "thumb" attribute
            imageLoader.load(new URLRequest(xmlList[i].attribute("thumb")));
            //position of thumbnail instances per XML node (horizontally across stage)
            imageLoader.x = i * 110 + 10;//thumbs are 100 x 100 so, +10 to the width, plus +10 from left edge
            //imageLoader.y = 10;
            //for each node in XML list, name the instance with the path to the location of the full size image
            imageLoader.name = xmlList[i].attribute("source");
            //for each node in the XML list, add a drop shadow
            imageLoader.filters = [thumbDShadow];
            //add thumbnails to stage
            addChild(imageLoader);
            dropTween = new Tween(imageLoader, "y", Bounce.easeOut, -100, 10, 1, true);
            //set up thumbnails to wait for a click to execute showPicture
            imageLoader.addEventListener(MouseEvent.CLICK, showPicture);
            //set up thumbnails to scale when rolled over
            imageLoader.addEventListener(MouseEvent.ROLL_OVER, sizeUP);

    Somehow I had a feeling this wouldn't be a copy-and-paste job for the full-size images. Sorry to be a bother. This is the showPicture function that is fired off when the thumbnail image is clicked (from our previous example). Two errors are thrown:
    When the thumnail is clicked:
    "Error #2007: Parameter child must be non-null.
        at flash.display::DisplayObjectContainer/removeChild()
        at MethodInfo-51()"
    But the full-size image loads nonetheless. The second loading loop (loadingLoop2) is not removed. Below is the showPicture function:
    //Load the full-size images and place onto the stage
    function showPicture(event:MouseEvent):void {
        //add new movie clip container
        var mc2:MovieClip = new MovieClip();
        addChild(mc2);
        //clear the fullLoader—this is to help clear any full-size images that may already be on the stage (they have two options, click a new thumbnail, or close the current full-size image
        fullLoader.unload();
        //re-create the fullLoader, if there was one cleared
        fullLoader = new Loader();
        //load each full size image from its location per XML node's "source" deliniated by mc.ldr's "source" attribute
        fullLoader.load(new URLRequest(event.target.name));
        //add the loder to the container
        mc2.addChild(fullLoader);
        //create new instance of second loading loop
        mc2.fsloop = new loadingLoop2();
        //add the second loading loop to the container
        mc2.addChild(mc2.fsloop);
        //for each container, add a drop shadow
        mc2.filters = [fullDShadow];
        //set the container's position center on stage, making it the size of the loading loop until the full-size images are loaded
        mc2.x = (stage.stageWidth - mc2.fsloop.width) * 0.5;
        mc2.y = (stage.stageHeight - mc2.fsloop.height) * 0.5;
        //place container on stage
        addChild(mc2);
        //fade in each container
        fadeTween = new Tween(mc2, "alpha", None.easeNone, 0, 1, 0.5, true);
        //check to see if the image has been loaded completely—this is to make sure the image's attributes can be used to re-center on stage and remove fsloop
        fullLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, removeLoop2);
        //set field to multiline so that the <br> HTML tags can be used
        imageTextField.multiline = true;
        //add text frame for description
        imageTextField.x = 10;
        imageTextField.y = 125;
        //for each full-size image, load the description text from the XML child nodes
        for (var j:int = 0; j < xmlList.length(); j++) {
            //check to make sure that the correct full-size image matches the text node when clicked
            if (xmlList[j].attribute("source") == event.target.name) {
                //add each child node as a separate line in the same text field; added HTML tags for CSS application
                imageTextField.htmlText = "<p><span class = 'projectName'>" + xmlList[j].child("projectName") + "</span><br>"
                + "<span class = 'toolsUsed'>" + xmlList[j].child("toolsUsed") + "</span><br><br>"
                + xmlList[j].child("projText") + "<br>"
                + "<span class = 'liveURL'>" + xmlList[j].child("liveURL") + "</span></p>";
        function removeLoop2(event:Event):void {
            //re-position the container to center on stage to accomodating the full sized image
            mc2.x = (stage.stageWidth - fullLoader.width) * 0.5;
            mc2.y = (stage.stageHeight - fullLoader.height) * 0.5;
            //Add the text field
            addText();
            //hide instructional text, already on stage
            galleryInfo_mc.alpha = 0;
            //remove the full-sized loading loop
            event.target.loader.parent.removeChild(MovieClip(event.target.loader.parent).loadingLoop2 );
        //set up full-size images to "self close" by clicking on it
        mc2.addEventListener(MouseEvent.CLICK, clearStage);
    The second error gets thrown when the container is clicked and the function clearStage is executed, which does not remove the container:
    "TypeError: Error #2007: Parameter child must be non-null.
        at flash.display::DisplayObjectContainer/removeChild()
        at artGallery_v1_5_fla::MainTimeline/clearStage()"
    This is the clearStage function:
    //Allow full-size image to "self close" by clikcing on it and removing the text description
    function clearStage(event:MouseEvent):void {
        //clear the fullLoader
        fullLoader.unload();
        //remove the container
        event.target.parent.removeChild(MovieClip(event.target.parent).mc2);
       //remove the text field
        removeChild(imageTextField);
        //show the instructional text that is on-stage
        galleryInfo_mc.alpha = 1;
    Help!

  • Adding a keyword to several images in A2 - not working

    I imported new RAW files into A 2 today for the first time.
    I then started my normal routine of adding some of keywords to all of the images at once.
    I did a select all, dragged over "Wildlife Refuge", but it was only applied to that one image instead of all of them.
    In A 1 I did the exact same thing and the keyword was applied to all I selected.
    Checked the manual and I do not see what I am doing wrong.
    I would have thought it would still work the same way, but that is OK.
    What am I missing? Something simple I am sure!
    Thanks!
    Charles

    check to make sure primary only isn't checked under edit menu ...
    icon is also the one on right side with '1' inside the rectangle ...

  • Adding Back cover and other images to iTunes ?

    I would like to keep images of the back cover (and sometimes the liner notes) with my iTunes library. The current version 9.0.1 seems to only allow one image per song/album.
    Any suggestions?
    Thank you...

    I'm using iTunes 9.0.1 and I have no problem with adding an image to an individual song using the "Get Info" artwork pane. However, I cannot add additional images to multiple songs. Using the "Multiple Item Information" window to edit artwork will replace the current artwork with that being added.
    If you are using the artwork/video viewer window in the left sidebar, songs with multiple images will have selection arrows at the top of the viewer window to toggle between images.

  • Why is Preview adding white padding around my images?

    I have noticed that when I insert a JPG image into a PDF file using Preview, the application inserts white padding around the image. Meanwhile, when I insert a PDF image, no white padding is added. Why is the same image treated differently based on its file format?

    I'm guessing that when you add a raw graphic file to a set of PDFs pages, OS X "puts the image on a page", possibly either the same size as the preceding page, or the print default size.
    Every PDF page contains data specifying its page size, so that data is already there when you drop in a PDF file. Most image files don't actually specify their intended size: they are merely displayed at a useful resolution.
    If you want the images to be a different size from your other pages in your PDFs, then you will be better off converting them to PDFs before adding to another PDF. If this is part of a procedure that you do repeatedly, then you should look at the possibilities of automation in OS X.

  • Adding numerous keywords to an image

    My first post here, so hopefully someone can help..
    I am trying to keyword images in Elements 3. I have been going into the Elements 3 organiser, creating a tag, giving it an appropriate name and adding keywords in the "notes" box. Then dragging the tag onto the image..
    When I then check the "file info" option in the editor the only keywords listed are the ones in the tag name, the note entries are ignored. Obviously the notes box is not where you put keyword so thats fine, but my question is then where do you put the actual keywords? You can't put many words into the tag name field, so that can't be the answer..
    I would like to keyword an image with say 100 words. In the editor the "file info" box for keywords is greyed out and instructs you to use the file browser tags option.. Am I missing something obvious here?
    I am using Win XP, 2.4GHz celeron, 1.5Gb Ram.
    Thanks for reading this..
    Craig

    > So an individual tag for each individual keyword is what you are suggesting is necessary in Elements?
    Yes.
    > Maybe Photoshop CS has this functionality?
    I believe that Bridge - part of CS - does do exactly that.
    This would be logical, as CS is the "pros" tool and this is very much in a professional photographer's area of interest.
    If you don't want to spend that kind of money, you should look around for other tools to just add keywords. There are lots of possibilities - many of them free. I use Pixvue for other purposes, but I think it can do that.
    Just a word of caution: there are several ways to add keywords to image metadata; make sure you're doing what the image stock library expects.

  • Sharp Banding in HDR Images

    Experimenting with the new HDR Merge feature in Lightroom CC I am having a lot of trouble with harsh sharp bands appearing in the image, especially around horizon lines and clouds. Sometimes they're not visible unless zoomed in 1:1, other times they're very obvious and ruin the photo. The example below is a crop from one of the worst photos I've merged so far.
    Deghost Amount does not seem to effect these bands.

    Ooh that's ugly! I would try doing the HDR with fewer images that are further apart in exposure.  It appears that the merging algorithm is locking on to the wrong features in the images. Features that actually are moving.

  • 0xc0000135 while adding driver packages to boot image

    Hi, I am currently having issues adding driver packages to the boot image.
    Currently running Server 2008 R2 and have MDT 2013 installed.
    Tried searching for the error but no luck. No matter if I choose the specific driver I want to add or if I just start from the beginning it just constantly fails. Does anybody have any clue as to what could be causing it to not accept either from the boot image
    created from MDT Deployment Share or even using a generic boot image?

    Hi,
    First make sure you are using the correct version of DISM
    Secondly look at this http://social.technet.microsoft.com/Forums/en-US/ff8509ec-0ddd-4ad8-9e53-ecf527a80919/dismexe-is-failing-to-add-drivers-to-a-mounted-image-file?forum=w7itproinstall

  • HP Smart Zero Core - adding drivers to the OS image?

    Hi all,
    Is there any possiblity of adding device drivers/fonts to HP Smart Zero Core OS? I can't find that activity in the manual for this solution. :-/

    Grzegorz973 wrote:
    Hi all,
    Is there any possiblity of adding device drivers/fonts to HP Smart Zero Core OS? I can't find that activity in the manual for this solution. :-/
    I am not familiar with customizing the images and this is the HP Consumer Support Forum so I doubt you'll have much luck here.  Please try posting this in the HP Enterprise Business Community.

  • Why do I get Colored bands on some images in LR4 and LR5, but not in Aperture?

    On some images -- both RAW and JPG -- when opened in LR4 or LR5, there will be one or two "curved" color abberation lines across the entire image. This doesn't occur when I open the images in Aperture. Any idea why? Thanks

    >Is it possible that Aperture is showing you the camera-embedded JPG by default?  What happens if you actually produce a JPG from the raw file in Aperture?
    Aperture works the same way as Lightroom in this respect. It will first show you the embedded jpeg and will render a new conversion from the raw data as soon as it can. So it is possible the OP saw the embedded jpeg, but that should not last long and certainly by now should have been replaced with a newly rendered preview. Either Aperture is more forgiving of a small defect in the raw file or Lightroom import is somehow getting corrupt files of the sd card and Aperture not (would be weird). Another option is that the camera raw cache is corrupt. This can be checked by emptying the cache (Preferences->File Handling->Purge Cache). Lastly, this might be a corrupt preview in Lightroom. Check this by zooming 1:1 on an offending area in the Develop module and seeing if it goes away.
    >I suspect that the curvature is in fact due to lens corrections, and that these lens corrections are always on
    I believe you are right. I remember vaguely that there is some default lens correction with some cameras like this that is independent of the lens correction module. No clue whether the LX7 is one.

  • Help with adding a JPanel with multiple images to a JFrame

    I'm trying to make a program that reads a "maze" and displays a series of graphics depending on the character readed. The input is made from a file and the output must be placed in a JFrame from another class, but i can't get anything displayed. I have tried a lot of things, and i am a bit lost now, so i would thank any help. The input is something like this:
    20
    SXXXXXXXXXXXXXXXXXXX
    XXXX XXXXXXXXXXX
    X XXXXX
    X X XX XXXXXXXXXXXX
    X XXXXXXXXX XXX
    X X XXXXXXXXX XXXXX
    X XXXXX XXXXX XXXXX
    XX XXXXX XX XXXX
    XX XXXXX XXXXXXXX
    XX XX XXXX XXXXXXXX
    XX XX XXXXXXXX
    XX XXX XXXXXXXXXXXXX
    X XXXXXXXXXXXXX
    XX XXXXXXX !
    XX XXXXXX XXXXXXXXX
    XX XXXXXXX XXXXXXXXX
    XX XXXXXXXX
    XX XXXX XXXXXXXXXXXX
    XX XXXX XXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXX
    Generated by the Random Maze Generator
    And the code for the "translator" is this:
    package project;
    import java.io.*;
    import java.awt.*;
    import javax.swing.*;
    public class Translator extends JFrame {
       private FileReader Reader;
       private int size;
       Image wall,blank,exit,start,step1,step2;
      public Translator(){}
      public Translator(File F){
      try {
           Reader=new FileReader(F);}
      catch (IOException e){
           JOptionPane.showMessageDialog(null,"Error Opening File","Error",JOptionPane.ERROR_MESSAGE);}
      try {
      size=Reader.read();
      System.out.write(size);}
      catch (IOException e){
           JOptionPane.showMessageDialog(null,"Error Opening File","Error",JOptionPane.ERROR_MESSAGE);}
      Toolkit theKit=Toolkit.getDefaultToolkit();
      wall=theKit.getImage("wall.gif");
      blank=theKit.getImage("blanktile.jpg");
      exit=theKit.getImage("exit.jpg");
      start=theKit.getImage("start.jpg");
      step1=theKit.getImage("start.jpg");
      step2=theKit.getImage("step1.jpg");
      JPanel panel=new JPanel(){
      public void paintComponent(Graphics g) {
      super.paintComponents(g);
      int ch=0;
      System.out.print("a1 ");
      int currentx=0;
      int currenty=0;
      try {ch=Reader.read();
          System.out.write(ch);}
      catch (IOException e){}
      System.out.print("b1 ");
      while(ch!=-1){
        try {ch=Reader.read();}
        catch (IOException e){}
        System.out.write(ch);
        switch (ch){
            case '\n':{currenty++;
                      break;}
            case 'X':{System.out.print(">x<");
                     g.drawImage(wall,(currentx++)*20,currenty*20,this);
                     break;}
           case ' ':{
                     g.drawImage(blank,(currentx++)*20,currenty*20,this);
                     break;}
            case '!':{
                     g.drawImage(exit,(currentx++)*20,currenty*20,this);
                      break;}
            case 'S':{
                     g.drawImage(start,(currentx++)*20,currenty*20,this);
                      break;}
            case '-':{
                     g.drawImage(step1,(currentx++)*20,currenty*20,this);
                      break;}
            case 'o':{
                      g.drawImage(step2,(currentx++)*20,currenty*20,this);
                      break;}
            case 'G':{ch=-1;
                      break;}
                  }//Swith
          }//While
      }//paintComponent
    };//Panel
    panel.setOpaque(true);
    setContentPane(panel);
    }//Constructor
    }//Classforget all those systems.out and that stuff, that is just for the testing
    i call it in another class in this way:
    public Maze(){
        firstFrame=new JFrame("Random Maze Generator");
        firstFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        Container c = getContentPane();
        c.setLayout(new FlowLayout());
        (...)//more constructor code here
        Translator T=new Translator(savefile);
        firstFrame.add(T);
        firstFrame.getContentPane().add(c);
        firstFrame.setBounds(d.width/3,d.height/3,d.width/2,d.height/4);
        firstFrame.setVisible(true);
        c.setSize(d.width/2,d.height/4);
        c.show();
        }i know it may be a very basic or concept problem, but i can't get it solved
    thanks for any help

    Try this. It's trivial to convert it to use your images.
    If you insist on storing the maze in a file, just read one line at a
    time into an ArrayList than convert to an array and pass that to the
    MazePanel constructor.
    Any questions, just ask.
    import java.awt.*;
    import javax.swing.*;
    public class CFreman1
         static class MazePanel
              extends JPanel
              private final static int DIM= 20;
              private String[] mMaze;
              public MazePanel(String[] maze) { mMaze= maze; }
              public Dimension getPreferredSize() {
                   return new Dimension(mMaze[0].length()*DIM, mMaze.length*DIM);
              public void paint(Graphics g)
                   g.setColor(Color.BLACK);
                   g.fillRect(0, 0, getSize().width, getSize().height);
                   for (int y= 0; y< mMaze.length; y++) {
                        String row= mMaze[y];
                        for (int  x= 0; x< row.length(); x++) {
                             Color color= null;
                             switch (row.charAt(x)) {
                                  case 'S':
                                       color= Color.YELLOW;
                                       break;
                                  case 'X':
                                       color= Color.BLUE;
                                       break;
                                  case '!':
                                       color= Color.RED;
                                       break;
                             if (color != null) {
                                  g.setColor(color);
                                  g.fillOval(x*DIM, y*DIM, DIM, DIM);
         public static void main(String[] argv)
              String[] maze= {
                   "SXXXXXXXXXXXXXXXXXXX",
                   "    XXXX XXXXXXXXXXX",
                   "X              XXXXX",
                   "X  X XX XXXXXXXXXXXX",
                   "X    XXXXXXXXX   XXX",
                   "X  X XXXXXXXXX XXXXX",
                   "X  XXXXX XXXXX XXXXX",
                   "XX XXXXX XX     XXXX",
                   "XX XXXXX    XXXXXXXX",
                   "XX  XX XXXX XXXXXXXX",
                   "XX  XX      XXXXXXXX",
                   "XX XXX XXXXXXXXXXXXX",
                   "X      XXXXXXXXXXXXX",
                   "XX XXXXXXX         !",
                   "XX  XXXXXX XXXXXXXXX",
                   "XX XXXXXXX XXXXXXXXX",
                   "XX          XXXXXXXX",
                   "XX XXXX XXXXXXXXXXXX",
                   "XX XXXX XXXXXXXXXXXX",
                   "XXXXXXXXXXXXXXXXXXXX"
              JFrame frame= new JFrame("CFreman1");
              frame.getContentPane().add(new MazePanel(maze));
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.pack();
              frame.setResizable(false);
              frame.setVisible(true);
    }

  • Adding a link to an image.. Help!

    I use Dreamweaver and I was able to add a link to an image on
    my site. The link directs people to a video. The problem is, it
    works perfectly in IE, but in the Foxfire browser when I click on
    the image, a new blank page opens and then the video pops up on
    windows media player.
    In IE, the page stays the same and just the windows media
    player pops up.
    Why would it work differently in Foxfire?

    The reason will be that IE has a setting to handle the videa
    but FF is very
    modular and so will not.
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "Miss_Angela" <[email protected]> wrote in
    message
    news:fcpue6$5k9$[email protected]..
    >I use Dreamweaver and I was able to add a link to an
    image on my site. The
    >link
    > directs people to a video. The problem is, it works
    perfectly in IE, but
    > in the
    > Foxfire browser when I click on the image, a new blank
    page opens and then
    > the
    > video pops up on windows media player.
    >
    > In IE, the page stays the same and just the windows
    media player pops up.
    >
    > Why would it work differently in Foxfire?
    >

Maybe you are looking for

  • Can no longer burn DVD-R

    I've read many posts other places now regarding this issue and no one seems to have an answer. I've been burning media fine for some time now, and after the 10.4.6 upgrade, DVD's fail to burn on my G5's internal drive. I'd think it was maybe the driv

  • Reverse action and onclick on commandButton.

    Hi, my question is about this: In jspx. <af:commandButton text="Report" blocking="false" action="#{myOwnBean.report_Action}" onclick="#{myOwnBean.chainWeb}"/> I want execute action first, and then onclick in second place. Are there some way to do thi

  • Cc 7.2.1 lags on timeline and program monitor, and drop frames.

    Hello guys i have cc 7.2.1, and every basic operation i do on the timeline , moving clips, trimiming, scrubing on the timeline everything lags, its not fluid. When i do a simple scrubring on the timeline, the CTI takes sometime to get to the position

  • Buttons link between folios in a multi-app?

    Is there a feature that allows me to link between folios in one multi-folio app? thanks, Yngvi

  • Can't see the FaceTime option in Contacts on iPhone4s. Any clues why?

    When I select an individual contact from contacts, I do not see the Facetime option to select. Also, went into Settings>Facetime & tried to sign in but got message "Could not signin. Please check your network connection and try again". I am using the