How to auto adjust images in imageJ?

Hello,
I would like to know How can I adjust the contrast and brightness in imageJ using a Java application?
imageJ has ContrastAdjuster.java and inside it an autoAdjust function which is not public, so I cannot call it? any one has experience with this?
Best Regards,

Your calling class needs to be at that access modifier allowance ,
since your caller probably isn't,
you can make a small class with that access level(no specifier - is between protected and private) to join it that you can reference with your caller package level,
or probably better, a nested class of that access level in your caller class with global scope instantiation in your caller.
*// not all syntax is here - This just to give you a guide of the type of access specifier shuffling and reprocessing to obtain the methods variables at the same level as obtaining the ability to call the method , it may be more practical to target the class in imageJ that instantiates the ContrastAdjuster class and simply obtain its reference to ContrastAdjuster*
*//ContrastAdjuster adj - should be passed from wherever it is instantiated , presumably its in a higher level class frame in the application*
public class IwasCalling{
CallAutoAdjuster callAUTContraster;
public IwasCalling(ContrastAdjuster adj){
callAUTContraster = new CallAutoAdjuster();
//start nested class
class CallAutoAdjuster{
void callAutoAdjuster(){
autoAdjust(imp,ip); // ImagePlus imp , ImageProcessor ip
}//end method
}//end nested
}//end iwascalling
Edited by: 893871 on Nov 3, 2011 6:53 PM
After taking a good look at the .java files
--i find the doAutoAdjust variable requires to be set in the public class ContrastAdjuster and call notify()--
..and i have no idea how i lost the plot there... it was the contrast slider value you wanted
so a method would be from some class you create
// contr is the reference to the ij plugin frame extended from JFrame that ContrastAdjuster.java extends from
public int adJustContrast(int slideVal){ // this listener method sets an int in  ContrastAdjuster public synchronized void adjustmentValueChanged(AdjustmentEvent e)
// with the line contrastValue = contrastSlider.getValue();
// int sliderRange = 256; this global int is divided by two appears to be the Max for contrast and the or a scrollbar appears to be a make-shift slider value changer
contr.contrastValue = slideVal; // global accessible int in ContrastAdjuster
return contr.contrastValue;
public boolean adjAuto(){
contr.doAutoAdjust = true;
return contr.doAutoAdjust;
public void updateNotifyComm(){ // now update the app
contr.notify();
//............... so you would call from somewhere to do it by this after making those methods
adJustContrast(contr.contrastSlider.getValue());
updateNotifyComm(); // or just running code of contr.notify();
// i have no idea how that became boolean  doAutoAdjust in my mind
// for auto adjust
adjAuto();
updateNotifyComm();Edited by: 893871 on Nov 3, 2011 8:15 PM
Edited by: 893871 on Nov 3, 2011 8:17 PM
Edited by: 893871 on Nov 3, 2011 8:23 PM

Similar Messages

  • How to auto rotate Images on Full Screen Slideshow if pictures were taken mixed Portrait and Landsca

    In Muse: How to auto rotate Images on Full Screen Slideshow if pictures were taken mixed Portrait and Landscape

    There is no way that Muse would automatically rotate the images. What you can instruct Muse to do is whether you want to show all image content and leave blank space in either direction OR scale the image to fill the frame resulting in some cropping, but filling the otherwise blank space.
    The options are Fit Content Proportionally and Fill Frame Proportionally respectively.
    Cheers,
    Vikas

  • How to auto adjust the height of my div tag?

    This is my website www.whistleandlisten.com
    The white background is a div tag and whenever I add new content within the div tag I want it to auto adjust to extend the white div tag down as the page gets longer. I have tried css and set my height to auto but that makes it disappear. Right now I have to set it to a certain amount of pixels which gets annoying and sometimes I forget to after adding lots of content. PLEASE HELP.

    To have an extensible height element, you should not apply the height property as you have done starting at line 9 of songcss.css
    #whitediv
      position: absolute;
      left: 50%;
      margin-left: -490px;
      top: 0px;
      width: 950px;
      height: 2900px;
      z-index: 1;
      background-color: #ffffff;
      background-image: none;
      background-repeat: repeat;
      background-attachment: scroll;
      background-position: 0% 0%;
      background-clip: border-box;
      background-origin: padding-box;
      background-size: auto auto;
      color: #ffffff;
      box-shadow: #ffffff;
      overflow-x: visible;
      overflow-y: visible;

  • How to auto adjust container dimensions

    Is there a property I can set on Canvases, Panels, or other containers that would make them auto-adjust their height/width dimensions based on the child components.  Basically, I would like for this to happen at load AND during run time.  So if you update a Text control in a Canvas container it will resize itself so you can see everything.
    Or do I have to write some complicated function to do this?

    Sorry, I answered my own question about 2 minutes after asking it.  When I got rid of the "width = 100%" attributes from the Text controls it worked.  You also have to make sure you dont initially set the width and height values for the container.

  • How to auto adjust the size of a drop-down

    I used to have a table inserted in all of my drop-downs and then I had all of my text and images inside of this table.  The table would automatically resize based on the width of the largest image in that drop-down.  The text would adjust accordingly as well.  Unfortunately, I have to remove the table from all of my drop-downs because Adobe has not fixed the bug that I reported in RoboHelp 8.  If I have a bulleted or numbered-list in a table that is in a drop-down then when I generate to Word RoboHelp adds an extra bullet before and/or after the drop-down.  Since they did not fix this in RoboHelp 9 either, I'm having to remove all of my tables in my drop-downs.  Peter Grainge gave me some changes for my style sheet to make a border appear in my drop-downs so that I don't have to use the table for this part anymore.  The only problem is that when I generate WebHelp the border is staying a defined width and the text is staying within that width, but the image is much larger.  This is a problem in IE and Firefox.  Is there a way to get my border in my drop-downs to resize to the size of my image, just as I got the tables to do?  I would just set my table size to 95%, and that did the trick.  I do not know how to do this with the style sheet for a drop-down.
    Here is the text Peter gave me for my style sheet back in December of 2010:
    DIV.droptext {
    font-size: 10pt;
    border-left-style: Solid;
    border-right-style: Solid;
    border-top-style: Solid;
    border-bottom-style: Solid;
    border-left-color: #656598;
    border-right-color: #656598;
    border-top-color: #656598;
    border-bottom-color: #656598;
    padding-left: 10px;
    padding-right: 10px;
    border-left-width: 2px;
    border-right-width: 2px;
    border-top-width: 2px;
    border-bottom-width: 2px;
    padding-top: 10px;
    padding-bottom: 10px;

    Hi,
    Try to add "display: inline" to the css:
    div.droptext {
        font-size: 10pt;
        border: 2px solid #656598;
        padding: 10px;
        display: inline;
    This will force the dropdown to render as a 'normal' text element instead of a block.
    Greet,
    Willam

  • How to auto adjust number of rows in DataGrid

    Hi,
    Is there any way using which the number of rows displayed in DataGrid can be adjusted automatically?
    I have an application in which initially the DataGrid  is populated with just 2-3 records, and in the course of running of the application, more records are added.
    Initially, I do not wish to have the additional blank rows. How can this be done?
    Thanks

    If I understand you correctly, you can probably work with the .rowCount property of your datagrid. Default is 4 including the header.
    See http://www.adobe.com/livedocs/flex/3/langref/mx/controls/listClasses/ListBase.html#rowCoun t

  • How to "auto" change images in Dreamweaver?

    Hey guys, happy Holidays, Merry Christmas, ....
    Got a request that have seen but never done, client wants the
    image to swap to a new image every time the person comes back to
    the home page.......there are 10 pix in all I believe.
    Anway, I uploaded a snapshot of the home page and placed a
    RED BOX around what would be the image swapping...
    I assume to some extent it would be a seperate cell with
    java?? If so, not sure where to find this code and how long or
    simple (OR NOT) it is, or is this something dreamweaver can handle?
    He uses go live but I would use Dreamweaver so I guess I could open
    his source in DW and go from there.
    Many thanks.
    Here is the link....to the snapshot of the home page..
    http://img277.imageshack.us/my.php?image=imageswapgs4.jpg

    quote:
    Originally posted by:
    Newsgroup User
    > Here it is in all its glory,.
    >
    > view-source:
    http://fit4learning.com/
    >
    > Of course, you can go to the site too.
    >
    > I am just changing the picture....to randomize..
    >
    > thanks
    first- you will have to NAME the image-
    <img src="HomePageimages/CartoonScreen.gif" alt=""
    height="143" width="207"
    border="0" />
    select it in design view, and in the Property Inspector- give
    it a Name.
    single word- no spaces.
    then- go to THIS page:
    http://www.kaosweaver.com/extensions/details.php?id=5&cid=18
    for this extension: Advanced Random Image
    consider making a donation- it's a Free Extension here:
    http://www.kaosweaver.com/dlCounter.php?id=5
    I suggest you make a copy of the page to work on-
    I will make a donation if I can get it to work.
    First I had to batch (fireworks) the images cartoons to be
    the same size as the original (not my work) then I installed the
    KAOWEAVER extention and selected the image (cartoon) one with the
    doctor which you can see in previos links and did the command
    KAOWEAVER....now all I get is a red box.
    I downloaded the source (from their site), and uploaded the
    cartoons, (resized), the HTML file....
    The only thing I was unsure of was the LINK and TARGET for the
    Kaoweaver command and maybe that is the problem?
    Anyway here is a link of another site that I have done a
    scroller and other things for, that I uploaded this test page to.
    Please tell me what I did wrong..... note the RED BOX in the
    window...
    In the Kaoweaver, I also added the image size, border 0 and
    added the name to alt and left subdomain blank, again am wondering
    about LINK and TARGET?
    LINK TO MODIFIED PAGE
    TEMP NAME, DIFFERENT HOST

  • How to auto adjust layout in bsp page

    hi
    i have created a bsp page , in diffrent resolution screen its displaying siffrent every time
    is there any techniue by which my layout autoadjust with any resolution.
    thanks

    hye prasanth,
      you can always use html commands in your bsp layout.
    <table>
    <tr>             -- new row
    <td>
    -htmlb coding
    </td>
    </tr>
    use attributes in <td> like --  width , valing etc..
    hope this is helpful
    thanks,
    Imran.

  • How to stop Lightroom from auto-adjusting RAW files

    Is there a way to stop Lightroom from automatically "fixing" my RAW files? When I first load them in they look perfect (like they do on the back of my camera), but then LR auto-adjusts them to make them dull and desaturated and not at all contrasty. Is there a way that I can set LR to not do anything to the files and let me decide what I want the original to look like?

    I totally understand where II is coming from. I too find it bothersome that in some images, the pre-processed preview is a more pleasing image than the unprocessed RAW. At the same time, it is the unprocessed nature of the RAW image that is the whole attraction and point to shooting RAW. An obvious workaround (if one is willing of course) is to shoot RAW+JPEG so as to either have the JPEG as a "target" reference or final image when suitable. And that is an option I used to employ until I got tired of dealing with the issues of essentially doubling the number of images I was working with.
    I do disagree with II's thought that the preview showing up is slowing down any processing of the RAW image. It would seem to me that the whole reason the preview is showing up is that it is a prerendered aspect of the file that pops up while the actual preview rendering is taking place. While I don't claim to have technical knowledge as to how this all works, I would think that LR is simply showing the initial rendering of what the RAW file is telling LR it looks like until LR can actually make it's OWN interpretation. Either way, the process is fast enough that it isn't a huge issue to me on my system. In fact, those images where I see a vast difference between the inital preview image and the LR rendered resolve no slower than the rest.
    It is interesting to know that there are applications/utilities out there that will extract that inital preview though. I thionk it would be very cool if LR made use of such a capability more directly as an option.
    Anyway, while the frequency of my use of LR so far pales in comparison to that of PS and Bridge, so far I can say that such discrepency between nice looking inital preview and less than so RAW is far less common than it is working with PS and Bridge CS2.

  • How do I save a photo after I have zoomed in on it?  I want to save the zoom-in as a new photo and can't work out why this doesn't work the same way saving a cropped image, or adjusted image does.  Thank you.

    How do I save an image after I have zoomed in on it?  I can't work out why I can't save a zoom-in the same way
    I can save a cropped image or an adjusted image. Thanks, Lily A.

    Hi Matt, thanks for your reply.  Have realised that Zoom in Iphoto is just  a viewing tool and not an editing tool.
    Was creating beautiful abstractions by zooming in and wanted to create a new image of the result.   Have since discovered that cropping after zooming takes me a little way to where I want to go but it isn't the same effect.  Will perhaps have to try to create it when actually shooting.  Am doing a photoshop course in February and maybe will learn a bit more then, too.  Am pretty much an amateur just finding my way.
    Thanks again,
    Best, Lily

  • How to adjust image color in pages?, how to adjust image color in pages?

    How do I adjust the color in a clip art piece of a pages document?

    I am presuming you are using Pages 5.2 and it is a bitmap (paint/photo) image:
    Select the Image > View > Show > Adjust Image
    Peter

  • LR4 auto adjusting and messing up my RAW files since latest update? How do I turn this off?

    HELP!
    This latest LR4 update has somehow turned my RAW files into these wretched looking too bright, too yellow/orange, messes.  I DO NOT have it set to auto import with any presets. I am not able to "reset" back to the usual dull, blah, flat looking RAW files I used to see in my LR4. 
    I also know for a fact that this is NOT how I took the images so the setting it's being imported with are not how I took the images.  I know this because I've been shooting RAW-Jpeg since I noticed this and couldn't find where to turn this setting off, and my JPEGS look NOTHING like what this is importing them as. 
    It's importing them all, regardless of session as I've imported 10 different sessions lately, and ALL of them somehow change over from the dull images RAW files typically look like when I click on them to enlarge them to have Temp 5500, Tint, -11, Exp +70, Contrast +5, highlights -9, Shadows +9, Whites -98,  Blacks -2, Clarity +19, Vib +10, Sat +19, and Orange +6 with Sharpening 81 and Noise Reduc at 4.
    What's going on??? How do I reset them back to the original RAW settings and stop LR from importing every.single.session with the settings above? I have no Presets with these settings either!

    Thank you to a fellow photog who answered my question via Facebook!  Apparently one of my assistants mistakenly made adjustments in the Libray tab to the "Saved Prest" which saved her settings as "Custom" as well as saved the Whitebalance change she made there and the Tone Control section.  I hit the "reset all" button under Tone Control and all is right with the world again! WHEW!

  • I recently switched to Aperture. When I opened an image I imported from iPhoto, I don't have an option to edit it. Top of "Adjustments" tab says "image offline". How can I adjust Aperture so I can make adjustment to my iPhoto images?

    I recently switched to Aperture. When I opened an image I imported from iPhoto, I don't have an option to edit it. Top of "Adjustments" tab says "image offline". How can I adjust Aperture so I can make adjustment to my iPhoto images?

    I never tried importing from the iPhoto library as referenced images. I wonder if Aperture can access images stored in an iPhoto library package?  Even if it would work, it sounds like a bad thing to do.
    You might consider starting over and this time have Aperture manage the images.  That will copy them to the Aperture library, leaving the iPhoto library untouched. This assumes you have sufficient space to make a complete copy of all the images in your iPhoto library plus another copy of each image that Aperture makes as the preview image. You can then back up your iPhoto library (two backup copies, just to be sure) then remove it from your hard drive when you start getting too low on space.  As I write this I don't know where your iPhoto or Aperture libraries are/will be located so I'm assuming you have them on your HD.

  • 3.5 now moving an adjusted image to front of event folder. Have forgotten how to not have that happen. Any ideas? Thanks.

    3.5 moves adjusted image to front of event folder; how to stop that? Thanks.

    When exactly does this happen?  Are you seeing adjusted images move in the filmstrip after editing? Where are you editing from - are you browsing a project, an album, a smart album, a folder? Sorry -"Event folder" is not clear.
    If you are referring to the film strip in the browser, how have you set the "Sorting" pop-up menu?

  • How to "Auto Levels" to multiple images?

    Aperture doesn't allow one to perform the "Auto Levels" function on multiple images regardless of the state of the "Toggle Primary Only" control. Has anyone discovered a workaround in 1.1?
    (This topic was previously discussed for 1.0 in http://discussions.apple.com/thread.jspa?messageID=1486906&#1486906)
    Thanks.

    You can lift and stamp the changes made by using an auto-adjustment, but it will no longer be automatic, just a copy of the changes made to the last image.
    Aperture doesn't let you make any image adjustment to multiple images at once, so it's nothing specific to auto-adjust.
    Ian

Maybe you are looking for

  • Error message when downloading version 4

    After waiting 35 minutes to download the latest iphone version 4 on my laptop, the 378mg gets downloaded then 1 minute later I ger an error message 3259 with an error box that reads "There was a problem downloading the software for the iphone (my nam

  • How can I filter J1939 CAN messages by Command Byte. (NI-CAN)

    We have customers who use the first byte of data as an additional header byte. They have the usual J1939 extended header along with the first byte. Does anyone know of a way to filter on this in "Measurement & Automation Manager" (NI-CAN). We then br

  • BLOB limited to PDF only

    Is there an easy (or not easy) way to limit a BLOB file browse to be PDF only? I tried putting an item level validation on both the Browse object and on the filename (it doesn't work). I tried attaching a javascript onChange entry to the file browse

  • Auto Hide Back explorer Window

    Hello all, I need a solution about form services in ora9ias. When i run my forms application entering the below link in the browser( IE or mozilla or etc. ) http://myhost.tech.com:7779/forms90/f90servlet?config=myApp first in the browser window it sa

  • How to store the documents in database

    Hi all i have summary page in that user will attch some documents those documents i need to store in data base is it posible in OAF regards Sreekanth