ftp.nice.ch/pub/next/graphics/bitmap/dips.1.00.s.tar.gz#/GUI_DIPS/_gui_dips/Cntrl.m

This is Cntrl.m in view mode; [Download] [Up]

/* Generated by Interface Builder */

#import	<stdio.h>
#import	<stdlib.h>
#import	<string.h>
#import	<appkit/Matrix.h>
#import	<appkit/Application.h>
#import	"Cntrl.h"
#import	"HipsImage.h"
#import	"Mask.h"

@implementation Cntrl

- open:sender
{
  [image free];
  image = [HipsImage open: self];
  [image display];
  return self;
} 

- save:sender
{
  [[image save: self] display];
  return self;
} 

- saveAs:sender
{
  [[image saveAs: self] display];
  return self;
} 

- saveToTIFF:sender
{
  [[image saveToTIFF: self] display];
  return self;
} 

- convolve:sender
{
  
  while(![mask getsize]) {
    NXRunAlertPanel("Mask","You must open a mask",NULL,NULL,NULL);
    [mask open:self];
  }
  while(![image getrows] || ![image getcols]) {
    NXRunAlertPanel("Image","You must open an image",NULL,NULL,NULL);
    image = [HipsImage open:self];
  }
  [[image convolve: mask] display];
  return self;
}

- invert:sender
{

  while(![image getrows] || ![image getcols]) {
    NXRunAlertPanel("Image","You must open an image",NULL,NULL,NULL);
    image = [HipsImage open:self];
  }
  [[image invert] display];
  return self;
}

- threshold:sender
{
  while(![image getrows] || ![image getcols]) {
    NXRunAlertPanel("Image","You must open an image",NULL,NULL,NULL);
    image = [HipsImage open:self];
  }
  [[image threshold:[tvals intValueAt:0] :[tvals intValueAt:1]] display];
  return self;
}

- undo:sender
{
  [[image undo] display];
  return self;
}

- revert:sender
{
  [[image revert] display];
  return self;
}

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.